[Kinetics] Remove unused m_index member of Kinetics classes

This commit is contained in:
Ray Speth 2014-10-22 21:48:19 +00:00
parent 584c57d569
commit 6287c2c311
6 changed files with 7 additions and 57 deletions

View file

@ -171,8 +171,6 @@ protected:
Rate1<Arrhenius> m_rates;
std::map<size_t, std::pair<int, size_t> > m_index;
std::vector<size_t> m_irrev;
ReactionStoichMgr m_rxnstoich;
@ -182,9 +180,6 @@ protected:
size_t m_nirrev;
size_t m_nrev;
std::map<size_t, std::vector<grouplist_t> > m_rgroups;
std::map<size_t, std::vector<grouplist_t> > m_pgroups;
std::vector<std::map<size_t, doublereal> > m_rrxn;
std::vector<std::map<size_t, doublereal> > m_prxn;
@ -229,9 +224,6 @@ private:
*/
void updateKc();
void registerReaction(size_t rxnNumber, int type, size_t loc) {
m_index[rxnNumber] = std::pair<int, size_t>(type, loc);
}
bool m_finalized;
};
}

View file

@ -144,8 +144,6 @@ protected:
Rate1<Arrhenius> m_falloff_high_rates;
Rate1<Arrhenius> m_rates;
std::map<size_t, std::pair<int, size_t> > m_index;
FalloffMgr m_falloffn;
ThirdBodyMgr<Enhanced3BConc> m_3b_concm;
@ -217,9 +215,6 @@ private:
//! Update the equilibrium constants in molar units.
void updateKc();
void registerReaction(size_t rxnNumber, int type_, size_t loc) {
m_index[rxnNumber] = std::pair<int, size_t>(type_, loc);
}
bool m_finalized;
};
}

View file

