Public Types | Public Member Functions | Static Public Attributes | Friends | List of all members
fieldAverageItem Class Reference

Helper class to describe what form of averaging to apply. A set will be applied to each base field in Foam::fieldAverage, of the following form. More...

Collaboration diagram for fieldAverageItem:
Collaboration graph
[legend]

Public Types

enum  baseType { ITER, TIME }
 
enum  windowType { NONE, APPROXIMATE, EXACT }
 

Public Member Functions

 fieldAverageItem ()
 
 fieldAverageItem (Istream &)
 
 fieldAverageItem (const fieldAverageItem &)
 
 ~fieldAverageItem ()
 
bool active () const
 
boolactive ()
 
const wordfieldName () const
 
bool mean () const
 
boolmean ()
 
const wordmeanFieldName () const
 
void setMeanFieldName (const word &name)
 
bool prime2Mean () const
 
boolprime2Mean ()
 
const wordprime2MeanFieldName () const
 
void setPrime2MeanFieldName (const word &name)
 
const wordbase () const
 
label totalIter () const
 
scalar totalTime () const
 
scalar window () const
 
const wordwindowName () const
 
const FIFOStack< scalar > & windowTimes () const
 
const FIFOStack< word > & windowFieldNames () const
 
bool allowRestart () const
 
scalar dt (const scalar deltaT) const
 
scalar Dt () const
 
word windowFieldName (const word &prefix) const
 
bool inWindow (const scalar t) const
 
bool storeWindowFields () const
 
bool writeWindowFields () const
 
void addToWindow (const word &fieldName, const scalar deltaT)
 
void evolve (const objectRegistry &obr)
 
void clear (const objectRegistry &obr, const bool fullClean)
 
bool readState (const dictionary &dict)
 
void writeState (dictionary &dict) const
 
template<class Type >
bool calculateMeanField (const objectRegistry &obr) const
 
template<class Type1 , class Type2 >
bool calculatePrime2MeanField (const objectRegistry &obr) const
 
void operator= (const fieldAverageItem &)
 

Static Public Attributes

static const word EXT_MEAN
 
static const word EXT_PRIME2MEAN
 

Friends

bool operator== (const fieldAverageItem &a, const fieldAverageItem &b)
 
bool operator!= (const fieldAverageItem &a, const fieldAverageItem &b)
 
Istreamoperator>> (Istream &, fieldAverageItem &)
 
Ostreamoperator<< (Ostream &, const fieldAverageItem &)
 

Detailed Description

Helper class to describe what form of averaging to apply. A set will be applied to each base field in Foam::fieldAverage, of the following form.

Usage
<field1>
{
    mean            on;
    prime2Mean      on;
    base            time; // iteration
    window          200;  // optional averaging window
    windowName      w1;   // optional window name (default = "")
    windowType      approximate; // window type

    allowRestart    yes;  // optional, used for windowType 'exact'
}

where the entries mean:

Property Description Type Req'd Dflt
mean Flag to calculate average bool yes -
prime2Mean Flag to calculate prime-square average bool yes -
base Type of averaging interval word yes -
window Averaging window scalar no
windowName Name of the averaging window word no ""
windowType Type of averaging window word no
allowRestart Flag to allow restart for windowType=exact bool no

Options for the base entry:

      time | Averaging interval is based on time
      iter | Averaging interval is based on iterations

Options for the windowType entry:

      none  | no windowing
      exact | allow additional files will be stored and written
      approximate | disallow additional files will be stored and written
Note
To employ the prime2Mean option, the mean option must be enabled.
Source files

Definition at line 155 of file fieldAverageItem.H.

Member Enumeration Documentation

◆ baseType

enum baseType
strong
Enumerator
ITER 
TIME 

Definition at line 171 of file fieldAverageItem.H.

◆ windowType

enum windowType
strong
Enumerator
NONE 
APPROXIMATE 
EXACT 

Definition at line 178 of file fieldAverageItem.H.

Constructor & Destructor Documentation

◆ fieldAverageItem() [1/3]

Definition at line 63 of file fieldAverageItem.C.

◆ fieldAverageItem() [2/3]

Definition at line 28 of file fieldAverageItemIO.C.

◆ fieldAverageItem() [3/3]

fieldAverageItem ( const fieldAverageItem faItem)

Definition at line 85 of file fieldAverageItem.C.

◆ ~fieldAverageItem()

Definition at line 110 of file fieldAverageItem.C.

Member Function Documentation

◆ active() [1/2]

bool & active ( ) const
inline

Definition at line 23 of file fieldAverageItemI.H.

Referenced by fieldAverage::addMeanFieldType().

Here is the caller graph for this function:

◆ active() [2/2]

bool& active ( )
inline

◆ fieldName()

const Foam::word & fieldName ( ) const
inline

◆ mean() [1/2]

bool & mean ( ) const
inline

Definition at line 41 of file fieldAverageItemI.H.

Referenced by fieldAverage::addMeanField(), fieldAverage::addMeanFieldType(), fieldAverage::addPrime2MeanField(), and fieldAverage::writeFields().

Here is the caller graph for this function:

◆ mean() [2/2]

bool& mean ( )
inline

◆ meanFieldName()

const Foam::word & meanFieldName ( ) const
inline

◆ setMeanFieldName()

void setMeanFieldName ( const word name)
inline

Definition at line 61 of file fieldAverageItemI.H.

References Foam::name().

