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()
86 value_ = Function1<Type>::New(
"value", coeffs, this->obrPtr_);
93 const word& entryName,
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);
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
const word const dictionary & dict
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
virtual bool read()
Re-read model coefficients if they have changed.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Registry of regIOobjects.
A class for handling words, derived from Foam::string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
errorManip< error > abort(error &err)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.