43 const word Function1Type(coeffsDict.
lookup(
"type"));
45 typename dictionaryConstructorTable::iterator cstrIter =
46 dictionaryConstructorTablePtr_->find(Function1Type);
48 if (cstrIter == dictionaryConstructorTablePtr_->end())
51 <<
"Unknown Function1 type "
52 << Function1Type <<
" for Function1 "
54 <<
"Valid Function1 types are:" <<
nl
55 << dictionaryConstructorTablePtr_->sortedToc() <<
nl
59 return cstrIter()(
name,
units, coeffsDict);
70 const word Function1Type =
81 typename dictionaryConstructorTable::iterator dictCstrIter =
82 dictionaryConstructorTablePtr_->find(Function1Type);
84 if (dictCstrIter == dictionaryConstructorTablePtr_->end())
87 <<
"Unknown Function1 type "
88 << Function1Type <<
" for Function1 "
90 <<
"Valid Function1 types are:" <<
nl
91 << dictionaryConstructorTablePtr_->sortedToc() <<
nl
95 const bool haveCoeffsDict =
dict.found(
name +
"Coeffs");
110 <<
"Using deprecated "
111 << (
name +
"Coeffs") <<
" sub-dictionary."<<
nl
112 <<
" Please use the simpler form" <<
endl;
138 const word& Function1Type,
142 typename dictionaryConstructorTable::iterator dictCstrIter =
143 dictionaryConstructorTablePtr_->find(Function1Type);
144 const bool haveDictCstrIter =
145 dictCstrIter != dictionaryConstructorTablePtr_->end();
147 typename IstreamConstructorTable::iterator isCstrIter =
148 IstreamConstructorTablePtr_->find(Function1Type);
149 const bool haveIstreamCstrIter =
150 isCstrIter != IstreamConstructorTablePtr_->end();
152 if (!haveDictCstrIter && !haveIstreamCstrIter)
155 <<
"Unknown Function1 type "
156 << Function1Type <<
" for Function1 "
158 <<
"Valid Function1 types are:" <<
nl
159 << dictionaryConstructorTablePtr_->sortedToc() <<
nl
163 if (!haveIstreamCstrIter)
167 << Function1Type <<
" for Function1 "
168 <<
name <<
" cannot be specified inline" <<
nl <<
nl
169 <<
"Make " <<
name <<
" a sub-dictionary"
183 const word& Function1Type,
187 return New(
name, {xUnits, valueUnits}, Function1Type, is);
static autoPtr< Function1< Type > > New(const word &name, const Function1s::unitConversions &units, const dictionary &dict)
Select from dictionary.
Templated function 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.
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
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)
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
const HashTable< unitConversion > & units()
Get the table of unit conversions.