33template<
class Thermo,
class ThermoConstructTable>
34typename ThermoConstructTable::mapped_type
35Foam::basicThermo::getThermoOrDie
37 const dictionary& thermoTypeDict,
38 ThermoConstructTable& thermoTable,
39 const word& thermoTypeName,
40 const wordList& cmptNames
45 auto ctorIter = thermoTable.cfind(thermoTypeName);
48 if (!ctorIter.found())
62 thermoTable.sortedToc()
68 return ctorIter.val();
72template<
class Thermo,
class ThermoConstructTable>
73typename ThermoConstructTable::mapped_type
74Foam::basicThermo::getThermoOrDie
77 ThermoConstructTable& thermoTable
84 const auto& thermoTypeDict = *dictptr;
89 const word thermoTypeName
91 basicThermo::makeThermoName(thermoTypeDict, cmptHeaderPtr)
94 Info<<
"Selecting thermodynamics package " << thermoTypeDict <<
endl;
96 return getThermoOrDie<Thermo, ThermoConstructTable>
106 const word thermoTypeName(
thermoDict.
get<word>(
"thermoType"));
108 Info<<
"Selecting thermodynamics package " << thermoTypeName <<
endl;
110 auto ctorIter = thermoTable.cfind(thermoTypeName);
112 if (!ctorIter.found())
123 return ctorIter.val();
130template<
class Thermo>
134 const word& phaseName
141 phasePropertyName(
dictName, phaseName),
150 auto* ctorPtr = getThermoOrDie<Thermo>
153 *(Thermo::fvMeshConstructorTablePtr_)
160template<
class Thermo>
165 const word& phaseName
168 auto* ctorPtr = getThermoOrDie<Thermo>
171 *(Thermo::dictionaryConstructorTablePtr_)
178template<
class Thermo>
182 const word& phaseName,
199 auto* ctorPtr = getThermoOrDie<Thermo>
202 *(Thermo::fvMeshDictPhaseConstructorTablePtr_)
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Defines the attributes of an object for which implicit objectRegistry management is supported,...
static const List< word > & null()
Return a null List.
const word & constant() const
Return constant name.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
static Ostream & printThermoNames(Ostream &os, const wordList &cmptNames, const wordList &thermoNames)
Print (filtered) table of thermo names, splits on " ,<>".
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
dictionary * findDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX)
Find and return a sub-dictionary pointer if present.
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
A class for handling words, derived from Foam::string.
static const word null
An empty word.
const dictionary & thermoDict
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
const word dictName("faMeshDefinition")
List< word > wordList
A List of words.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManipArg< error, int > exit(error &err, const int errNo=1)