43 const word Function2Type(coeffsDict.
lookup(
"type"));
45 typename dictionaryConstructorTable::iterator cstrIter =
46 dictionaryConstructorTablePtr_->find(Function2Type);
48 if (cstrIter == dictionaryConstructorTablePtr_->end())
51 <<
"Unknown Function2 type "
52 << Function2Type <<
" for Function2 "
54 <<
"Valid Function2 types are:" <<
nl
55 << dictionaryConstructorTablePtr_->sortedToc() <<
nl
59 return cstrIter()(
name,
units, coeffsDict);
70 const word Function2Type =
81 typename dictionaryConstructorTable::iterator dictCstrIter =
82 dictionaryConstructorTablePtr_->find(Function2Type);
84 if (dictCstrIter == dictionaryConstructorTablePtr_->end())
87 <<
"Unknown Function2 type "
88 << Function2Type <<
" for Function2 "
90 <<
"Valid Function2 types are:" <<
nl
91 << dictionaryConstructorTablePtr_->sortedToc() <<
nl
109 return New(
name, {xUnits, yUnits, valueUnits},
dict);
118 const word& Function2Type,
122 typename dictionaryConstructorTable::iterator dictCstrIter =
123 dictionaryConstructorTablePtr_->find(Function2Type);
124 const bool haveDictCstrIter =
125 dictCstrIter != dictionaryConstructorTablePtr_->end();
127 typename IstreamConstructorTable::iterator isCstrIter =
128 IstreamConstructorTablePtr_->find(Function2Type);
129 const bool haveIstreamCstrIter =
130 isCstrIter != IstreamConstructorTablePtr_->end();
132 if (!haveDictCstrIter && !haveIstreamCstrIter)
135 <<
"Unknown Function2 type "
136 << Function2Type <<
" for Function2 "
138 <<
"Valid Function2 types are:" <<
nl
139 << dictionaryConstructorTablePtr_->sortedToc() <<
nl
143 if (!haveIstreamCstrIter)
147 <<
name <<
" cannot be specified inline" <<
nl <<
nl
148 <<
"Make " <<
name <<
" a sub-dictionary"
163 const word& Function2Type,
167 return New(
name, {xUnits, yUnits, valueUnits}, Function2Type, is);
static autoPtr< Function2< Type > > New(const word &name, const Function2s::unitConversions &units, const dictionary &dict)
Select from dictionary.
Templated function of two variables that returns a constant value.
bool eof() const
Return true if end of input seen.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void putBack(const token &)
Put back token.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A list of keyword definitions, which are a keyword followed by any number of values (e....
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
A token holds items read from Istream.
Unit conversion structure. Contains the associated dimensions and the multiplier with which to conver...
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
errorManipArg< error, int > exit(error &err, const int errNo=1)
word name(const bool)
Return a word representation of a bool.
const HashTable< unitConversion > & units()
Get the table of unit conversions.