12 #include "cantera/zeroD/IdealGasConstPressureReactor.h"
20 ReactorFactory* ReactorFactory::s_factory = 0;
21 std::mutex ReactorFactory::reactor_mutex;
23 ReactorFactory::ReactorFactory()
25 reg(
"Reservoir", []() {
return new Reservoir(); });
26 reg(
"Reactor", []() {
return new Reactor(); });
27 reg(
"ConstPressureReactor", []() {
return new ConstPressureReactor(); });
28 reg(
"FlowReactor", []() {
return new FlowReactor(); });
29 reg(
"IdealGasReactor", []() {
return new IdealGasReactor(); });
30 reg(
"IdealGasConstPressureReactor", []() {
return new IdealGasConstPressureReactor(); });
34 reg_type(
"Reactor", ReactorType);
35 reg_type(
"ConstPressureReactor", ConstPressureReactorType);
36 reg_type(
"FlowReactor", FlowReactorType);
37 reg_type(
"IdealGasReactor", IdealGasReactorType);
38 reg_type(
"IdealGasConstPressureReactor", IdealGasConstPressureReactorType);
43 return create(reactorType);
49 return create(m_types.at(ir));
50 }
catch (out_of_range&) {
51 throw CanteraError(
"ReactorFactory::newReactor",
52 "unknown reactor type!");
Namespace for the Cantera kernel.
ReactorBase * newReactor(const std::string &model)
Create a Reactor object of the specified type.
const int ReservoirType
Magic numbers.