7 #ifndef CT_RATECOEFF_MGR_H
8 #define CT_RATECOEFF_MGR_H
43 m_rxn.push_back(rxnNumber);
44 m_rates.push_back(R(rdata));
46 return m_rates.size() - 1;
54 void install(
size_t rxnNumber,
const R& rate) {
55 m_rxn.push_back(rxnNumber);
56 m_rates.push_back(rate);
61 void replace(
size_t rxnNumber,
const R& rate) {
77 for (
size_t i = 0; i != m_rates.size(); i++) {
78 m_rates[i].update_C(c);
90 void update(doublereal T, doublereal logT, doublereal* values) {
91 doublereal recipT = 1.0/T;
92 for (
size_t i = 0; i != m_rates.size(); i++) {
93 values[m_rxn[i]] = m_rates[i].updateRC(logT, recipT);
97 size_t nReactions()
const {
98 return m_rates.size();
102 std::vector<R> m_rates;
103 std::vector<size_t> m_rxn;
std::string int2str(const int n, const std::string &fmt)
Convert an int to a string using a format converter.
void install(size_t rxnNumber, const R &rate)
Install a rate coefficient calculator.
std::map< size_t, size_t > m_indices
map reaction number to index in m_rxn / m_rates
This rate coefficient manager supports one parameterization of the rate constant of any type...
void update_C(const doublereal *c)
Update the concentration-dependent parts of the rate coefficient, if any.
Intermediate class which stores data about a reaction and its rate parameterization before adding the...
Base class for exceptions thrown by Cantera classes.
size_t install(size_t rxnNumber, const ReactionData &rdata)
Install a rate coefficient calculator.
void update(doublereal T, doublereal logT, doublereal *values)
Write the rate coefficients into array values.
int rateCoeffType
Type of the rate coefficient for the forward rate constant.
void replace(size_t rxnNumber, const R &rate)
Replace an existing rate coefficient calculator.