@ -341,18 +341,6 @@ public:
*/
void updateKc();
//! Write values into m_index
/*!
* @param rxnNumber reaction number
* @param type reaction type
* @param loc location location in the reaction rate coefficient calculator
*
* Right now we only use one reaction rate coefficient calculated named ELEMENTARY_RXN
* Therefore, this is not used within the code)
* (type, loc) is stored as a std::pair
*/
void registerReaction(size_t rxnNumber, int type, size_t loc);
//! Apply modifications for the fowward reaction rate for interfacial charge transfer reactions
/*!
* For reactions that transfer charge across a potential difference,
@ -455,14 +443,6 @@ protected:
bool m_redo_rates;
/**
* Vector of information about reactions in the mechanism.
* The key is the reaction index (0 < i < m_ii).
* The first pair is the reactionType of the reaction.
* The second pair is ...
*/
std::map<size_t, std::pair<int, size_t> > m_index;
//! Vector of irreversible reaction numbers
/*!
* vector containing the reaction numbers of irreversible reactions.

View file

@ -55,7 +55,6 @@ AqueousKinetics& AqueousKinetics::operator=(const AqueousKinetics& right)
m_nfall = right.m_nfall;
m_rates = right.m_rates;
m_index = right.m_index;
m_irrev = right.m_irrev;
m_rxnstoich = right.m_rxnstoich;
@ -368,7 +367,6 @@ void AqueousKinetics::addElementaryReaction(ReactionData& r)
// forward rxn order equals number of reactants
m_fwdOrder.push_back(r.reactants.size());
registerReaction(reactionNumber(), ELEMENTARY_RXN, iloc);
}
void AqueousKinetics::installReagents(const ReactionData& r)

View file

@ -61,7 +61,6 @@ GasKinetics& GasKinetics::operator=(const GasKinetics& right)
m_falloff_low_rates = right.m_falloff_low_rates;
m_falloff_high_rates = right.m_falloff_high_rates;
m_rates = right.m_rates;
m_index = right.m_index;
m_falloffn = right.m_falloffn;
m_3b_concm = right.m_3b_concm;
m_falloff_concm = right.m_falloff_concm;
@ -499,7 +498,7 @@ void GasKinetics::addFalloffReaction(ReactionData& r)
{
// install high and low rate coeff calculators
// and add constant terms to high and low rate coeff value vectors
size_t iloc = m_falloff_high_rates.install(m_nfall, r);
m_falloff_high_rates.install(m_nfall, r);
m_rfn_high.push_back(r.rateCoeffParameters[0]);
std::swap(r.rateCoeffParameters, r.auxRateCoeffParameters);
m_falloff_low_rates.install(m_nfall, r);
@ -529,26 +528,24 @@ void GasKinetics::addFalloffReaction(ReactionData& r)
// increment the falloff reaction counter
++m_nfall;
registerReaction(reactionNumber(), r.reactionType, iloc);
}
void GasKinetics::addElementaryReaction(ReactionData& r)
{
// install rate coeff calculator
size_t iloc = m_rates.install(reactionNumber(), r);
m_rates.install(reactionNumber(), r);
// add constant term to rate coeff value vector
m_rfn.push_back(r.rateCoeffParameters[0]);
// forward rxn order equals number of reactants
m_fwdOrder.push_back(r.reactants.size());
registerReaction(reactionNumber(), ELEMENTARY_RXN, iloc);
}
void GasKinetics::addThreeBodyReaction(ReactionData& r)
{
// install rate coeff calculator
size_t iloc = m_rates.install(reactionNumber(), r);
m_rates.install(reactionNumber(), r);
// add constant term to rate coeff value vector
m_rfn.push_back(r.rateCoeffParameters[0]);
@ -558,31 +555,28 @@ void GasKinetics::addThreeBodyReaction(ReactionData& r)
m_3b_concm.install(reactionNumber(), r.thirdBodyEfficiencies,
r.default_3b_eff);
registerReaction(reactionNumber(), THREE_BODY_RXN, iloc);
}
void GasKinetics::addPlogReaction(ReactionData& r)
{
// install rate coefficient calculator
size_t iloc = m_plog_rates.install(reactionNumber(), r);
m_plog_rates.install(reactionNumber(), r);
// add a dummy entry in m_rfn, where computed rate coeff will be put
m_rfn.push_back(0.0);
m_fwdOrder.push_back(r.reactants.size());
registerReaction(reactionNumber(), PLOG_RXN, iloc);
}
void GasKinetics::addChebyshevReaction(ReactionData& r)
{
// install rate coefficient calculator
size_t iloc = m_cheb_rates.install(reactionNumber(), r);
m_cheb_rates.install(reactionNumber(), r);
// add a dummy entry in m_rfn, where computed rate coeff will be put
m_rfn.push_back(0.0);
m_fwdOrder.push_back(r.reactants.size());
registerReaction(reactionNumber(), CHEBYSHEV_RXN, iloc);
}
void GasKinetics::installReagents(const ReactionData& r)

View file

@ -121,7 +121,6 @@ InterfaceKinetics& InterfaceKinetics::operator=(const InterfaceKinetics& right)
m_revindex = right.m_revindex;
m_rates = right.m_rates;
m_redo_rates = right.m_redo_rates;
m_index = right.m_index;
m_irrev = right.m_irrev;
m_rxnstoich = right.m_rxnstoich;
m_nirrev = right.m_nirrev;
@ -936,7 +935,7 @@ void InterfaceKinetics::addElementaryReaction(ReactionData& rdata)
/*
* Install the reaction rate into the vector of reactions handled by this class
*/
size_t iloc = m_rates.install(m_ii, rdata);
m_rates.install(m_ii, rdata);
/*
* Change the reaction rate coefficient type back to its original value
@ -968,7 +967,6 @@ void InterfaceKinetics::addElementaryReaction(ReactionData& rdata)
// add constant term to rate coeff value vector
m_rfn.push_back(rdata.rateCoeffParameters[0]);
registerReaction(reactionNumber(), ELEMENTARY_RXN, iloc);
}
void InterfaceKinetics::addGlobalReaction(ReactionData& rdata)
@ -1001,7 +999,7 @@ void InterfaceKinetics::addGlobalReaction(ReactionData& rdata)
/*
* Install the reaction rate into the vector of reactions handled by this class
*/
size_t iloc = m_rates.install(m_ii, rdata);
m_rates.install(m_ii, rdata);
/*
* Change the reaction rate coefficient type back to its original value
@ -1059,7 +1057,6 @@ void InterfaceKinetics::addGlobalReaction(ReactionData& rdata)
// add constant term to rate coeff value vector
m_rfn.push_back(rdata.rateCoeffParameters[0]);
registerReaction(m_ii, ELEMENTARY_RXN, iloc);
}
void InterfaceKinetics::setIOFlag(int ioFlag)
@ -1337,12 +1334,6 @@ void InterfaceKinetics::setPhaseStability(const size_t iphase, const int isStabl
}
}
void InterfaceKinetics::registerReaction(size_t rxnNumber, int type, size_t loc)
{
// type and loc is storred as a pair of values.
m_index[rxnNumber] = std::pair<int, size_t>(type, loc);
}
void InterfaceKinetics::determineFwdOrdersBV(ReactionData& rdata, std::vector<doublereal>& fwdFullorders)
{
// Start out with the full ROP orders vector.