146#ifndef Foam_functionObjects_fieldAverage_H
147#define Foam_functionObjects_fieldAverage_H
231 template<
class Type1,
class Type2>
235 template<
class Type1,
class Type2>
249 template<
class Type1,
class Type2>
253 template<
class Type1,
class Type2>
257 template<
class Type1,
class Type2>
328 virtual bool write();
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
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 a number of values (eg,...
Helper class to describe what form of averaging to apply. A set will be applied to each base field in...
Computes ensemble- and/or time-based field averages, with optional windowing, for a user-specified se...
Switch periodicRestart_
Periodically restart the averaging process.
bool writeFieldType(const word &fieldName) const
Write fields.
TypeName("fieldAverage")
Runtime type information.
label prevTimeIndex_
Time at last call, prevents repeated averaging.
void writeAveragingProperties()
Write averaging properties - steps and time.
void restart()
Restart averaging for restartOnOutput.
void initialize()
Reset lists (clear existing values) and initialize averaging.
Switch restartOnRestart_
Restart the averaging process on restart.
virtual ~fieldAverage()=default
Destructor.
Switch restartOnOutput_
Restart the averaging process on output.
label periodIndex_
Index for periodic restart.
void writeFields() const
Write fields.
virtual void calcAverages()
Main calculation routine.
scalar restartPeriod_
Restart period.
bool addMeanField(fieldAverageItem &item)
Add mean average field to database.
scalar restartTime_
Specific restart time.
bool initialised_
Initialised flag.
void calculatePrime2MeanFields() const
Calculate prime-squared average fields.
List< scalar > totalTime_
Total time counter.
List< fieldAverageItem > faItems_
List of field average items, describing what averages to be calculated and output.
List< label > totalIter_
Iteration steps counter.
virtual bool read(const dictionary &dict)
Read the function-object dictionary.
bool addPrime2MeanField(fieldAverageItem &item)
Add prime-squared average field to database.
bool addPrime2MeanFieldType(fieldAverageItem &item)
Add prime-squared average field to database.
void operator=(const fieldAverage &)=delete
No copy assignment.
bool restoreWindowFieldsType(const fieldAverageItem &item)
bool addMeanFieldType(fieldAverageItem &item)
Add mean average field to database.
fieldAverage(const fieldAverage &)=delete
No copy construct.
bool addMeanSqrToPrime2MeanType(const fieldAverageItem &item) const
Add mean-squared field value to prime-squared mean field.
virtual void writeAverages() const
Write averages.
void readAveragingProperties()
Read averaging properties - steps and time.
virtual bool execute()
Execute the function-object operations.
virtual bool write()
Write the function-object results.
bool storeWindowFieldType(fieldAverageItem &item)
fieldAverage(const word &name, const Time &runTime, const dictionary &)
Construct from name, Time and dictionary.
void calculateMeanFields() const
Calculate mean average fields.
void restoreWindowFields(const fieldAverageItem &item)
void addMeanSqrToPrime2Mean() const
Add mean-squared field value to prime-squared mean field.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
fvMeshFunctionObject(const fvMeshFunctionObject &)=delete
No copy construct.
A class for handling words, derived from Foam::string.
Function objects are OpenFOAM utilities to ease workflow configurations and enhance workflows.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.