31 template<
class ThermoType>
43 template<
class ThermoType>
46 wordList result(specieThermos_.size());
48 forAll(specieThermos_, speciei)
50 result[speciei] = specieThermos_[speciei].name();
57 template<
class ThermoType>
65 specieThermos_.setSize(specieNames.
size());
66 specieCompositions_.setSize(specieNames.
size());
67 specieDictLocations_.setSize(specieNames.
size());
69 forAll(specieNames, speciei)
76 new ThermoType(specieNames[speciei], specieDict)
79 if (specieDict.
isDict(
"elements"))
84 const wordList elementsNames(specieElementsDict.
toc());
86 specieCompositions_[speciei].resize(elementsNames.
size());
90 specieCompositions_[speciei][eni].name() = elementsNames[eni];
91 specieCompositions_[speciei][eni].nAtoms() =
101 template<
class ThermoType>
108 if (specieCompositions_[speciei].empty())
111 <<
"Elemental composition not specified for specie "
112 << specieThermos_[speciei].name()
116 return specieCompositions_[speciei];
#define forAll(list, i)
Loop across all elements in list.
void size(const label)
Override size to be inconsistent with allocated storage.
A list of keyword definitions, which are a keyword followed by any number of values (e....
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T, if not found return the given default.
bool isDict(const word &) const
Check if entry is a sub-dictionary.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
wordList toc() const
Return the table of contents.
const List< specieElement > & specieComposition(const label speciei) const
Return composition based on index.
multicomponentMixture(const dictionary &)
Construct from a dictionary.
void read(const dictionary &)
Read dictionary.
wordList specieNames() const
Return the specie names.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
errorManipArg< error, int > exit(error &err, const int errNo=1)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.