[Kinetics] Finish deprecating duplicate "reactionNumber" function
Remove the private implementations outright.
This commit is contained in:
parent
d5262e8bee
commit
ba87385c86
6 changed files with 21 additions and 30 deletions
|
|
@ -167,12 +167,6 @@ protected:
|
|||
//!@}
|
||||
|
||||
private:
|
||||
|
||||
size_t reactionNumber() {
|
||||
return m_ii;
|
||||
}
|
||||
std::vector<std::map<int, doublereal> > m_stoich;
|
||||
|
||||
void addElementaryReaction(ReactionData& r);
|
||||
|
||||
void installReagents(const ReactionData& r);
|
||||
|
|
|
|||
|
|
@ -160,11 +160,6 @@ protected:
|
|||
vector_fp m_grt;
|
||||
|
||||
private:
|
||||
size_t reactionNumber() {
|
||||
return m_ii;
|
||||
}
|
||||
std::vector<std::map<int, doublereal> > m_stoich;
|
||||
|
||||
void addElementaryReaction(ReactionData& r);
|
||||
void addThreeBodyReaction(ReactionData& r);
|
||||
void addFalloffReaction(ReactionData& r);
|
||||
|
|
|
|||
|
|
@ -287,6 +287,8 @@ public:
|
|||
* @deprecated This is a duplicate of Kinetics::nReactions()
|
||||
*/
|
||||
size_t reactionNumber() const {
|
||||
warn_deprecated("InterfaceKinetics::reactionNumber",
|
||||
"To be removed after Cantera 2.2. Duplicate of nReactions().");
|
||||
return m_ii;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -353,7 +353,7 @@ void AqueousKinetics::addElementaryReaction(ReactionData& r)
|
|||
size_t iloc;
|
||||
|
||||
// install rate coeff calculator
|
||||
iloc = m_rates.install(reactionNumber(), r);
|
||||
iloc = m_rates.install(nReactions(), r);
|
||||
|
||||
// add constant term to rate coeff value vector
|
||||
m_rfn.push_back(r.rateCoeffParameters[0]);
|
||||
|
|
@ -368,7 +368,7 @@ void AqueousKinetics::installReagents(const ReactionData& r)
|
|||
doublereal nsFlt;
|
||||
doublereal reactantGlobalOrder = 0.0;
|
||||
doublereal productGlobalOrder = 0.0;
|
||||
size_t rnum = reactionNumber();
|
||||
size_t rnum = nReactions();
|
||||
|
||||
std::vector<size_t> rk;
|
||||
size_t nr = r.reactants.size();
|
||||
|
|
@ -408,15 +408,15 @@ void AqueousKinetics::installReagents(const ReactionData& r)
|
|||
|
||||
m_rkcn.push_back(0.0);
|
||||
|
||||
m_rxnstoich.add(reactionNumber(), r);
|
||||
m_rxnstoich.add(nReactions(), r);
|
||||
|
||||
if (r.reversible) {
|
||||
m_dn.push_back(productGlobalOrder - reactantGlobalOrder);
|
||||
m_revindex.push_back(reactionNumber());
|
||||
m_revindex.push_back(nReactions());
|
||||
m_nrev++;
|
||||
} else {
|
||||
m_dn.push_back(productGlobalOrder - reactantGlobalOrder);
|
||||
m_irrev.push_back(reactionNumber());
|
||||
m_irrev.push_back(nReactions());
|
||||
m_nirrev++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -487,7 +487,7 @@ void GasKinetics::addFalloffReaction(ReactionData& r)
|
|||
|
||||
// add this reaction number to the list of
|
||||
// falloff reactions
|
||||
m_fallindx.push_back(reactionNumber());
|
||||
m_fallindx.push_back(nReactions());
|
||||
|
||||
// install the enhanced third-body concentration
|
||||
// calculator for this reaction
|
||||
|
|
@ -510,7 +510,7 @@ void GasKinetics::addFalloffReaction(ReactionData& r)
|
|||
void GasKinetics::addElementaryReaction(ReactionData& r)
|
||||
{
|
||||
// install rate coeff calculator
|
||||
m_rates.install(reactionNumber(), r);
|
||||
m_rates.install(nReactions(), r);
|
||||
|
||||
// add constant term to rate coeff value vector
|
||||
m_rfn.push_back(r.rateCoeffParameters[0]);
|
||||
|
|
@ -522,7 +522,7 @@ void GasKinetics::addElementaryReaction(ReactionData& r)
|
|||
void GasKinetics::addThreeBodyReaction(ReactionData& r)
|
||||
{
|
||||
// install rate coeff calculator
|
||||
m_rates.install(reactionNumber(), r);
|
||||
m_rates.install(nReactions(), r);
|
||||
|
||||
// add constant term to rate coeff value vector
|
||||
m_rfn.push_back(r.rateCoeffParameters[0]);
|
||||
|
|
@ -530,14 +530,14 @@ void GasKinetics::addThreeBodyReaction(ReactionData& r)
|
|||
// forward rxn order equals number of reactants + 1
|
||||
m_fwdOrder.push_back(r.reactants.size() + 1);
|
||||
|
||||
m_3b_concm.install(reactionNumber(), r.thirdBodyEfficiencies,
|
||||
m_3b_concm.install(nReactions(), r.thirdBodyEfficiencies,
|
||||
r.default_3b_eff);
|
||||
}
|
||||
|
||||
void GasKinetics::addPlogReaction(ReactionData& r)
|
||||
{
|
||||
// install rate coefficient calculator
|
||||
m_plog_rates.install(reactionNumber(), r);
|
||||
m_plog_rates.install(nReactions(), r);
|
||||
|
||||
// add a dummy entry in m_rfn, where computed rate coeff will be put
|
||||
m_rfn.push_back(0.0);
|
||||
|
|
@ -548,7 +548,7 @@ void GasKinetics::addPlogReaction(ReactionData& r)
|
|||
void GasKinetics::addChebyshevReaction(ReactionData& r)
|
||||
{
|
||||
// install rate coefficient calculator
|
||||
m_cheb_rates.install(reactionNumber(), r);
|
||||
m_cheb_rates.install(nReactions(), r);
|
||||
|
||||
// add a dummy entry in m_rfn, where computed rate coeff will be put
|
||||
m_rfn.push_back(0.0);
|
||||
|
|
@ -562,7 +562,7 @@ void GasKinetics::installReagents(const ReactionData& r)
|
|||
doublereal nsFlt;
|
||||
doublereal reactantGlobalOrder = 0.0;
|
||||
doublereal productGlobalOrder = 0.0;
|
||||
size_t rnum = reactionNumber();
|
||||
size_t rnum = nReactions();
|
||||
|
||||
std::vector<size_t> rk;
|
||||
size_t nr = r.reactants.size();
|
||||
|
|
@ -600,15 +600,15 @@ void GasKinetics::installReagents(const ReactionData& r)
|
|||
}
|
||||
m_products.push_back(pk);
|
||||
m_rkcn.push_back(0.0);
|
||||
m_rxnstoich.add(reactionNumber(), r);
|
||||
m_rxnstoich.add(nReactions(), r);
|
||||
|
||||
if (r.reversible) {
|
||||
m_dn.push_back(productGlobalOrder - reactantGlobalOrder);
|
||||
m_revindex.push_back(reactionNumber());
|
||||
m_revindex.push_back(nReactions());
|
||||
m_nrev++;
|
||||
} else {
|
||||
m_dn.push_back(productGlobalOrder - reactantGlobalOrder);
|
||||
m_irrev.push_back(reactionNumber());
|
||||
m_irrev.push_back(nReactions());
|
||||
m_nirrev++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1038,7 +1038,7 @@ void InterfaceKinetics::installReagents(const ReactionData& r)
|
|||
* Obtain the current reaction index for the reaction that we
|
||||
* are adding. The first reaction is labeled 0.
|
||||
*/
|
||||
size_t rnum = reactionNumber();
|
||||
size_t rnum = nReactions();
|
||||
|
||||
// vectors rk and pk are lists of species numbers, with
|
||||
// repeated entries for species with stoichiometric
|
||||
|
|
@ -1102,15 +1102,15 @@ void InterfaceKinetics::installReagents(const ReactionData& r)
|
|||
* calculates rates of species production from reaction rates of
|
||||
* progress.
|
||||
*/
|
||||
m_rxnstoich.add(reactionNumber(), r);
|
||||
m_rxnstoich.add(nReactions(), r);
|
||||
/*
|
||||
* register reaction in lists of reversible and irreversible rxns.
|
||||
*/
|
||||
if (r.reversible) {
|
||||
m_revindex.push_back(reactionNumber());
|
||||
m_revindex.push_back(nReactions());
|
||||
m_nrev++;
|
||||
} else {
|
||||
m_irrev.push_back(reactionNumber());
|
||||
m_irrev.push_back(nReactions());
|
||||
m_nirrev++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue