32 template<
class ThermoType>
40 if (dict.
found(
"reduction"))
44 const word methodName(reductionDict.lookup(
"method"));
46 Info<<
"Selecting chemistry reduction method " << methodName <<
endl;
48 const word methodTypeName =
49 methodName +
'<' + ThermoType::typeName() +
'>';
51 typename dictionaryConstructorTable::iterator cstrIter =
52 dictionaryConstructorTablePtr_->find(methodTypeName);
54 if (cstrIter == dictionaryConstructorTablePtr_->end())
57 <<
"Unknown " << typeName_() <<
" type " << methodName << endl
60 const wordList names(dictionaryConstructorTablePtr_->sortedToc());
63 thisCmpts.
append(word::null);
66 basicThermo::splitThermoName(ThermoType::typeName(), 5)
72 const wordList cmpts(basicThermo::splitThermoName(names[i], 6));
79 validNames.
append(cmpts[0]);
84 <<
"Valid " << typeName_()
85 <<
" types are:" << validNames << endl
91 cstrIter()(dict, chemistry)
94 chemistry.reduction_ = crmPtr->active();
static autoPtr< chemistryReductionMethod< ThermoType > > New(const IOdictionary &dict, chemistryModel< ThermoType > &chemistry)
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
#define forAll(list, i)
Loop across all elements in list.
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.
Ostream & endl(Ostream &os)
Add newline and flush stream.
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 List obtained as a section of another List.
A class for handling words, derived from string.
void append(const T &)
Append an element at the end of the list.
A chemistryReductionMethod which does nothing to allow reduction to be switched-off.
basicChemistryModel & chemistry
Extends base chemistry model by adding a thermo package, and ODE functions. Introduces chemistry equa...
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...