39 { mappingMode::NONE,
"none" },
40 { mappingMode::FUNCTION1,
"function" },
41 { mappingMode::MINMAX,
"minMax" },
50 const dictionary& coeffs
53 mappingMode_ = mappingModeNames_.get(
"mode", coeffs);
57 case mappingMode::NONE:
61 case mappingMode::FUNCTION1:
63 mappingValuePtr_.reset
65 Function1<scalar>::New(
"function", coeffs, this->obrPtr_)
70 case mappingMode::MINMAX:
72 min_ = coeffs.get<scalar>(
"min");
73 max_ = coeffs.get<scalar>(
"max");
80 <<
"Unhandled enumeration " << mappingModeNames_[mappingMode_]
81 <<
". Available options are: " << mappingModeNames_.sortedToc()
93 const word& entryName,
99 mappingMode_(mappingMode::NONE),
100 mappingValuePtr_(nullptr),
116 mappingMode_(rhs.mappingMode_),
117 mappingValuePtr_(rhs.mappingValuePtr_.clone()),
120 value_(rhs.value_.clone())
132 os.writeEntry(
"mode", mappingModeNames_[mappingMode_]);
134 switch (mappingMode_)
136 case mappingMode::NONE:
140 case mappingMode::FUNCTION1:
142 mappingValuePtr_->writeData(
os);
146 case mappingMode::MINMAX:
148 os.writeEntry(
"min", min_);
149 os.writeEntry(
"max", max_);
156 <<
"Unhandled enumeration " << mappingModeNames_[mappingMode_]
157 <<
". Available options are: " << mappingModeNames_.sortedToc()
162 value_->writeData(
os);
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
const bool writeData(pdfDictionary.get< bool >("writeData"))
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
A class for handling words, derived from Foam::string.
errorManip< error > abort(error &err)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Registry of regIOobjects.