117 #ifndef functionObjects_fieldAverage_H 118 #define functionObjects_fieldAverage_H 126 namespace functionObjects
130 class fieldAverageItem;
138 public fvMeshFunctionObject
202 template<
class Type1,
class Type2>
206 template<
class Type1,
class Type2>
224 template<
class Type1,
class Type2>
228 template<
class Type1,
class Type2>
232 template<
class Type1,
class Type2>
236 template<
class Type1,
class Type2>
293 virtual bool write();
void writeAveragingProperties() const
Write averaging properties - steps and time.
void addPrime2MeanFieldType(const label fieldi)
Add prime-squared average field to database.
void addMeanField(const label fieldi)
Add mean average field to database.
void addMeanSqrToPrime2MeanType(const label fieldi) const
Add mean-squared field value to prime-squared mean field.
virtual bool read(const dictionary &)
Read the field average data.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const word & name() const
Return the name of this functionObject.
A list of keyword definitions, which are a keyword followed by any number of values (e...
virtual bool write()
Write the field averages.
List< scalar > totalTime_
Total time counter.
Switch periodicRestart_
Periodically restart the averaging process.
scalar restartPeriod_
Restart period.
void calculatePrime2MeanFieldType(const label fieldi) const
Calculate prime-squared average fields.
void addMeanFieldType(const label fieldi)
Add mean average field to database.
void operator=(const fieldAverage &)=delete
Disallow default bitwise assignment.
virtual bool execute()
Calculate the field averages.
void calculateMeanFieldType(const label fieldi) const
Calculate mean average fields.
void calculatePrime2MeanFields() const
Calculate prime-squared average fields.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
label prevTimeIndex_
Time at last call, prevents repeated averaging.
void writeFields() const
Write fields.
Switch restartOnOutput_
Restart the averaging process on output.
List< label > totalIter_
Iteration steps counter.
fieldAverage(const word &name, const Time &runTime, const dictionary &)
Construct from Time and dictionary.
void writeFieldType(const word &fieldName) const
Write fields.
void readAveragingProperties()
Read averaging properties - steps and time.
A class for handling words, derived from string.
Calculates average quantities for a user-specified selection of volumetric and surface fields...
List< fieldAverageItem > faItems_
List of field average items, describing what averages to be.
virtual void calcAverages()
Main calculation routine.
void calculateMeanFields() const
Calculate mean average fields.
void initialize()
Reset lists (clear existing values) and initialize averaging.
Switch restartOnRestart_
Restart the averaging process on restart.
void addPrime2MeanField(const label fieldi)
Add prime-squared average field to database.
void resetFields()
Checkout fields (causes deletion) from the database.
label periodIndex_
Index for periodic restart.
void restart()
Restart averaging for restartOnOutput.
TypeName("fieldAverage")
Runtime type information.
void addMeanSqrToPrime2Mean() const
Add mean-squared field value to prime-squared mean field.
virtual ~fieldAverage()
Destructor.
bool initialised_
Initialised flag.
virtual void writeAverages() const
Write averages.