11 #include "cantera/zeroD/ConstPressureReactor.h"
17 ReactorFactory* ReactorFactory::s_factory = 0;
18 mutex_t ReactorFactory::reactor_mutex;
20 static int ntypes = 4;
21 static string _types[] = {
"Reservoir",
"Reactor",
"ConstPressureReactor",
26 static int _itypes[] = {ReservoirType, ReactorType, ConstPressureReactorType,
33 ReactorBase* ReactorFactory::newReactor(
string reactorType)
38 for (
int n = 0; n < ntypes; n++) {
39 if (reactorType == _types[n]) {
44 return newReactor(ir);
48 ReactorBase* ReactorFactory::newReactor(
int ir)
52 return new Reservoir();
56 return new FlowReactor();
57 case ConstPressureReactorType:
58 return new ConstPressureReactor();
61 "unknown reactor type!");