Here is the call graph for this function:

◆ prime2Mean() [1/2]

bool & prime2Mean ( ) const
inline

◆ prime2Mean() [2/2]

bool& prime2Mean ( )
inline

◆ prime2MeanFieldName()

const Foam::word & prime2MeanFieldName ( ) const
inline

Definition at line 82 of file fieldAverageItemI.H.

Referenced by fieldAverage::addMeanSqrToPrime2MeanType(), fieldAverage::addPrime2MeanFieldType(), and fieldAverage::writeFields().

Here is the caller graph for this function:

◆ setPrime2MeanFieldName()

void setPrime2MeanFieldName ( const word name)
inline

Definition at line 89 of file fieldAverageItemI.H.

References Foam::name().

Here is the call graph for this function:

◆ base()

const Foam::word & base ( ) const
inline

Definition at line 97 of file fieldAverageItemI.H.

◆ totalIter()

Foam::label totalIter ( ) const
inline

Definition at line 103 of file fieldAverageItemI.H.

◆ totalTime()

Foam::scalar totalTime ( ) const
inline

Definition at line 109 of file fieldAverageItemI.H.

◆ window()

Foam::scalar window ( ) const
inline

Definition at line 115 of file fieldAverageItemI.H.

Referenced by fieldAverage::restoreWindowFields().

Here is the caller graph for this function:

◆ windowName()

const Foam::word & windowName ( ) const
inline

Definition at line 121 of file fieldAverageItemI.H.

◆ windowTimes()

const Foam::FIFOStack< Foam::scalar > & windowTimes ( ) const
inline

Definition at line 128 of file fieldAverageItemI.H.

◆ windowFieldNames()

const Foam::FIFOStack< Foam::word > & windowFieldNames ( ) const
inline

Definition at line 135 of file fieldAverageItemI.H.

Referenced by fieldAverage::restoreWindowFieldsType(), and fieldAverage::writeFields().

Here is the caller graph for this function:

◆ allowRestart()

bool allowRestart ( ) const
inline

Definition at line 141 of file fieldAverageItemI.H.

◆ dt()

Foam::scalar dt ( const scalar  deltaT) const
inline

Definition at line 148 of file fieldAverageItemI.H.

References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

◆ Dt()

Foam::scalar Dt ( ) const
inline

Definition at line 174 of file fieldAverageItemI.H.

References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

◆ windowFieldName()

Foam::word windowFieldName ( const word prefix) const
inline

Definition at line 199 of file fieldAverageItemI.H.

References Foam::name().

Referenced by fieldAverage::storeWindowFieldType().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ inWindow()

bool inWindow ( const scalar  t) const
inline

Definition at line 207 of file fieldAverageItemI.H.

References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

◆ storeWindowFields()

bool storeWindowFields ( ) const
inline

Definition at line 232 of file fieldAverageItemI.H.

Referenced by fieldAverage::storeWindowFields().

Here is the caller graph for this function:

◆ writeWindowFields()

bool writeWindowFields ( ) const
inline

Definition at line 238 of file fieldAverageItemI.H.

Referenced by fieldAverage::writeFields().

Here is the caller graph for this function:

◆ addToWindow()

void addToWindow ( const word fieldName,
const scalar  deltaT 
)

Definition at line 117 of file fieldAverageItem.C.

Referenced by fieldAverage::storeWindowFieldType().

Here is the caller graph for this function:

◆ evolve()

void evolve ( const objectRegistry obr)

Definition at line 127 of file fieldAverageItem.C.

References objectRegistry::checkOut(), TimeState::deltaTValue(), forAllIters, and objectRegistry::time().

Here is the call graph for this function:

◆ clear()

void clear ( const objectRegistry obr,
const bool  fullClean 
)

Definition at line 156 of file fieldAverageItem.C.

References objectRegistry::checkOut().

Here is the call graph for this function:

◆ readState()

bool readState ( const dictionary dict)

Definition at line 186 of file fieldAverageItem.C.

References dict.

◆ writeState()

void writeState ( dictionary dict) const

Definition at line 202 of file fieldAverageItem.C.

References dict.

◆ calculateMeanField()

bool calculateMeanField ( const objectRegistry obr) const

◆ calculatePrime2MeanField()

bool calculatePrime2MeanField ( const objectRegistry obr) const

◆ operator=()

void operator= ( const fieldAverageItem rhs)

Definition at line 220 of file fieldAverageItem.C.

Friends And Related Function Documentation

◆ operator==

bool operator== ( const fieldAverageItem a,
const fieldAverageItem b 
)
friend

Definition at line 371 of file fieldAverageItem.H.

◆ operator!=

bool operator!= ( const fieldAverageItem a,
const fieldAverageItem b 
)
friend

Definition at line 393 of file fieldAverageItem.H.

◆ operator>>

Istream& operator>> ( Istream ,
fieldAverageItem  
)
friend

◆ operator<<

Ostream& operator<< ( Ostream ,
const fieldAverageItem  
)
friend

Member Data Documentation

◆ EXT_MEAN

const Foam::word EXT_MEAN
static

Definition at line 164 of file fieldAverageItem.H.

Referenced by Foam::functionObjects::operator>>().

◆ EXT_PRIME2MEAN

const Foam::word EXT_PRIME2MEAN
static

Definition at line 167 of file fieldAverageItem.H.

Referenced by Foam::functionObjects::operator>>().


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