[Thermo] Eliminate redundant assignment of m_kk

m_kk is automatically set as species are added to a phase.
This commit is contained in:
Ray Speth 2015-02-20 23:43:12 +00:00
parent 42e7061bd8
commit 09ce99dc83
17 changed files with 0 additions and 42 deletions

View file

@ -509,15 +509,6 @@ public:
PDSS* providePDSS(size_t k);
const PDSS* providePDSS(size_t k) const;
private:
//! @internal Initialize the internal lengths in this object.
/*!
* Note this is not a virtual function.
*/
void initLengths();
//@}
protected:
//! Current value of the pressure - state variable

View file

@ -1190,8 +1190,6 @@ double DebyeHuckel::AionicRadius(int k) const
void DebyeHuckel::initLengths()
{
m_kk = nSpecies();
/*
* Obtain the limits of the temperature from the species
* thermo handler's limits.

View file

@ -271,7 +271,6 @@ void GibbsExcessVPSSTP::initThermo()
void GibbsExcessVPSSTP::initLengths()
{
m_kk = nSpecies();
moleFractions_.resize(m_kk);
lnActCoeff_Scaled_.resize(m_kk);
dlnActCoeffdT_Scaled_.resize(m_kk);

View file

@ -1003,8 +1003,6 @@ double HMWSoln::AionicRadius(int k) const
void HMWSoln::initLengths()
{
m_kk = nSpecies();
/*
* Resize lengths equal to the number of species in
* the phase.

View file

@ -769,7 +769,6 @@ void IdealMolalSoln::s_updateIMS_lnMolalityActCoeff() const
void IdealMolalSoln::initLengths()
{
m_kk = nSpecies();
/*
* Obtain the limits of the temperature from the species
* thermo handler's limits.

View file

@ -332,7 +332,6 @@ void IdealSolnGasVPSS::setToEquilState(const doublereal* mu_RT)
void IdealSolnGasVPSS::initLengths()
{
m_kk = nSpecies();
m_pp.resize(m_kk, 0.0);
}

View file

@ -778,7 +778,6 @@ void IonsFromNeutralVPSSTP::initThermo()
void IonsFromNeutralVPSSTP::initLengths()
{
m_kk = nSpecies();
numNeutralMoleculeSpecies_ = neutralMoleculePhase_->nSpecies();
moleFractions_.resize(m_kk);
fm_neutralMolec_ions_.resize(numNeutralMoleculeSpecies_ * m_kk);

View file

@ -345,7 +345,6 @@ void MargulesVPSSTP::initThermo()
void MargulesVPSSTP::initLengths()
{
m_kk = nSpecies();
dlnActCoeffdlnN_.resize(m_kk, m_kk);
}

View file

@ -351,7 +351,6 @@ void MixedSolventElectrolyte::initThermo()
void MixedSolventElectrolyte::initLengths()
{
m_kk = nSpecies();
dlnActCoeffdlnN_.resize(m_kk, m_kk);
}

View file

@ -274,7 +274,6 @@ void MixtureFugacityTP::initThermo()
void MixtureFugacityTP::initLengths()
{
m_kk = nSpecies();
moleFractions_.resize(m_kk, 0.0);
moleFractions_[0] = 1.0;
m_h0_RT.resize(m_kk, 0.0);

View file

@ -477,7 +477,6 @@ size_t MolalityVPSSTP::findCLMIndex() const
// been identified.
void MolalityVPSSTP::initLengths()
{
m_kk = nSpecies();
m_molalities.resize(m_kk);
}

View file

@ -347,7 +347,6 @@ void MolarityIonicVPSSTP::initThermo()
void MolarityIonicVPSSTP::initLengths()
{
m_kk = nSpecies();
moleFractionsTmp_.resize(m_kk);
}

View file

@ -358,7 +358,6 @@ void PhaseCombo_Interaction::initThermo()
void PhaseCombo_Interaction::initLengths()
{
m_kk = nSpecies();
dlnActCoeffdlnN_.resize(m_kk, m_kk);
}

View file

@ -161,7 +161,6 @@ void PseudoBinaryVPSSTP::initThermo()
void PseudoBinaryVPSSTP::initLengths()
{
m_kk = nSpecies();
moleFractions_.resize(m_kk);
}

View file

@ -306,7 +306,6 @@ void RedlichKisterVPSSTP::initThermo()
void RedlichKisterVPSSTP::initLengths()
{
m_kk = nSpecies();
dlnActCoeffdlnN_.resize(m_kk, m_kk);
}

View file

@ -199,7 +199,6 @@ void StoichSubstanceSSTP::initThermo()
/*
* Make sure there is one and only one species in this phase.
*/
m_kk = nSpecies();
if (m_kk != 1) {
throw CanteraError("initThermo",
"stoichiometric substances may only contain one species.");

View file

@ -245,7 +245,6 @@ void VPStandardStateTP::getStandardVolumes_ref(doublereal* vol) const
void VPStandardStateTP::initThermo()
{
initLengths();
ThermoPhase::initThermo();
m_VPSS_ptr->initThermo();
for (size_t k = 0; k < m_kk; k++) {
@ -261,17 +260,6 @@ void VPStandardStateTP::setVPSSMgr(VPSSMgr* vp_ptr)
m_VPSS_ptr = vp_ptr;
}
/*
* Initialize the internal lengths.
* (this is not a virtual function)
*/
void VPStandardStateTP::initLengths()
{
m_kk = nSpecies();
}
void VPStandardStateTP::setTemperature(const doublereal temp)
{
setState_TP(temp, m_Pcurrent);
@ -345,10 +333,6 @@ VPStandardStateTP::providePDSS(size_t k) const
void VPStandardStateTP::initThermoXML(XML_Node& phaseNode, const std::string& id)
{
// initialize the lengths in the current object and then call the parent
// routine.
VPStandardStateTP::initLengths();
for (size_t k = 0; k < m_kk; k++) {
PDSS* kPDSS = m_PDSS_storage[k];
AssertTrace(kPDSS != 0);