$treeview $search $mathjax
Palabos  Version 1.1
$projectbrief
$projectbrief
$searchbox

plb::util::ValueTracer< T > Class Template Reference

Check time-convergence of a scalar. More...

#include <benchmarkUtil.h>

Collaboration diagram for plb::util::ValueTracer< T >:

List of all members.

Public Member Functions

 ValueTracer (T u, T L, T epsilon)
 The only constructor.
void resetScale (T u, T L)
 Change values of u and L to update characteristic scales of the system.
void resetValues ()
 reinitializes the values
plint getDeltaT () const
 Get characteristic time scale.
void takeValue (T val, bool doPrint=false)
 Feed the object with a new measured scalar.
bool hasConverged () const
 Test for convergence, with respect to stdDev.
bool hasConvergedMinMax () const
 Test for convergence, with respect to difference between min and max value;.
computeAverage () const
computeStdDev (T average) const
void setEpsilon (T epsilon_)

Detailed Description

template<typename T>
class plb::util::ValueTracer< T >

Check time-convergence of a scalar.

This class is useful, for example to check convergence of the velocity field for the simulation of a stationary flow. Convergence is claimed when the standard deviation of the monitored value is smaller than epsilon times the average. The statistics are taken over a macroscopic time scale of the system.


Constructor & Destructor Documentation

template<typename T >
plb::util::ValueTracer< T >::ValueTracer ( u,
L,
epsilon 
) [inline]

The only constructor.

Parameters:
u The characteristic velocity of the system, for computation of the characteristic time scale.
L The characteristic length of the system, for computation of the characteristic time scale.
_epsilon Precision of the convergence.

Member Function Documentation

template<typename T >
T plb::util::ValueTracer< T >::computeStdDev ( average  )  const [inline]
template<typename T >
plint plb::util::ValueTracer< T >::getDeltaT (  )  const [inline]

Get characteristic time scale.

template<typename T >
bool plb::util::ValueTracer< T >::hasConverged (  )  const [inline]

Test for convergence, with respect to stdDev.

References plb::util::ValueTracer< T >::computeAverage(), plb::util::ValueTracer< T >::computeStdDev(), and plb::pcout.

template<typename T >
bool plb::util::ValueTracer< T >::hasConvergedMinMax (  )  const [inline]

Test for convergence, with respect to difference between min and max value;.

References plb::util::ValueTracer< T >::computeAverage().

template<typename T >
void plb::util::ValueTracer< T >::resetScale ( u,
L 
) [inline]

Change values of u and L to update characteristic scales of the system.

template<typename T >
void plb::util::ValueTracer< T >::resetValues (  )  [inline]

reinitializes the values

template<typename T >
void plb::util::ValueTracer< T >::setEpsilon ( epsilon_  )  [inline]
template<typename T >
void plb::util::ValueTracer< T >::takeValue ( val,
bool  doPrint = false 
) [inline]

Feed the object with a new measured scalar.

References plb::util::ValueTracer< T >::computeAverage(), plb::util::ValueTracer< T >::computeStdDev(), and plb::pcout.


The documentation for this class was generated from the following files: