43 const word Function2Type(coeffDict.
lookup(
"type"));
45 if (printDictionary::prints(coeffDict))
48 << Function2Type <<
endl;
51 typename dictionaryConstructorTable::iterator cstrIter =
52 dictionaryConstructorTablePtr_->find(Function2Type);
54 if (cstrIter == dictionaryConstructorTablePtr_->end())
57 <<
"Unknown Function2 type "
58 << Function2Type <<
" for Function2 "
60 <<
"Valid Function2 types are:" <<
nl
61 << dictionaryConstructorTablePtr_->sortedToc() <<
nl
67 return cstrIter()(
name, units, coeffDict);
78 const word Function2Type =
85 return New(
name, units, Function2Type, is);
89 typename dictionaryConstructorTable::iterator dictCstrIter =
90 dictionaryConstructorTablePtr_->find(Function2Type);
92 if (dictCstrIter == dictionaryConstructorTablePtr_->end())
95 <<
"Unknown Function2 type "
96 << Function2Type <<
" for Function2 "
98 <<
"Valid Function2 types are:" <<
nl
99 << dictionaryConstructorTablePtr_->sortedToc() <<
nl
103 return dictCstrIter()(
name, units,
dict);
117 return New(
name, {xUnits, yUnits, valueUnits},
dict);
126 const word& Function2Type,
130 typename dictionaryConstructorTable::iterator dictCstrIter =
131 dictionaryConstructorTablePtr_->find(Function2Type);
132 const bool haveDictCstrIter =
133 dictCstrIter != dictionaryConstructorTablePtr_->end();
135 typename IstreamConstructorTable::iterator isCstrIter =
136 IstreamConstructorTablePtr_->find(Function2Type);
137 const bool haveIstreamCstrIter =
138 isCstrIter != IstreamConstructorTablePtr_->end();
140 if (!haveDictCstrIter && !haveIstreamCstrIter)
143 <<
"Unknown Function2 type "
144 << Function2Type <<
" for Function2 "
146 <<
"Valid Function2 types are:" <<
nl
147 << dictionaryConstructorTablePtr_->sortedToc() <<
nl
151 if (!haveIstreamCstrIter)
155 <<
name <<
" cannot be specified inline" <<
nl <<
nl
156 <<
"Make " <<
name <<
" a sub-dictionary"
160 return isCstrIter()(
name, units, is);
171 const word& Function2Type,
175 return New(
name, {xUnits, yUnits, valueUnits}, Function2Type, is);
static autoPtr< Function2< Type > > New(const word &name, const Function2s::unitSets &units, const dictionary &dict)
Select from dictionary.
Templated function of two variables that returns a constant value.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void putBack(const token &)
Put back token.
bool eof() const
Return true if end of input seen.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Enables the printing of a dictionary and subsequently looked-up defaulted entries.
A token holds items read from Istream.
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
Unit conversion structure. Contains the associated dimensions and the multiplier with which to conver...
A class for handling words, derived from string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
Ostream & indent(Ostream &os)
Indent stream.
tmp< DimensionedField< TypeR, GeoMesh, Field > > New(const tmp< DimensionedField< TypeR, GeoMesh, Field >> &tdf1, const word &name, const dimensionSet &dimensions)