diff --git a/include/cantera/kinetics/Kinetics.h b/include/cantera/kinetics/Kinetics.h index e47d70e63..93ba859a4 100644 --- a/include/cantera/kinetics/Kinetics.h +++ b/include/cantera/kinetics/Kinetics.h @@ -13,14 +13,13 @@ #include "cantera/thermo/ThermoPhase.h" #include "StoichManager.h" #include "cantera/thermo/mix_defs.h" +#include "cantera/kinetics/Reaction.h" #include "cantera/base/global.h" #include "cantera/base/smart_ptr.h" namespace Cantera { -class Reaction; - /** * @defgroup chemkinetics Chemical Kinetics */ @@ -663,7 +662,7 @@ public: * @param i reaction index */ virtual int reactionType(size_t i) const { - return m_rxntype[i]; + return m_reactions[i]->reaction_type; } /** @@ -938,8 +937,6 @@ protected: //! Vector of Reaction objects represented by this Kinetics manager std::vector > m_reactions; - std::vector m_rxntype; - //! m_thermo is a vector of pointers to ThermoPhase objects that are //! involved with this kinetics operator /*! diff --git a/src/kinetics/GasKinetics.cpp b/src/kinetics/GasKinetics.cpp index 562da7d94..c740459d0 100644 --- a/src/kinetics/GasKinetics.cpp +++ b/src/kinetics/GasKinetics.cpp @@ -151,7 +151,7 @@ void GasKinetics::processFalloffReactions() m_falloffn.pr_to_falloff(&pr[0], work); for (size_t i = 0; i < m_nfall; i++) { - if (m_rxntype[m_fallindx[i]] == FALLOFF_RXN) { + if (reactionType(m_fallindx[i]) == FALLOFF_RXN) { pr[i] *= m_rfn_high[i]; } else { // CHEMACT_RXN pr[i] *= m_rfn_low[i]; diff --git a/src/kinetics/InterfaceKinetics.cpp b/src/kinetics/InterfaceKinetics.cpp index 35fb339bb..4568bda53 100644 --- a/src/kinetics/InterfaceKinetics.cpp +++ b/src/kinetics/InterfaceKinetics.cpp @@ -507,8 +507,7 @@ void InterfaceKinetics::updateROP() // Fix up these calculations for cases where the above formalism doesn't hold double OCV = 0.0; for (size_t jrxn = 0; jrxn != nReactions(); ++jrxn) { - int reactionType = m_rxntype[jrxn]; - if (reactionType == BUTLERVOLMER_RXN) { + if (reactionType(jrxn) == BUTLERVOLMER_RXN) { // // OK, the reaction rate constant contains the current density rate constant calculation // the rxnstoich calculation contained the dependence of the current density on the activity concentrations diff --git a/src/kinetics/Kinetics.cpp b/src/kinetics/Kinetics.cpp index e34f8e847..adc00d2a7 100644 --- a/src/kinetics/Kinetics.cpp +++ b/src/kinetics/Kinetics.cpp @@ -51,7 +51,6 @@ Kinetics& Kinetics::operator=(const Kinetics& right) m_kk = right.m_kk; m_perturb = right.m_perturb; m_reactions = right.m_reactions; - m_rxntype = right.m_rxntype; m_thermo = right.m_thermo; // DANGER -> shallow pointer copy @@ -652,7 +651,6 @@ bool Kinetics::addReaction(shared_ptr r) m_rxneqn.push_back(r->equation()); m_reactantStrings.push_back(r->reactantString()); m_productStrings.push_back(r->productString()); - m_rxntype.push_back(r->reaction_type); m_rfn.push_back(0.0); m_rkcn.push_back(0.0); m_ropf.push_back(0.0);