37 auto unknown = [&](
const word& modelTypeName)
40 <<
"Unknown " <<
typeName <<
" type "
43 << dictionaryConstructorTablePtr_->sortedToc()
47 const bool isDict =
dict.isDict(
name);
67 dictionaryConstructorTable::iterator dictCstrIter =
68 dictionaryConstructorTablePtr_->find(modelTypeName);
69 if (dictCstrIter == dictionaryConstructorTablePtr_->end())
71 unknown(modelTypeName);
74 ConstructorTable::iterator cstrIter =
75 ConstructorTablePtr_->find(modelTypeName);
76 if (cstrIter == ConstructorTablePtr_->end())
79 <<
name <<
" must be a sub-dictionary in order to select a "
80 <<
typeName <<
" of type " << modelTypeName
95 <<
"Selecting " <<
typeName <<
" " << modelTypeName <<
endl;
97 dictionaryConstructorTable::iterator cstrIter =
98 dictionaryConstructorTablePtr_->find(modelTypeName);
100 if (cstrIter == dictionaryConstructorTablePtr_->end())
102 unknown(modelTypeName);
107 return cstrIter()(modelCoeffsDict);
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.
const dictionary & optionalTypeDict(const word &typeName) const
Find and return an optional type sub-dictionary.
Enables the printing of a dictionary and subsequently looked-up defaulted entries.
Constant saturation pressure model.
static autoPtr< saturationPressureModel > New(const word &name, const dictionary &dict)
Select with name within a dictionary.
A token holds items read from Istream.
const word & wordToken() const
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
A class for handling words, derived from string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet & dimPressure
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
Ostream & indentOrNl(Ostream &os)
Indent stream or add newline if indent level == 0.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.