Go to the documentation of this file.
30 template<
class Thermo,
class Table>
39 if (thermoDict.
isDict(
"thermoType"))
43 Info<<
"Selecting thermodynamics package " << thermoTypeDict <<
endl;
46 const char* cmptNames[nCmpt] =
61 +
word(thermoTypeDict.
lookup(
"transport")) +
'<'
63 +
word(thermoTypeDict.
lookup(
"equationOfState")) +
'<'
64 +
word(thermoTypeDict.
lookup(
"specie")) +
">>,"
65 +
word(thermoTypeDict.
lookup(
"energy")) +
">>>";
68 typename Table::iterator cstrIter = tablePtr->find(thermoTypeName);
71 if (cstrIter == tablePtr->end())
74 <<
"Unknown " << Thermo::typeName <<
" type " <<
nl
75 <<
"thermoType" << thermoTypeDict <<
nl <<
nl
76 <<
"Valid " << Thermo::typeName <<
" types are:" <<
nl <<
nl;
88 validThermoTypeNames.
size() + 1
91 validThermoTypeNameCmpts[0].
setSize(nCmpt);
92 forAll(validThermoTypeNameCmpts[0], j)
94 validThermoTypeNameCmpts[0][j] = cmptNames[j];
98 forAll(validThermoTypeNames, i)
100 validThermoTypeNameCmpts[i+1] =
101 Thermo::splitThermoName(validThermoTypeNames[i], nCmpt);
115 thermoTypeName =
word(thermoDict.
lookup(
"thermoType"));
117 Info<<
"Selecting thermodynamics package " << thermoTypeName <<
endl;
119 typename Table::iterator cstrIter = tablePtr->find(thermoTypeName);
121 if (cstrIter == tablePtr->end())
124 <<
"Unknown " << Thermo::typeName <<
" type "
125 << thermoTypeName <<
nl <<
nl
126 <<
"Valid " << Thermo::typeName <<
" types are:" <<
nl
127 << tablePtr->sortedToc() <<
nl
136 template<
class Thermo>
140 const word& phaseName
147 phasePropertyName(
dictName, phaseName),
148 mesh.time().constant(),
150 IOobject::MUST_READ_IF_MODIFIED,
156 typename Thermo::fvMeshConstructorTable::iterator cstrIter =
157 lookupThermo<Thermo, typename Thermo::fvMeshConstructorTable>
160 Thermo::fvMeshConstructorTablePtr_
167 template<
class Thermo>
172 const word& phaseName
175 typename Thermo::dictionaryConstructorTable::iterator cstrIter =
176 lookupThermo<Thermo, typename Thermo::dictionaryConstructorTable>
179 Thermo::dictionaryConstructorTablePtr_
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
A class for handling words, derived from string.
static Table::iterator lookupThermo(const dictionary &thermoDict, Table *tablePtr)
Generic lookup for each of the related thermodynamics packages.
#define forAll(list, i)
Loop across all elements in list.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool isDict(const word &) const
Check if entry is a sub-dictionary.
const word dictName("particleTrackDict")
Templated table container data entry. Items are stored in a list of Tuple2's. First column is always ...
void printTable(const List< wordList > &, List< string::size_type > &, Ostream &)
A list of keyword definitions, which are a keyword followed by any number of values (e....
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)
void setSize(const label)
Reset size of List.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void size(const label)
Override size to be inconsistent with allocated storage.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.