107 #ifndef functionObjects_fieldAverage_H
108 #define functionObjects_fieldAverage_H
116 namespace functionObjects
120 class fieldAverageItem;
128 public fvMeshFunctionObject
219 template<
class Type1,
class Type2>
223 template<
class Type1,
class Type2>
227 template<
class Type1,
class Type2>
231 template<
class Type1,
class Type2>
249 template<
class Type1,
class Type2>
253 template<
class Type1,
class Type2>
257 template<
class Type1,
class Type2>
261 template<
class Type1,
class Type2>
358 virtual bool write();
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A list of keyword definitions, which are a keyword followed by any number of values (e....
const word & name() const
Return the name of this functionObject.
Helper class to describe what form of averaging to apply. A set will be applied to each base field in...
Calculates average quantities for a user-specified selection of volumetric and surface fields.
Switch periodicRestart_
Periodically restart the averaging process.
baseType
Enumeration defining the averaging base type.
void readPrime2MeanField(const label fieldi)
Read the prime-squared average field.
void initialiseMeanField(const label fieldi)
Initialise the mean average field.
Switch prime2Mean_
Compute prime-squared mean flag.
TypeName("fieldAverage")
Runtime type information.
const word & windowName() const
label prevTimeIndex_
Time at last call, prevents repeated averaging.
void initialise()
Reset lists (clear existing values) and initialise averaging.
void readMeanFieldType(const label fieldi)
Read the mean average field.
void restart()
Restart averaging for restartOnOutput.
const word base() const
Return averaging base type name.
Switch restartOnRestart_
Restart the averaging process on restart.
Switch restartOnOutput_
Restart the averaging process on output.
label periodIndex_
Index for periodic restart.
static const NamedEnum< baseType, 2 > baseTypeNames_
Averaging base type names.
void writeFields() const
Write fields.
virtual void calcAverages()
Main calculation routine.
scalar restartPeriod_
Restart period.
virtual wordList fields() const
Return the list of fields required.
virtual ~fieldAverage()
Destructor.
void readPrime2MeanFieldType(const label fieldi)
Read the prime-squared average field.
Switch iterBase() const
Return true if base is iter.
void read(const dictionary &dict, const bool construct)
Read.
void calculatePrime2MeanFields() const
Calculate prime-squared average fields.
List< scalar > totalTime_
Total time counter.
List< label > totalIter_
Iteration steps counter.
void initialisePrime2MeanFieldType(const label fieldi)
Initialise the prime-squared average field.
void operator=(const fieldAverage &)=delete
Disallow default bitwise assignment.
Switch timeBase() const
Return true if base is time.
PtrList< fieldAverageItem > faItems_
List of field average items, describing what averages to be.
baseType base_
Averaging base type.
void addMeanSqrToPrime2MeanType(const label fieldi) const
Add mean-squared field value to prime-squared mean field.
scalar window_
Averaging window - defaults to -1 for 'all iters/time'.
void readMeanField(const label fieldi)
Read the mean average field.
Switch mean_
Compute mean flag.
void calculatePrime2MeanFieldType(const label fieldi) const
Calculate prime-squared average fields.
virtual void writeAverages() const
Write averages.
void writeFieldType(const word &fieldName) const
Write fields.
virtual bool executeAtStart() const
Do not average at the start of the run.
void calculateMeanFieldType(const label fieldi) const
Calculate mean average fields.
void initialiseMeanFieldType(const label fieldi)
Initialise the mean average field.
virtual bool execute()
Calculate the field averages.
virtual bool write()
Write the field averages.
void initialisePrime2MeanField(const label fieldi)
Initialise the prime-squared average field.
fieldAverage(const word &name, const Time &runTime, const dictionary &)
Construct from Time and dictionary.
word windowName_
Averaging window name - defaults to 'window'.
void calculateMeanFields() const
Calculate mean average fields.
void addMeanSqrToPrime2Mean() const
Add mean-squared field value to prime-squared mean field.
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.