83 #ifndef fieldAverageItem_H 84 #define fieldAverageItem_H 98 namespace functionObjects
102 class fieldAverageItem;
103 Istream&
operator>>(Istream&, fieldAverageItem&);
104 Ostream&
operator<<(Ostream&,
const fieldAverageItem&);
110 class fieldAverageItem
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!=
fieldAverageItem()
Construct null.
const word & meanFieldName() const
Return const access to the mean field name.
friend Istream & operator>>(Istream &, fieldAverageItem &)
friend Ostream & operator<<(Ostream &, const fieldAverageItem &)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
void setMeanFieldName(const word &name)
Set the mean field name.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
baseType
Enumeration defining the averaging base type.
bool mean() const
Return const access to the mean flag.
scalar totalTime() const
Return the total time item has been evolved.
bool allowRestart() const
Return the allow restart flag.
word windowFieldName(const word &prefix) const
Helper function to construct a window field name.
const word & windowName() const
Return the (optional) window name.
scalar window() const
Return the window length (iterations or seconds)
const word & base() const
Return averaging base type name.
scalar dt(const scalar deltaT) const
Return the current time interval.
bool active() const
Return const access to the active flag.
bool readState(const dictionary &dict)
Read state and re-initialise values.
scalar Dt() const
Return the total time interval.
static const word EXT_PRIME2MEAN
Prime-squared average.
const word & fieldName() const
Return const access to the field name.
~fieldAverageItem()
Destructor.
void operator=(const fieldAverageItem &)
void addToWindow(const word &fieldName, const scalar deltaT)
Add field to window.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
void writeState(dictionary &dict) const
Write state for restart.
Ostream & operator<<(Ostream &, const fieldInfo &)
bool inWindow(const scalar t) const
Return true if time is inside window (including boundaries)
Istream & operator>>(Istream &, fieldInfo &)
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
A class for handling words, derived from Foam::string.
const FIFOStack< scalar > & windowTimes() const
Return the list of window times (windowType = EXACT)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
const FIFOStack< word > & windowFieldNames() const
Return the list of window field names (windowType = EXACT)
void evolve(const objectRegistry &obr)
Evolve and update.
const word & prime2MeanFieldName() const
Return const access to the prime-squared mean field name.
void setPrime2MeanFieldName(const word &name)
Set the prime-squared mean field name.
bool storeWindowFields() const
Return true if we wish to store window fields.
Helper class to describe what form of averaging to apply. A set will be applied to each base field in...
void clear(const objectRegistry &obr, const bool fullClean)
Clear out all mean fields and (optionally) supporting data.
Registry of regIOobjects.
label totalIter() const
Return the total number of iterations item has been evolved.
windowType
Enumeration defining the averaging window type.
bool prime2Mean() const
Return const access to the prime-squared mean flag.
bool calculatePrime2MeanField(const objectRegistry &obr) const
Calculate prime-squared average fields.
bool writeWindowFields() const
Return true if we wish to write window fields.
static const word EXT_MEAN
Mean average.
bool calculateMeanField(const objectRegistry &obr) const
Calculate the mean field value.