19 reg(
"Lindemann", []() {
return new Falloff(); });
21 reg(
"Troe", []() {
return new Troe(); });
22 reg(
"SRI", []() {
return new SRI(); });
28 "Instantiation using magic numbers is deprecated; use string "
29 "identifier instead. To be removed after Cantera 2.5.");
30 static const std::unordered_map<int, std::string> types {
31 {SIMPLE_FALLOFF,
"Simple"},
32 {TROE_FALLOFF,
"Troe"},
Parameterizations for reaction falloff functions.
Falloff * create(const std::string &name, Args... args)
Create an object using the object construction function corresponding to "name" and the provided cons...
void addAlias(const std::string &original, const std::string &alias)
Add an alias for an existing registered type.
void reg(const std::string &name, std::function< Falloff *(Args...)> f)
Register a new object construction function.
static FalloffFactory * factory()
Return a pointer to the factory.
static FalloffFactory * s_factory
Pointer to the single instance of the factory.
static std::mutex falloff_mutex
Mutex for use when calling the factory.
virtual Falloff * newFalloff(int type, const vector_fp &c)
Return a pointer to a new falloff function calculator.
FalloffFactory()
default constructor, which is defined as private
Base class for falloff function calculators.
virtual void init(const vector_fp &c)
Initialize.
The SRI falloff function.
The 3- or 4-parameter Troe falloff parameterization.
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
Namespace for the Cantera kernel.
shared_ptr< Falloff > newFalloff(int type, const vector_fp &c)
Return a pointer to a new falloff function calculator.
This file defines some constants used to specify reaction types.