Go to the documentation of this file.
38 fieldName_(
"unknown"),
40 meanFieldName_(
"unknown"),
42 prime2MeanFieldName_(
"unknown"),
71 faItem.active_ =
false;
72 faItem.fieldName_ = dictEntry.
keyword();
73 faItem.mean_ =
dict.get<
bool>(
"mean");
74 faItem.prime2Mean_ =
dict.get<
bool>(
"prime2Mean");
75 faItem.base_ = faItem.baseTypeNames_.get(
"base",
dict);
76 faItem.window_ =
dict.getOrDefault<scalar>(
"window", -1);
78 if (faItem.window_ > 0)
80 faItem.windowType_ = faItem.windowTypeNames_.get(
"windowType",
dict);
87 && label(faItem.window_) < 1
91 <<
"Window must be 1 or more for base type "
96 faItem.windowName_ =
dict.getOrDefault<
word>(
"windowName",
"");
100 faItem.allowRestart_ =
dict.get<
bool>(
"allowRestart");
102 if (!faItem.allowRestart_)
105 << faItem.windowTypeNames_[faItem.windowType_]
106 <<
" windowing for field " << faItem.fieldName_
107 <<
" will not write intermediate files and restart will"
108 <<
" not be possible. To enable, please set"
109 <<
" 'allowRestart' to 'yes'"
127 faItem.prime2MeanFieldName_ =
130 if ((faItem.window_ > 0) && (!faItem.windowName_.empty()))
132 faItem.meanFieldName_ =
133 faItem.meanFieldName_ +
"_" + faItem.windowName_;
135 faItem.prime2MeanFieldName_ =
136 faItem.prime2MeanFieldName_ +
"_" + faItem.windowName_;
154 os.
writeEntry(
"prime2Mean", faItem.prime2Mean_);
155 os.
writeEntry(
"base", faItem.baseTypeNames_[faItem.base_]);
157 if (faItem.window_ > 0)
161 if (!faItem.windowName_.empty())
163 os.
writeEntry(
"windowName", faItem.windowName_);
169 faItem.windowTypeNames_[faItem.windowType_]
172 os.
writeEntry(
"allowRestart", faItem.allowRestart_);
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...
A class for handling words, derived from Foam::string.
const keyType & keyword() const
Return keyword.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual Ostream & beginBlock(const keyType &kw)
Write begin block group with the given name.
static const dictionary null
An empty dictionary, which is also the parent for all dictionaries.
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.
virtual Ostream & endBlock()
Write end block group.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
errorManipArg< error, int > exit(error &err, const int errNo=1)
Helper class to describe what form of averaging to apply. A set will be applied to each base field in...
static const word EXT_PRIME2MEAN
Prime-squared average.
fieldAverageItem()
Construct null.
virtual const dictionary & dict() const
Return dictionary.
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
#define WarningInFunction
Report a warning using Foam::Warning.
windowType
Enumeration defining the averaging window type.