8 #ifndef CT_FALLOFFMGR_H 9 #define CT_FALLOFFMGR_H 39 void install(
size_t rxn,
int reactionType, shared_ptr<Falloff> f) {
41 m_offset.push_back(m_worksize);
42 m_worksize += f->workSize();
43 m_falloff.push_back(f);
54 void replace(
size_t rxn, shared_ptr<Falloff> f) {
70 for (
size_t i = 0; i < m_rxn.size(); i++) {
71 m_falloff[i]->updateTemp(t, work + m_offset[i]);
80 for (
size_t i = 0; i < m_rxn.size(); i++) {
81 double pr = values[m_rxn[i]];
85 m_falloff[i]->F(pr, work + m_offset[i]) /(1.0 + pr);
89 m_falloff[i]->F(pr, work + m_offset[i]) /(1.0 + pr);
95 std::vector<size_t> m_rxn;
96 std::vector<shared_ptr<Falloff> > m_falloff;
99 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.
void replace(size_t rxn, shared_ptr< Falloff > f)
void install(size_t rxn, int reactionType, shared_ptr< Falloff > f)
Install a new falloff function calculator.
Parameterizations for reaction falloff functions.
This file contains definitions for utility functions and text for modules, inputfiles, logs, textlogs, (see Input File Handling, Diagnostic Output, and Writing messages to the screen).
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 a gas-phase 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.
This file defines some constants used to specify reaction types.
vector_int m_reactionType
Distinguish between falloff and chemically activated reactions.
Factory class to construct falloff function calculators.
Namespace for the Cantera kernel.
std::map< size_t, size_t > m_indices
map of external reaction index to local index