31 template<
class CompType,
class ThermoType>
41 const word methodName(tabulationDict.lookup(
"method"));
43 Info<<
"Selecting chemistry tabulation method " << methodName <<
endl;
45 const word methodTypeName =
46 methodName +
'<' + CompType::typeName +
',' + ThermoType::typeName()
49 typename dictionaryConstructorTable::iterator cstrIter =
50 dictionaryConstructorTablePtr_->find(methodTypeName);
52 if (cstrIter == dictionaryConstructorTablePtr_->end())
55 <<
"Unknown " << typeName_() <<
" type " << methodName << endl
58 const wordList names(dictionaryConstructorTablePtr_->toc());
61 thisCmpts.
append(word::null);
62 thisCmpts.append(CompType::typeName);
65 basicThermo::splitThermoName(ThermoType::typeName(), 5)
71 const wordList cmpts(basicThermo::splitThermoName(names[i], 7));
74 for (
label i = 1; i < cmpts.
size() && isValid; ++ i)
76 isValid = isValid && cmpts[i] == thisCmpts[i];
81 validNames.
append(cmpts[0]);
86 <<
"Valid " << typeName_() <<
" types for this thermodynamic model " 87 <<
"are:" << endl << validNames <<
endl;
91 validCmpts[0][0] = typeName_();
92 validCmpts[0][1] =
"reactionThermo";
93 validCmpts[0][2] =
"transport";
94 validCmpts[0][3] =
"thermo";
95 validCmpts[0][4] =
"equationOfState";
96 validCmpts[0][5] =
"specie";
97 validCmpts[0][6] =
"energy";
100 validCmpts.
append(basicThermo::splitThermoName(names[i], 7));
104 <<
"All " << validCmpts[0][0] <<
'/' << validCmpts[0][1]
105 <<
"/thermoPhysics combinations are:" << endl <<
endl;
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
BasicChemistryModel< rhoReactionThermo > & chemistry
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
A class for handling words, derived from string.
void append(const T &)
Append an element at the end of the list.
void printTable(const List< wordList > &, List< string::size_type > &, Ostream &)
List< word > wordList
A List of words.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
static autoPtr< chemistryTabulationMethod > New(const IOdictionary &dict, TDACChemistryModel< CompType, ThermoType > &chemistry)