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...
Public Types | |
enum | baseType { ITER, TIME } |
enum | windowType { NONE, APPROXIMATE, EXACT } |
Public Member Functions | |
fieldAverageItem () | |
fieldAverageItem (Istream &) | |
fieldAverageItem (const fieldAverageItem &) | |
~fieldAverageItem () | |
bool | active () const |
bool & | active () |
const word & | fieldName () const |
bool | mean () const |
bool & | mean () |
const word & | meanFieldName () const |
void | setMeanFieldName (const word &name) |
bool | prime2Mean () const |
bool & | prime2Mean () |
const word & | prime2MeanFieldName () const |
void | setPrime2MeanFieldName (const word &name) |
const word & | base () const |
label | totalIter () const |
scalar | totalTime () const |
scalar | window () const |
const word & | windowName () 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) |
Istream & | operator>> (Istream &, fieldAverageItem &) |
Ostream & | operator<< (Ostream &, const fieldAverageItem &) |
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.
<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
prime2Mean
option, the mean
option must be enabled.Definition at line 155 of file fieldAverageItem.H.
|
strong |
Enumerator | |
---|---|
ITER | |
TIME |
Definition at line 171 of file fieldAverageItem.H.
|
strong |
Enumerator | |
---|---|
NONE | |
APPROXIMATE | |
EXACT |
Definition at line 178 of file fieldAverageItem.H.
fieldAverageItem | ( | ) |
Definition at line 63 of file fieldAverageItem.C.
fieldAverageItem | ( | Istream & | is | ) |
Definition at line 28 of file fieldAverageItemIO.C.
fieldAverageItem | ( | const fieldAverageItem & | faItem | ) |
Definition at line 85 of file fieldAverageItem.C.
~fieldAverageItem | ( | ) |
Definition at line 110 of file fieldAverageItem.C.
|
inline |
Definition at line 23 of file fieldAverageItemI.H.
Referenced by fieldAverage::addMeanFieldType().
|
inline |
|
inline |
Definition at line 35 of file fieldAverageItemI.H.
Referenced by fieldAverage::addMeanFieldType(), fieldAverage::addMeanSqrToPrime2MeanType(), fieldAverage::addPrime2MeanField(), fieldAverage::addPrime2MeanFieldType(), fieldAverage::restoreWindowFieldsType(), and fieldAverage::storeWindowFieldType().
|
inline |
Definition at line 41 of file fieldAverageItemI.H.
Referenced by fieldAverage::addMeanField(), fieldAverage::addMeanFieldType(), fieldAverage::addPrime2MeanField(), and fieldAverage::writeFields().
|
inline |
|
inline |
Definition at line 54 of file fieldAverageItemI.H.
Referenced by fieldAverage::addMeanFieldType(), fieldAverage::addMeanSqrToPrime2MeanType(), fieldAverage::addPrime2MeanFieldType(), and fieldAverage::writeFields().
|
inline |
Definition at line 61 of file fieldAverageItemI.H.
References Foam::name().
|
inline |
Definition at line 69 of file fieldAverageItemI.H.
Referenced by fieldAverage::addMeanSqrToPrime2Mean(), fieldAverage::addPrime2MeanField(), fieldAverage::addPrime2MeanFieldType(), and fieldAverage::writeFields().
|
inline |
|
inline |
Definition at line 82 of file fieldAverageItemI.H.
Referenced by fieldAverage::addMeanSqrToPrime2MeanType(), fieldAverage::addPrime2MeanFieldType(), and fieldAverage::writeFields().
|
inline |
Definition at line 89 of file fieldAverageItemI.H.
References Foam::name().
|
inline |
Definition at line 97 of file fieldAverageItemI.H.
|
inline |
Definition at line 103 of file fieldAverageItemI.H.
|
inline |
Definition at line 109 of file fieldAverageItemI.H.
|
inline |
Definition at line 115 of file fieldAverageItemI.H.
Referenced by fieldAverage::restoreWindowFields().
|
inline |
Definition at line 121 of file fieldAverageItemI.H.
|
inline |
Definition at line 128 of file fieldAverageItemI.H.
|
inline |
Definition at line 135 of file fieldAverageItemI.H.
Referenced by fieldAverage::restoreWindowFieldsType(), and fieldAverage::writeFields().
|
inline |
Definition at line 141 of file fieldAverageItemI.H.
|
inline |
Definition at line 148 of file fieldAverageItemI.H.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.
|
inline |
Definition at line 174 of file fieldAverageItemI.H.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.
|
inline |
Definition at line 199 of file fieldAverageItemI.H.
References Foam::name().
Referenced by fieldAverage::storeWindowFieldType().
|
inline |
Definition at line 207 of file fieldAverageItemI.H.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.
|
inline |
Definition at line 232 of file fieldAverageItemI.H.
Referenced by fieldAverage::storeWindowFields().
|
inline |
Definition at line 238 of file fieldAverageItemI.H.
Referenced by fieldAverage::writeFields().
void addToWindow | ( | const word & | fieldName, |
const scalar | deltaT | ||
) |
Definition at line 117 of file fieldAverageItem.C.
Referenced by fieldAverage::storeWindowFieldType().
void evolve | ( | const objectRegistry & | obr | ) |
Definition at line 127 of file fieldAverageItem.C.
References objectRegistry::checkOut(), TimeState::deltaTValue(), forAllIters, and objectRegistry::time().
void clear | ( | const objectRegistry & | obr, |
const bool | fullClean | ||
) |
Definition at line 156 of file fieldAverageItem.C.
References objectRegistry::checkOut().
bool readState | ( | const dictionary & | dict | ) |
Definition at line 186 of file fieldAverageItem.C.
References dict.
void writeState | ( | dictionary & | dict | ) | const |
Definition at line 202 of file fieldAverageItem.C.
References dict.
bool calculateMeanField | ( | const objectRegistry & | obr | ) | const |
Definition at line 26 of file fieldAverageItemTemplates.C.
References Foam::abort(), beta(), TimeState::deltaTValue(), Foam::FatalError, FatalErrorInFunction, objectRegistry::findObject(), objectRegistry::lookupObject(), objectRegistry::lookupObjectRef(), n, and objectRegistry::time().
Referenced by fieldAverage::calculateMeanFields().
bool calculatePrime2MeanField | ( | const objectRegistry & | obr | ) | const |
Definition at line 161 of file fieldAverageItemTemplates.C.
References Foam::abort(), beta(), TimeState::deltaTValue(), Foam::FatalError, FatalErrorInFunction, objectRegistry::findObject(), objectRegistry::lookupObject(), objectRegistry::lookupObjectRef(), Foam::sqr(), and objectRegistry::time().
Referenced by fieldAverage::calculatePrime2MeanFields().
void operator= | ( | const fieldAverageItem & | rhs | ) |
Definition at line 220 of file fieldAverageItem.C.
|
friend |
Definition at line 371 of file fieldAverageItem.H.
|
friend |
Definition at line 393 of file fieldAverageItem.H.
|
friend |
|
friend |
|
static |
Definition at line 164 of file fieldAverageItem.H.
Referenced by Foam::functionObjects::operator>>().
|
static |
Definition at line 167 of file fieldAverageItem.H.
Referenced by Foam::functionObjects::operator>>().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.