Moved m_kk up to the base Kinetics class

This commit is contained in:
Ray Speth 2012-03-15 19:51:16 +00:00
parent d573ae6625
commit 1e8870191d
8 changed files with 11 additions and 25 deletions

View file

@ -372,7 +372,7 @@ public:
protected:
size_t m_kk, m_nfall;
size_t m_nfall;
Rate1<Arrhenius> m_rates;

View file

@ -392,7 +392,7 @@ public:
protected:
size_t m_kk, m_nfall;
size_t m_nfall;
std::vector<size_t> m_fallindx;

View file

@ -646,10 +646,6 @@ protected:
//! Temporary work vector of length m_kk
vector_fp m_grt;
//! m_kk is the number of species in all of the phases
//! that participate in this kinetics mechanism.
size_t m_kk;
//! List of reactions numbers which are reversible reactions
/*!
* This is a vector of reaction numbers. Each reaction

View file

@ -977,8 +977,9 @@ protected:
//! Number of reactions in the mechanism
size_t m_ii;
//! Number of species in the species vector for this kinetics operator
size_t m_nTotalSpecies;
//! The number of species in all of the phases
//! that participate in this kinetics mechanism.
size_t m_kk;
/// Vector of perturbation factors for each reaction's rate of
/// progress vector. It is initialized to one.

View file

@ -70,7 +70,6 @@ AqueousKineticsData& AqueousKineticsData::operator=(const AqueousKineticsData&
*/
AqueousKinetics::AqueousKinetics(thermo_t* thermo) :
Kinetics(),
m_kk(0),
m_nfall(0),
m_nirrev(0),
m_nrev(0),
@ -86,7 +85,6 @@ AqueousKinetics::AqueousKinetics(thermo_t* thermo) :
//====================================================================================================================
AqueousKinetics::AqueousKinetics(const AqueousKinetics& right) :
Kinetics(),
m_kk(0),
m_nfall(0),
m_nirrev(0),
m_nrev(0),
@ -109,7 +107,6 @@ AqueousKinetics& AqueousKinetics::operator=(const AqueousKinetics& right)
Kinetics::operator=(right);
m_kk = right.m_kk;
m_nfall = right.m_nfall;
m_rates = right.m_rates;
m_index = right.m_index;

View file

@ -78,7 +78,6 @@ GasKineticsData& GasKineticsData::operator=(const GasKineticsData& right)
GasKinetics::
GasKinetics(thermo_t* thermo) :
Kinetics(),
m_kk(0),
m_nfall(0),
m_nirrev(0),
m_nrev(0),
@ -95,7 +94,6 @@ GasKinetics(thermo_t* thermo) :
//====================================================================================================================
GasKinetics::GasKinetics(const GasKinetics& right) :
Kinetics(),
m_kk(0),
m_nfall(0),
m_nirrev(0),
m_nrev(0),
@ -121,7 +119,6 @@ GasKinetics& GasKinetics::operator=(const GasKinetics& right)
Kinetics::operator=(right);
m_kk = right.m_kk;
m_nfall = right.m_nfall;
m_fallindx = right.m_fallindx;
m_falloff_low_rates = right.m_falloff_low_rates;

View file

@ -70,7 +70,6 @@ InterfaceKineticsData& InterfaceKineticsData::operator=(const InterfaceKineticsD
*/
InterfaceKinetics::InterfaceKinetics(thermo_t* thermo) :
Kinetics(),
m_kk(0),
m_redo_rates(false),
m_nirrev(0),
m_nrev(0),
@ -122,7 +121,6 @@ InterfaceKinetics::~InterfaceKinetics()
*/
InterfaceKinetics::InterfaceKinetics(const InterfaceKinetics& right) :
Kinetics(),
m_kk(0),
m_redo_rates(false),
m_nirrev(0),
m_nrev(0),
@ -178,7 +176,6 @@ operator=(const InterfaceKinetics& right)
Kinetics::operator=(right);
m_grt = right.m_grt;
m_kk = right.m_kk;
m_revindex = right.m_revindex;
m_rates = right.m_rates;
m_redo_rates = right.m_redo_rates;
@ -1324,9 +1321,7 @@ void InterfaceKinetics::finalize()
"expected interface dimension = 2, but got dimension = "
+int2str(m_surf->nDim()));
m_StandardConc.resize(m_nTotalSpecies, 0.0);
m_StandardConc.resize(m_kk, 0.0);
m_deltaG0.resize(m_ii, 0.0);
m_ProdStanConcReac.resize(m_ii, 0.0);

View file

@ -25,7 +25,7 @@ namespace Cantera
Kinetics::Kinetics() :
m_ii(0),
m_nTotalSpecies(0),
m_kk(0),
m_perturb(0),
m_reactants(0),
m_products(0),
@ -49,7 +49,7 @@ Kinetics::~Kinetics() {}
*/
Kinetics::Kinetics(const Kinetics& right) :
m_ii(0),
m_nTotalSpecies(0),
m_kk(0),
m_perturb(0),
m_reactants(0),
m_products(0),
@ -85,7 +85,7 @@ operator=(const Kinetics& right)
}
m_ii = right.m_ii;
m_nTotalSpecies = right.m_nTotalSpecies;
m_kk = right.m_kk;
m_perturb = right.m_perturb;
m_reactants = right.m_reactants;
m_products = right.m_products;
@ -355,10 +355,10 @@ void Kinetics::addPhase(thermo_t& thermo)
void Kinetics::finalize()
{
m_nTotalSpecies = 0;
m_kk = 0;
for (size_t n = 0; n < nPhases(); n++) {
size_t nsp = m_thermo[n]->nSpecies();
m_nTotalSpecies += nsp;
m_kk += nsp;
}
}