Go to the documentation of this file.
33 template<
class Thermo,
class ThermoConstructTable>
34 typename ThermoConstructTable::mapped_type
35 Foam::basicThermo::getThermoOrDie
37 const dictionary& thermoTypeDict,
38 ThermoConstructTable& thermoTable,
39 const word& thermoTypeName,
45 auto ctorIter = thermoTable.cfind(thermoTypeName);
48 if (!ctorIter.found())
62 thermoTable.sortedToc()
68 return ctorIter.val();
72 template<
class Thermo,
class ThermoConstructTable>
73 typename ThermoConstructTable::mapped_type
74 Foam::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();
130 template<
class Thermo>
134 const word& phaseName
141 phasePropertyName(
dictName, phaseName),
150 auto* ctorPtr = getThermoOrDie<Thermo>
153 *(Thermo::fvMeshConstructorTablePtr_)
160 template<
class Thermo>
165 const word& phaseName
168 auto* ctorPtr = getThermoOrDie<Thermo>
171 *(Thermo::dictionaryConstructorTablePtr_)
178 template<
class Thermo>
182 const word& phaseName,
199 auto* ctorPtr = getThermoOrDie<Thermo>
202 *(Thermo::fvMeshDictPhaseConstructorTablePtr_)
dictionary * findDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX)
Find and return a sub-dictionary pointer if present.
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.
A class for handling words, derived from Foam::string.
const word dictName("faMeshDefinition")
Ostream & endl(Ostream &os)
Add newline and flush stream.
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
List< word > wordList
A List of words.
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
messageStream Info
Information stream (stdout output on master, null elsewhere)
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,...
static autoPtr< Thermo > New(const fvMesh &, const word &phaseName=word::null)
Generic New for each of the related thermodynamics packages.
Mesh data needed to do the Finite Volume discretisation.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
const dictionary & thermoDict
static const word null
An empty word.
const Time & time() const
Return the top-level database.
const word & constant() const
Return constant name.