Go to the documentation of this file.
10 #ifndef THERMO_FACTORY_H
11 #define THERMO_FACTORY_H
42 const std::string& thermoModel) :
45 " does not match any known type.") {}
123 ThermoPhase*
newPhase(XML_Node& phase);
133 unique_ptr<ThermoPhase>
newPhase(AnyMap& phaseNode,
134 const AnyMap& rootNode=AnyMap());
150 ThermoPhase*
newPhase(
const std::string& infile, std::string
id=
"");
208 void importPhase(XML_Node& phase, ThermoPhase* th);
219 void setupPhase(ThermoPhase& phase, AnyMap& phaseNode,
220 const AnyMap& rootNode=AnyMap());
242 const XML_Node* phaseSpeciesData);
static std::mutex thermo_mutex
Decl for locking mutex for thermo factory singleton.
Factory class for thermodynamic property managers.
virtual void deleteFactory()
delete the static instance of this factory
T * create(const std::string &name, Args... args)
Create an object using the object construction function corresponding to "name" and the provided cons...
ThermoPhase * newThermoPhase(const std::string &model)
Create a new thermo manager instance.
const XML_Node * speciesXML_Node(const std::string &kname, const XML_Node *phaseSpeciesData)
Search an XML tree for species data.
virtual ThermoPhase * newThermoPhase(const std::string &model)
Create a new thermodynamic property manager.
void setupPhase(ThermoPhase &thermo, AnyMap &phaseNode, const AnyMap &rootNode)
Initialize a ThermoPhase object.
void installElements(Phase &th, const XML_Node &phaseNode)
Add the elements given in an XML_Node tree to the specified phase.
Specific error to be thrown if the type of Thermo manager is unrecognized.
static ThermoFactory * factory()
Static function that creates a static instance of the factory.
Base class for a phase with thermodynamic properties.
ThermoFactory()
Private constructors prevents usage.
static ThermoFactory * s_factory
static member of a single instance
Factory class that supports registering functions to create objects.
Base class for exceptions thrown by Cantera classes.
void importPhase(XML_Node &phase, ThermoPhase *th)
Import a phase information into an empty ThermoPhase object.
UnknownThermoPhaseModel(const std::string &proc, const std::string &thermoModel)
Constructor.
Namespace for the Cantera kernel.