Go to the documentation of this file.
83 #ifndef fieldAverageItem_H
84 #define fieldAverageItem_H
100 namespace functionObjects
104 class fieldAverageItem;
105 Istream&
operator>>(Istream&, fieldAverageItem&);
106 Ostream&
operator<<(Ostream&,
const fieldAverageItem&);
112 class fieldAverageItem
163 word prime2MeanFieldName_;
222 inline bool active()
const;
231 inline bool mean()
const;
264 inline scalar
window()
const;
279 inline scalar
dt(
const scalar deltaT)
const;
282 inline scalar
Dt()
const;
288 inline bool inWindow(
const scalar t)
const;
316 template<
class Type1,
class Type2>
327 friend bool operator==
334 a.active_ ==
b.active_
335 && a.fieldName_ ==
b.fieldName_
336 && a.mean_ ==
b.mean_
337 && a.meanFieldName_ ==
b.meanFieldName_
338 && a.prime2Mean_ ==
b.prime2Mean_
339 && a.prime2MeanFieldName_ ==
b.prime2MeanFieldName_
340 && a.base_ ==
b.base_
341 && a.totalIter_ ==
b.totalIter_
342 && a.totalTime_ ==
b.totalTime_
343 && a.window_ ==
b.window_
344 && a.windowName_ ==
b.windowName_
345 && a.windowType_ ==
b.windowType_
346 && a.allowRestart_ ==
b.allowRestart_;
349 friend bool operator!=
friend Istream & operator>>(Istream &, fieldAverageItem &)
bool calculatePrime2MeanField(const objectRegistry &obr) const
Calculate prime-squared average fields.
const FIFOStack< scalar > & windowTimes() const
Return the list of window times (windowType = EXACT)
A class for handling words, derived from Foam::string.
void setPrime2MeanFieldName(const word &name)
Set the prime-squared mean field name.
void writeState(dictionary &dict) const
Write state for restart.
~fieldAverageItem()
Destructor.
bool writeWindowFields() const
Return true if we wish to write window fields.
bool readState(const dictionary &dict)
Read state and re-initialise values.
Ostream & operator<<(Ostream &, const fieldInfo &)
scalar dt(const scalar deltaT) const
Return the current time interval.
Istream & operator>>(Istream &, fieldInfo &)
void operator=(const fieldAverageItem &)
const word & fieldName() const
Return const access to the field name.
bool allowRestart() const
Return the allow restart flag.
bool storeWindowFields() const
Return true if we wish to store window fields.
label totalIter() const
Return the total number of iterations item has been evolved.
Registry of regIOobjects.
void addToWindow(const word &fieldName, const scalar deltaT)
Add field to window.
const word & meanFieldName() const
Return const access to the mean field name.
void clear(const objectRegistry &obr, const bool fullClean)
Clear out all mean fields and (optionally) supporting data.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
baseType
Enumeration defining the averaging base type.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
static const word EXT_MEAN
Mean average.
bool mean() const
Return const access to the mean flag.
bool inWindow(const scalar t) const
Return true if time is inside window (including boundaries)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const word & windowName() const
Return the (optional) window name.
bool active() const
Return const access to the active flag.
void setMeanFieldName(const word &name)
Set the mean field name.
Helper class to describe what form of averaging to apply. A set will be applied to each base field in...
friend Ostream & operator<<(Ostream &, const fieldAverageItem &)
static const word EXT_PRIME2MEAN
Prime-squared average.
bool prime2Mean() const
Return const access to the prime-squared mean flag.
scalar totalTime() const
Return the total time item has been evolved.
scalar window() const
Return the window length (iterations or seconds)
fieldAverageItem()
Construct null.
scalar Dt() const
Return the total time interval.
const word & prime2MeanFieldName() const
Return const access to the prime-squared mean field name.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
bool calculateMeanField(const objectRegistry &obr) const
Calculate the mean field value.
const FIFOStack< word > & windowFieldNames() const
Return the list of window field names (windowType = EXACT)
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
void evolve(const objectRegistry &obr)
Evolve and update.
windowType
Enumeration defining the averaging window type.
word windowFieldName(const word &prefix) const
Helper function to construct a window field name.
const word & base() const
Return averaging base type name.