7 #ifndef CT_FALLOFFMGR_H
8 #define CT_FALLOFFMGR_H
34 for (
size_t i = 0; i < m_falloff.size(); i++) {
51 void install(
size_t rxn,
int falloffType,
int reactionType,
55 m_offset.push_back(m_worksize);
57 m_falloff.push_back(f);
73 for (
size_t i = 0; i < m_rxn.size(); i++) {
74 m_falloff[i]->updateTemp(t, work + m_offset[i]);
83 for (
size_t i = 0; i < m_rxn.size(); i++) {
84 double pr = values[m_rxn[i]];
88 m_falloff[i]->F(pr, work + m_offset[i]) /(1.0 + pr);
92 m_falloff[i]->F(pr, work + m_offset[i]) /(1.0 + pr);
98 std::vector<size_t> m_rxn;
99 std::vector<Falloff*> m_falloff;
102 std::vector<vector_fp::difference_type> m_offset;
void pr_to_falloff(doublereal *values, const doublereal *work)
Given a vector of reduced pressures for each falloff reaction, replace each entry by the value of the...
A falloff manager that implements any set of falloff functions.
virtual Falloff * newFalloff(int type, const vector_fp &c)
Return a pointer to a new falloff function calculator.
void install(size_t rxn, int falloffType, int reactionType, const vector_fp &c)
Install a new falloff function calculator.
Parameterizations for reaction falloff functions.
void updateTemp(doublereal t, doublereal *work)
Update the cached temperature-dependent intermediate results for all installed falloff functions...
size_t workSize()
Size of the work array required to store intermediate results.
const int FALLOFF_RXN
The general form for an association or dissociation reaction, with a pressure-dependent rate...
std::vector< int > vector_int
Vector of ints.
static FalloffFactory * factory()
Return a pointer to the factory.
virtual size_t workSize()
The size of the work array required.
This file defines some constants used to specify reaction types.
vector_int m_reactionType
Distinguish between falloff and chemically activated reactions.
Base class for falloff function calculators.
virtual ~FalloffMgr()
Destructor. Deletes all installed falloff function calculators.
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
Factory class to construct falloff function calculators.