8 #ifndef KINETICS_FACTORY_H
9 #define KINETICS_FACTORY_H
17 class UnknownKineticsModel :
public CanteraError
20 UnknownKineticsModel(
const std::string& proc,
const std::string& kineticsModel) :
23 " does not match any known type.") {}
33 std::unique_lock<std::mutex> lock(kinetics_mutex);
41 std::unique_lock<std::mutex> lock(kinetics_mutex);
78 static std::mutex kinetics_mutex;
89 return KineticsFactory::factory()->newKinetics(phase, th);
97 return KineticsFactory::factory()->newKinetics(model);
112 unique_ptr<Kinetics>
newKinetics(std::vector<ThermoPhase*>& phases,
113 const AnyMap& phaseNode,
114 const AnyMap& rootNode=AnyMap());
127 unique_ptr<Kinetics>
newKinetics(std::vector<ThermoPhase*>& phases,
128 const std::string& filename,
129 const std::string& phase_name);
141 void addReactions(Kinetics& kin,
const AnyMap& phaseNode,
142 const AnyMap& rootNode=AnyMap());
File contains the FactoryBase class declarations.
Base class for kinetics managers and also contains the kineticsmgr module documentation (see Kinetics...
CanteraError(const std::string &procedure, const std::string &msg, const Args &... args)
Normal Constructor for the CanteraError base class.
Factory class that supports registering functions to create objects.
Factory for kinetics managers.
virtual Kinetics * newKinetics(XML_Node &phase, std::vector< ThermoPhase * > th)
Return a new kinetics manager that implements a reaction mechanism specified in a CTML file.
virtual void deleteFactory()
Virtual abstract function that deletes the factory.
Public interface for kinetics managers.
Class XML_Node is a tree-based representation of the contents of an XML file.
Namespace for the Cantera kernel.
Kinetics * newKineticsMgr(XML_Node &phase, std::vector< ThermoPhase * > th)
Create a new kinetics manager.
void addReactions(Kinetics &kin, const AnyMap &phaseNode, const AnyMap &rootNode)
unique_ptr< Kinetics > newKinetics(vector< ThermoPhase * > &phases, const AnyMap &phaseNode, const AnyMap &rootNode)