Go to the documentation of this file.
33 template<
class Thermo,
class Table>
38 std::initializer_list<const char*> cmptNames,
39 const word& thermoTypeName
45 auto cstrIter = tablePtr->find(thermoTypeName);
48 if (!cstrIter.found())
50 const int nCmpt = cmptNames.size();
57 validCmpts[0].
resize(nCmpt);
58 std::copy(cmptNames.begin(), cmptNames.end(), validCmpts[0].begin());
63 for (
const word& validName : tablePtr->sortedToc())
65 validCmpts[rowi] = Thermo::splitThermoName(validName, nCmpt);
67 if (validCmpts[rowi].size())
72 validCmpts.resize(rowi);
92 template<
class Thermo,
class Table>
103 Info<<
"Selecting thermodynamics package " << thermoTypeDict <<
endl;
105 if (thermoTypeDict.
found(
"properties"))
107 std::initializer_list<const char*> cmptNames
116 const word thermoTypeName
118 thermoTypeDict.
get<
word>(
"type") +
'<'
119 + thermoTypeDict.
get<
word>(
"mixture") +
'<'
120 + thermoTypeDict.
get<
word>(
"properties") +
','
121 + thermoTypeDict.
get<
word>(
"energy") +
">>"
124 return lookupThermo<Thermo, Table>
134 std::initializer_list<const char*> cmptNames
146 const word thermoTypeName
148 thermoTypeDict.
get<
word>(
"type") +
'<'
149 + thermoTypeDict.
get<
word>(
"mixture") +
'<'
150 + thermoTypeDict.
get<
word>(
"transport") +
'<'
151 + thermoTypeDict.
get<
word>(
"thermo") +
'<'
152 + thermoTypeDict.
get<
word>(
"equationOfState") +
'<'
153 + thermoTypeDict.
get<
word>(
"specie") +
">>,"
154 + thermoTypeDict.
get<
word>(
"energy") +
">>>"
157 return lookupThermo<Thermo, Table>
170 Info<<
"Selecting thermodynamics package " << thermoTypeName <<
endl;
173 auto cstrIter = tablePtr->find(thermoTypeName);
175 if (!cstrIter.found())
191 template<
class Thermo>
195 const word& phaseName
202 phasePropertyName(
dictName, phaseName),
203 mesh.time().constant(),
205 IOobject::MUST_READ_IF_MODIFIED,
212 lookupThermo<Thermo, typename Thermo::fvMeshConstructorTable>
215 Thermo::fvMeshConstructorTablePtr_
222 template<
class Thermo>
227 const word& phaseName
231 lookupThermo<Thermo, typename Thermo::dictionaryConstructorTable>
234 Thermo::dictionaryConstructorTablePtr_
241 template<
class Thermo>
245 const word& phaseName,
254 mesh.time().constant(),
256 IOobject::MUST_READ_IF_MODIFIED,
263 lookupThermo<Thermo, typename Thermo::fvMeshDictPhaseConstructorTable>
266 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,...
A class for handling words, derived from Foam::string.
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search for an entry (const access) with the given keyword.
const word dictName("blockMeshDict")
Ostream & endl(Ostream &os)
Add newline and flush stream.
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
messageStream Info
Information stream (uses stdout - output is on the master only)
Ostream & printTable(const UList< wordList > &tbl, List< std::string::size_type > &columnWidths, Ostream &os, bool headerSeparator=true)
Print a List of wordList as a table.
void resize(const label newSize)
Adjust allocated size of list.
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
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
static Table::iterator lookupThermo(const dictionary &thermoTypeDict, Table *tablePtr, std::initializer_list< const char * > cmptNames, const word &thermoTypeName)
Generic lookup for thermodynamics package thermoTypeName.