34 fieldName_(
"unknown"),
36 meanFieldName_(
"unknown"),
38 prime2MeanFieldName_(
"unknown"),
44 "Foam::functionObjects::fieldAverageItem::fieldAverageItem" 51 entry.
lookup(
"mean") >> mean_;
52 entry.
lookup(
"prime2Mean") >> prime2Mean_;
53 base_ = baseTypeNames_[entry.
lookup(
"base")];
57 meanFieldName_ = fieldName_ +
EXT_MEAN;
59 if ((window_ > 0) && (windowName_ !=
""))
61 meanFieldName_ = meanFieldName_ +
"_" + windowName_;
62 prime2MeanFieldName_ = prime2MeanFieldName_ +
"_" + windowName_;
77 "Foam::Istream& Foam::operator>>" 78 "(Foam::Istream&, Foam::functionObjects::fieldAverageItem&)" 83 faItem.fieldName_ = entry.
keyword();
84 entry.
lookup(
"mean") >> faItem.mean_;
85 entry.
lookup(
"prime2Mean") >> faItem.prime2Mean_;
86 faItem.base_ = faItem.baseTypeNames_[entry.
lookup(
"base")];
91 faItem.prime2MeanFieldName_ =
94 if ((faItem.window_ > 0) && (faItem.windowName_ !=
""))
96 faItem.meanFieldName_ =
97 faItem.meanFieldName_ +
"_" + faItem.windowName_;
99 faItem.prime2MeanFieldName_ =
100 faItem.prime2MeanFieldName_ +
"_" + faItem.windowName_;
114 "Foam::Ostream& Foam::operator<<" 115 "(Foam::Ostream&, const Foam::functionObjects::fieldAverageItem&)" 121 writeEntry(os,
"prime2Mean", faItem.prime2Mean_);
122 writeEntry(os,
"base", faItem.baseTypeNames_[faItem.base_]);
124 if (faItem.window_ > 0)
128 if (faItem.windowName_ !=
"")
130 writeEntry(os,
"windowName", faItem.windowName_);
138 "Foam::Ostream& Foam::operator<<" 139 "(Foam::Ostream&, const Foam::functionObjects::fieldAverageItem&)"
fieldAverageItem()
Construct null.
const keyType & keyword() const
Return keyword.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
static const dictionary null
Null dictionary.
baseType
Enumeration defining the averaging base type.
A keyword and a list of tokens is a 'dictionaryEntry'.
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
static const word EXT_PRIME2MEAN
Prime-squared average.
A class for handling words, derived from string.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
Helper class to describe what form of averaging to apply. A set will be applied to each base field in...
static const word EXT_MEAN
Mean average.
A keyword and a list of tokens is an 'entry'.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.