33template<
class Thermo,
class ThermoConstructTable>
34typename ThermoConstructTable::mapped_type
35Foam::basicThermo::getThermoOrDie
38 ThermoConstructTable& thermoTable,
39 const word& thermoTypeName,
40 const wordList& cmptNames
45 auto ctorIter = thermoTable.cfind(thermoTypeName);
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>
108 Info<<
"Selecting thermodynamics package " << thermoTypeName <<
endl;
110 auto ctorIter = thermoTable.cfind(thermoTypeName);
112 if (!ctorIter.good())
123 return ctorIter.val();
130template<
class Thermo>
134 const word& phaseName
141 phasePropertyName(
dictName, phaseName),
142 mesh.time().constant(),
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,
191 mesh.time().constant(),
199 auto* ctorPtr = getThermoOrDie<Thermo>
202 *(Thermo::fvMeshDictPhaseConstructorTablePtr_)
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
IOdictionary(const IOobject &io, const dictionary *fallback=nullptr)
Construct given an IOobject and optional fallback dictionary content.
@ NO_REGISTER
Do not request registration (bool: false).
@ MUST_READ
Reading required.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
static const List< word > & null() noexcept
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 " ,<>".
static word phasePropertyName(const word &name, const word &phaseName)
The phase property name as property.phase.
static const word dictName
The dictionary name ("thermophysicalProperties").
static autoPtr< Thermo > New(const fvMesh &, const word &phaseName=word::null)
Generic New for each of the related thermodynamics packages.
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
Find and return a T. FatalIOError if not found, or if the number of tokens is incorrect.
const dictionary * findDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary pointer if present (and it is a dictionary) otherwise return nullptr...
Mesh data needed to do the Finite Volume discretisation.
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
List of word.
messageStream Info
Information stream (stdout output on master, null elsewhere).
Ostream & endl(Ostream &os)
Add newline and flush stream.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
errorManipArg< error, int > exit(error &err, const int errNo=1)