83#ifndef Foam_functionObjects_fieldAverageItem_H
84#define Foam_functionObjects_fieldAverageItem_H
161 word prime2MeanFieldName_;
220 inline bool active()
const;
229 inline bool mean()
const;
262 inline scalar
window()
const;
277 inline scalar
dt(
const scalar deltaT)
const;
280 inline scalar
Dt()
const;
286 inline bool inWindow(
const scalar t)
const;
314 template<
class Type1,
class Type2>
325 friend bool operator==
332 a.active_ ==
b.active_
333 && a.fieldName_ ==
b.fieldName_
334 && a.mean_ ==
b.mean_
335 && a.meanFieldName_ ==
b.meanFieldName_
336 && a.prime2Mean_ ==
b.prime2Mean_
337 && a.prime2MeanFieldName_ ==
b.prime2MeanFieldName_
338 && a.base_ ==
b.base_
339 && a.totalIter_ ==
b.totalIter_
340 && a.totalTime_ ==
b.totalTime_
341 && a.window_ ==
b.window_
342 && a.windowName_ ==
b.windowName_
343 && a.windowType_ ==
b.windowType_
344 && a.allowRestart_ ==
b.allowRestart_;
347 friend bool operator!=
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
A FIFO stack based on a singly-linked list.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
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...
bool calculatePrime2MeanField(const objectRegistry &obr) const
Calculate prime-squared average fields.
baseType
Enumeration defining the averaging base type.
bool allowRestart() const
Return the allow restart flag.
const FIFOStack< word > & windowFieldNames() const
Return the list of window field names (windowType = EXACT).
const word & base() const
Return averaging base type name.
const word & fieldName() const
Return const access to the field name.
bool writeWindowFields() const
Return true if we wish to write window fields.
bool mean() const
Return const access to the mean flag.
friend Istream & operator>>(Istream &, fieldAverageItem &)
static const word EXT_PRIME2MEAN
Prime-squared average.
void evolve(const objectRegistry &obr)
Evolve and update.
bool storeWindowFields() const
Return true if we wish to store window fields.
const word & windowName() const
Return the (optional) window name.
windowType
Enumeration defining the averaging window type.
bool inWindow(const scalar t) const
Return true if time is inside window (including boundaries).
friend Ostream & operator<<(Ostream &, const fieldAverageItem &)
scalar totalTime() const
Return the total time item has been evolved.
void addToWindow(const word &fieldName, const scalar deltaT)
Add field to window.
scalar window() const
Return the window length (iterations or seconds).
scalar dt(const scalar deltaT) const
Return the current time interval.
label totalIter() const
Return the total number of iterations item has been evolved.
~fieldAverageItem()
Destructor.
scalar Dt() const
Return the total time interval.
word windowFieldName(const word &prefix) const
Helper function to construct a window field name.
void setPrime2MeanFieldName(const word &name)
Set the prime-squared mean field name.
bool calculateMeanField(const objectRegistry &obr) const
Calculate the mean field value.
bool prime2Mean() const
Return const access to the prime-squared mean flag.
void setMeanFieldName(const word &name)
Set the mean field name.
fieldAverageItem()
Construct null.
const FIFOStack< scalar > & windowTimes() const
Return the list of window times (windowType = EXACT).
const word & prime2MeanFieldName() const
Return const access to the prime-squared mean field name.
bool active() const
Return const access to the active flag.
void writeState(dictionary &dict) const
Write state for restart.
const word & meanFieldName() const
Return const access to the mean field name.
void operator=(const fieldAverageItem &)
static const word EXT_MEAN
Mean average.
bool readState(const dictionary &dict)
Read state and re-initialise values.
Registry of regIOobjects.
A class for handling words, derived from Foam::string.
Function objects are OpenFOAM utilities to ease workflow configurations and enhance workflows.
Ostream & operator<<(Ostream &, const fieldInfo &)
Istream & operator>>(Istream &, fieldInfo &)
lduMatrix::solver baseType
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.