26 #include "phaseModel.H" 33 const phaseSystem& fluid,
34 const word& phaseName,
35 const bool referencePhase,
39 word phaseModelType(fluid.subDict(phaseName).lookup(
"type"));
41 Info<<
"Selecting phaseModel for " 42 << phaseName <<
": " << phaseModelType <<
endl;
44 phaseSystemConstructorTable::iterator cstrIter =
45 phaseSystemConstructorTablePtr_->find(phaseModelType);
47 if (cstrIter == phaseSystemConstructorTablePtr_->end())
50 <<
"Unknown phaseModelType type " 51 << phaseModelType << endl << endl
52 <<
"Valid phaseModel types are : " << endl
53 << phaseSystemConstructorTablePtr_->sortedToc()
57 return cstrIter()(
fluid, phaseName, referencePhase,
index);
label index() const
Return the index of the phase.
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)
static autoPtr< phaseModel > New(const phaseSystem &fluid, const word &phaseName, const bool referencePhase, const label index)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const phaseSystem & fluid() const
Return the system to which this phase belongs.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...