Removed some deprecated code
This commit is contained in:
parent
8611f43eb0
commit
b5b536ff83
23 changed files with 8 additions and 289 deletions
|
|
@ -49,32 +49,6 @@ public:
|
|||
*/
|
||||
void getchr(char& ch);
|
||||
|
||||
//! Returns string 'aline' stripped of leading and trailing white
|
||||
//! space.
|
||||
/*!
|
||||
* White space is defined by the ISO C function isspace(), and
|
||||
* includes tabs, spaces, \\n. \\r, \\v, and \\f.
|
||||
*
|
||||
* @param aline Input line to be stripped
|
||||
*
|
||||
* @return Returns a string stripped of leading and trailing white
|
||||
* space.
|
||||
*
|
||||
* @deprecated Use stripws (in stringUtils.h)
|
||||
*/
|
||||
DEPRECATED(std::string strip(const std::string& aline) const);
|
||||
|
||||
//! Looks for a substring within 'aline' enclosed in double
|
||||
//! quotes, and returns this substring (without the quotes) if
|
||||
//! found. If not, an empty string is returned.
|
||||
/*!
|
||||
*
|
||||
* @param aline This is the input string to be searched
|
||||
*
|
||||
* @deprecated why is this a class method?
|
||||
*/
|
||||
DEPRECATED(std::string inquotes(const std::string& aline) const);
|
||||
|
||||
//! Searches a string for the first occurrence of a valid
|
||||
//! quoted string.
|
||||
/*!
|
||||
|
|
|
|||
|
|
@ -554,22 +554,6 @@ public:
|
|||
|
||||
// These methods are meant for internal use.
|
||||
|
||||
//! Update the locally-stored composition within this object
|
||||
//! to match the current compositions of the phase objects.
|
||||
/*!
|
||||
*
|
||||
* @deprecated 'update' is confusing within this context.
|
||||
* Switching to the terminology 'uploadFrom'
|
||||
* and 'downloadTo'. uploadFrom means to
|
||||
* query the underlying ThermoPhase objects and
|
||||
* fill in the resulting information within
|
||||
* this object. downloadTo means to take information
|
||||
* from this object and put it into the underlying
|
||||
* ThermoPhase objects.
|
||||
* switch to uploadMoleFractionsFromPhases();
|
||||
*/
|
||||
DEPRECATED(void updateMoleFractions());
|
||||
|
||||
//! Update the locally-stored composition within this object
|
||||
//! to match the current compositions of the phase objects.
|
||||
/*!
|
||||
|
|
|
|||
|
|
@ -299,23 +299,6 @@ public:
|
|||
return m_cp0_R;
|
||||
}
|
||||
|
||||
//! Set the potential energy of species k
|
||||
/*!
|
||||
* @param k species index
|
||||
* @param pe Potential energy (J kmol-1).
|
||||
*/
|
||||
virtual void setPotentialEnergy(int k, doublereal pe) {
|
||||
m_pe[k] = pe;
|
||||
}
|
||||
|
||||
//! Returns the potential energy of species k
|
||||
/*!
|
||||
* @param k species index
|
||||
*/
|
||||
virtual doublereal potentialEnergy(int k) const {
|
||||
return m_pe[k];
|
||||
}
|
||||
|
||||
//! Initialize the ThermoPhase object after all species have been set up
|
||||
/*!
|
||||
* @internal Initialize.
|
||||
|
|
@ -433,12 +416,6 @@ protected:
|
|||
//! Temporary storage for dimensionless reference state entropies
|
||||
mutable vector_fp m_s0_R;
|
||||
|
||||
//! Currently unused
|
||||
/*
|
||||
* @deprecated
|
||||
*/
|
||||
mutable vector_fp m_pe;
|
||||
|
||||
//! Temporary array containing internally calculated partial pressures
|
||||
mutable vector_fp m_pp;
|
||||
|
||||
|
|
|
|||
|
|
@ -1669,17 +1669,6 @@ protected:
|
|||
*/
|
||||
WaterProps* m_waterProps;
|
||||
|
||||
/**
|
||||
* Vector containing the species reference exp(-G/RT) functions
|
||||
* at T = m_tlast
|
||||
*/
|
||||
mutable vector_fp m_expg0_RT;
|
||||
|
||||
/**
|
||||
* Vector of potential energies for the species.
|
||||
*/
|
||||
mutable vector_fp m_pe;
|
||||
|
||||
/**
|
||||
* Temporary array used in equilibrium calculations
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -2521,17 +2521,6 @@ private:
|
|||
*/
|
||||
WaterProps* m_waterProps;
|
||||
|
||||
/**
|
||||
* Vector containing the species reference exp(-G/RT) functions
|
||||
* at T = m_tlast
|
||||
*/
|
||||
mutable vector_fp m_expg0_RT;
|
||||
|
||||
/**
|
||||
* Vector of potential energies for the species.
|
||||
*/
|
||||
mutable vector_fp m_pe;
|
||||
|
||||
/**
|
||||
* Temporary array used in equilibrium calculations
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -803,19 +803,6 @@ public:
|
|||
return m_g0_RT;
|
||||
}
|
||||
|
||||
//! Returns a reference to the exponent of the dimensionless reference state Gibbs Free energy vector.
|
||||
/*!
|
||||
* This function is part of the layer that checks/recalculates the reference
|
||||
* state thermo functions.
|
||||
*/
|
||||
const vector_fp& expGibbs_RT_ref() const {
|
||||
_updateThermo();
|
||||
for (size_t k = 0; k != m_kk; k++) {
|
||||
m_expg0_RT[k] = std::exp(m_g0_RT[k]);
|
||||
}
|
||||
return m_expg0_RT;
|
||||
}
|
||||
|
||||
//! Returns a reference to the dimensionless reference state Entropy vector.
|
||||
/*!
|
||||
* This function is part of the layer that checks/recalculates the reference
|
||||
|
|
@ -923,18 +910,8 @@ protected:
|
|||
//! Temporary storage for dimensionless reference state entropies
|
||||
mutable vector_fp m_s0_R;
|
||||
|
||||
//! currently unsed
|
||||
/*!
|
||||
* @deprecated
|
||||
*/
|
||||
mutable vector_fp m_expg0_RT;
|
||||
|
||||
//! Currently unused
|
||||
/*
|
||||
* @deprecated
|
||||
*/
|
||||
mutable vector_fp m_pe;
|
||||
|
||||
//! Temporary array containing internally calculated partial pressures
|
||||
mutable vector_fp m_pp;
|
||||
|
||||
|
|
|
|||
|
|
@ -912,17 +912,6 @@ public:
|
|||
|
||||
private:
|
||||
|
||||
/**
|
||||
* Vector containing the species reference exp(-G/RT) functions
|
||||
* at T = m_tlast
|
||||
*/
|
||||
mutable vector_fp m_expg0_RT;
|
||||
|
||||
/**
|
||||
* Vector of potential energies for the species.
|
||||
*/
|
||||
mutable vector_fp m_pe;
|
||||
|
||||
/**
|
||||
* Temporary array used in equilibrium calculations
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -855,15 +855,6 @@ public:
|
|||
return m_g0_RT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a reference to the vector of nondimensional
|
||||
* enthalpies of the reference state at the current temperature.
|
||||
* Real reason for its existence is that it also checks
|
||||
* to see if a recalculation of the reference thermodynamics
|
||||
* functions needs to be done.
|
||||
*/
|
||||
const vector_fp& expGibbs_RT_ref() const;
|
||||
|
||||
/**
|
||||
* Returns a reference to the vector of nondimensional
|
||||
* enthalpies of the reference state at the current temperature.
|
||||
|
|
|
|||
|
|
@ -430,25 +430,6 @@ public:
|
|||
return m_n0;
|
||||
}
|
||||
|
||||
//! Sets the potential energy of species k.
|
||||
/*!
|
||||
*
|
||||
* @param k Species index
|
||||
* @param pe Value of the potential energy (J kmol-1)
|
||||
*/
|
||||
void setPotentialEnergy(int k, doublereal pe);
|
||||
|
||||
//! Return the potential energy of species k.
|
||||
/*!
|
||||
* Returns the potential energy of species, k,
|
||||
* J kmol-1
|
||||
*
|
||||
* @param k Species index
|
||||
*/
|
||||
doublereal potentialEnergy(int k) {
|
||||
return m_pe[k];
|
||||
}
|
||||
|
||||
//! Set the site density of the surface phase (kmol m-2)
|
||||
/*!
|
||||
* @param n0 Site density of the surface phase (kmol m-2)
|
||||
|
|
@ -675,17 +656,6 @@ protected:
|
|||
//! Temporary work array
|
||||
mutable vector_fp m_work;
|
||||
|
||||
//! Potential energy of each species in the surface phase
|
||||
/*!
|
||||
* @todo Fix potential energy
|
||||
* Note, the potential energy terms seem to be orphaned at the moment.
|
||||
* They are not connected to the Gibbs free energy calculation in
|
||||
* this object
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
mutable vector_fp m_pe;
|
||||
|
||||
//! vector storing the log of the size of each species.
|
||||
/*!
|
||||
* The size of each species is defined as the number of surface
|
||||
|
|
|
|||
|
|
@ -337,7 +337,7 @@ public:
|
|||
*
|
||||
* The size of mobRat must be at least equal to nsp*nsp
|
||||
*/
|
||||
DEPRECATED(virtual void mobilityRatio(double* mobRat)) {
|
||||
virtual void mobilityRatio(double* mobRat) {
|
||||
err("mobilityRatio");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -173,55 +173,6 @@ void XML_Reader::getchr(char& ch)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// Returns string 'aline' stripped of leading and trailing white
|
||||
// space.
|
||||
// @todo why is this a class method?
|
||||
std::string XML_Reader::strip(const std::string& aline) const
|
||||
{
|
||||
int len = static_cast<int>(aline.size());
|
||||
int i, j, ll;
|
||||
for (i = len-1; i >= 0; i--) {
|
||||
ll = aline[i];
|
||||
if (! isspace(ll)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (j = 0; j < i; j++) {
|
||||
ll = aline[j];
|
||||
if (! isspace(ll)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
// if (aline[j] != ' ' && aline[j] != '\n') break;
|
||||
return aline.substr(j, i - j + 1);
|
||||
}
|
||||
|
||||
|
||||
/// Looks for a substring within 'aline' enclosed in double
|
||||
/// quotes, and returns this substring (without the quotes) if
|
||||
/// found. If not, an empty string is returned.
|
||||
/// @todo why is this a class method?
|
||||
std::string XML_Reader::inquotes(const std::string& aline) const
|
||||
{
|
||||
int len = static_cast<int>(aline.size());
|
||||
int i, j;
|
||||
for (i = len-1; i >= 0; i--)
|
||||
if (aline[i] == '"') {
|
||||
break;
|
||||
}
|
||||
for (j = 0; j < i; j++)
|
||||
if (aline[j] == '"') {
|
||||
break;
|
||||
}
|
||||
if (j == i) {
|
||||
return "";
|
||||
} else {
|
||||
return aline.substr(j+1, i - j - 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//! Find the first position of a character, q, in string, s, which is not immediately preceded by the backslash character
|
||||
/*!
|
||||
* @param s Input string
|
||||
|
|
|
|||
|
|
@ -1079,18 +1079,6 @@ extern "C" {
|
|||
}
|
||||
}
|
||||
|
||||
int kin_getDeltaEntropy(int n, size_t len, double* deltaS)
|
||||
{
|
||||
try {
|
||||
Kinetics& k = KineticsCabinet::item(n);
|
||||
k.checkReactionArraySize(len);
|
||||
k.getDeltaEntropy(deltaS);
|
||||
return 0;
|
||||
} catch (...) {
|
||||
return handleAllExceptions(-1, ERR);
|
||||
}
|
||||
}
|
||||
|
||||
int kin_getCreationRates(int n, size_t len, double* cdot)
|
||||
{
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -1130,12 +1130,7 @@ bool MultiPhase::tempOK(const index_t p) const
|
|||
{
|
||||
return m_temp_OK[p];
|
||||
}
|
||||
//====================================================================================================================
|
||||
/// Update the locally-stored species mole fractions.
|
||||
void MultiPhase::updateMoleFractions()
|
||||
{
|
||||
uploadMoleFractionsFromPhases();
|
||||
}
|
||||
|
||||
//====================================================================================================================
|
||||
/// Update the locally-stored species mole fractions.
|
||||
void MultiPhase::uploadMoleFractionsFromPhases()
|
||||
|
|
|
|||
|
|
@ -46,14 +46,16 @@ gri30_update_rates_T()
|
|||
|
||||
/**
|
||||
* Update the equilibrium constants in molar units.
|
||||
* @todo This formulation assumes an ideal gas.
|
||||
*/
|
||||
void GRI_30_Kinetics::gri30_updateKc()
|
||||
{
|
||||
const doublereal* a =
|
||||
&((IdealGasPhase*)m_thermo[0])->expGibbs_RT_ref()[0];
|
||||
vector_fp a(m_kk);
|
||||
m_thermo[0]->getGibbs_RT_ref(&a[0]);
|
||||
for (size_t k = 0; k < m_kk; k++) {
|
||||
a[k] = exp(a[k]);
|
||||
}
|
||||
doublereal exp_c_ref = exp(m_logc_ref);
|
||||
update_kc(a, exp_c_ref, &m_rkcn[0]);
|
||||
update_kc(&a[0], exp_c_ref, &m_rkcn[0]);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -27,10 +27,6 @@ public:
|
|||
virtual void error(const std::string& msg) {
|
||||
mexErrMsgTxt(msg.c_str());
|
||||
}
|
||||
|
||||
DEPRECATED(virtual int env()) {
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,10 +38,6 @@ public:
|
|||
std::string err = "raise \""+msg+"\"";
|
||||
PyRun_SimpleString((char*)err.c_str());
|
||||
}
|
||||
|
||||
DEPRECATED(virtual int env()) {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@ ConstDensityThermo& ConstDensityThermo::operator=(const ConstDensityThermo& righ
|
|||
m_cp0_R = right.m_cp0_R;
|
||||
m_g0_RT = right.m_g0_RT;
|
||||
m_s0_R = right.m_s0_R;
|
||||
m_pe = right.m_pe;
|
||||
m_pp = right.m_pp;
|
||||
|
||||
return *this;
|
||||
|
|
@ -168,7 +167,6 @@ void ConstDensityThermo::initThermo()
|
|||
m_g0_RT.resize(m_kk);
|
||||
m_cp0_R.resize(m_kk);
|
||||
m_s0_R.resize(m_kk);
|
||||
m_pe.resize(m_kk, 0.0);
|
||||
m_pp.resize(m_kk);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -176,8 +176,6 @@ operator=(const DebyeHuckel& b)
|
|||
m_waterProps = new WaterProps(m_waterSS);
|
||||
}
|
||||
|
||||
m_expg0_RT = b.m_expg0_RT;
|
||||
m_pe = b.m_pe;
|
||||
m_pp = b.m_pp;
|
||||
m_tmpV = b.m_tmpV;
|
||||
m_speciesCharge_Stoich= b.m_speciesCharge_Stoich;
|
||||
|
|
@ -1869,8 +1867,6 @@ void DebyeHuckel::initLengths()
|
|||
m_d2lnActCoeffMolaldT2.resize(m_kk, 0.0);
|
||||
m_dlnActCoeffMolaldP.resize(m_kk, 0.0);
|
||||
m_B_Dot.resize(m_kk, 0.0);
|
||||
m_expg0_RT.resize(m_kk, 0.0);
|
||||
m_pe.resize(m_kk, 0.0);
|
||||
m_pp.resize(m_kk, 0.0);
|
||||
m_tmpV.resize(m_kk, 0.0);
|
||||
if (m_formDH == DHFORM_BETAIJ ||
|
||||
|
|
|
|||
|
|
@ -288,8 +288,6 @@ operator=(const HMWSoln& b)
|
|||
m_waterProps = new WaterProps(dynamic_cast<PDSS_Water*>(m_waterSS));
|
||||
}
|
||||
|
||||
m_expg0_RT = b.m_expg0_RT;
|
||||
m_pe = b.m_pe;
|
||||
m_pp = b.m_pp;
|
||||
m_tmpV = b.m_tmpV;
|
||||
m_speciesCharge_Stoich= b.m_speciesCharge_Stoich;
|
||||
|
|
@ -1703,8 +1701,6 @@ void HMWSoln::initLengths()
|
|||
m_speciesCharge_Stoich.resize(m_kk, 0.0);
|
||||
m_Aionic.resize(m_kk, 0.0);
|
||||
|
||||
m_expg0_RT.resize(m_kk, 0.0);
|
||||
m_pe.resize(m_kk, 0.0);
|
||||
m_pp.resize(m_kk, 0.0);
|
||||
m_tmpV.resize(m_kk, 0.0);
|
||||
m_molalitiesCropped.resize(m_kk, 0.0);
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@ operator=(const IdealGasPhase& right)
|
|||
m_g0_RT = right.m_g0_RT;
|
||||
m_s0_R = right.m_s0_R;
|
||||
m_expg0_RT= right.m_expg0_RT;
|
||||
m_pe = right.m_pe;
|
||||
m_pp = right.m_pp;
|
||||
}
|
||||
return *this;
|
||||
|
|
@ -482,7 +481,6 @@ void IdealGasPhase::initThermo()
|
|||
m_expg0_RT.resize(m_kk);
|
||||
m_cp0_R.resize(m_kk);
|
||||
m_s0_R.resize(m_kk);
|
||||
m_pe.resize(m_kk, 0.0);
|
||||
m_pp.resize(m_kk);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -99,8 +99,6 @@ operator=(const IdealMolalSoln& b)
|
|||
IMS_egCut_ = b.IMS_egCut_;
|
||||
IMS_agCut_ = b.IMS_agCut_;
|
||||
IMS_bgCut_ = b.IMS_bgCut_;
|
||||
m_expg0_RT = b.m_expg0_RT;
|
||||
m_pe = b.m_pe;
|
||||
m_pp = b.m_pp;
|
||||
m_tmpV = b.m_tmpV;
|
||||
IMS_lnActCoeffMolal_ = b.IMS_lnActCoeffMolal_;
|
||||
|
|
@ -1299,8 +1297,6 @@ void IdealMolalSoln::initLengths()
|
|||
* Obtain the limits of the temperature from the species
|
||||
* thermo handler's limits.
|
||||
*/
|
||||
m_expg0_RT.resize(m_kk);
|
||||
m_pe.resize(m_kk, 0.0);
|
||||
m_pp.resize(m_kk);
|
||||
m_speciesMolarVolume.resize(m_kk);
|
||||
m_tmpV.resize(m_kk);
|
||||
|
|
|
|||
|
|
@ -1048,22 +1048,6 @@ const vector_fp& IdealSolidSolnPhase::enthalpy_RT_ref() const
|
|||
return m_h0_RT;
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns a reference to the vector of nondimensional
|
||||
* enthalpies of the reference state at the current temperature.
|
||||
* Real reason for its existence is that it also checks
|
||||
* to see if a recalculation of the reference thermodynamics
|
||||
* functions needs to be done.
|
||||
*/
|
||||
const vector_fp& IdealSolidSolnPhase::expGibbs_RT_ref() const
|
||||
{
|
||||
_updateThermo();
|
||||
for (size_t k = 0; k != m_kk; k++) {
|
||||
m_expg0_RT[k] = exp(m_g0_RT[k]);
|
||||
}
|
||||
return m_expg0_RT;
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns a reference to the vector of nondimensional
|
||||
* enthalpies of the reference state at the current temperature.
|
||||
|
|
|
|||
|
|
@ -130,7 +130,6 @@ operator=(const SurfPhase& right)
|
|||
m_cp0 = right.m_cp0;
|
||||
m_mu0 = right.m_mu0;
|
||||
m_work = right.m_work;
|
||||
m_pe = right.m_pe;
|
||||
m_logsize = right.m_logsize;
|
||||
}
|
||||
return *this;
|
||||
|
|
@ -338,7 +337,6 @@ void SurfPhase::initThermo()
|
|||
m_cp0.resize(m_kk);
|
||||
m_mu0.resize(m_kk);
|
||||
m_work.resize(m_kk);
|
||||
m_pe.resize(m_kk, 0.0);
|
||||
vector_fp cov(m_kk, 0.0);
|
||||
cov[0] = 1.0;
|
||||
setCoverages(DATA_PTR(cov));
|
||||
|
|
@ -348,27 +346,12 @@ void SurfPhase::initThermo()
|
|||
}
|
||||
}
|
||||
|
||||
void SurfPhase::setPotentialEnergy(int k, doublereal pe)
|
||||
{
|
||||
m_pe[k] = pe;
|
||||
_updateThermo(true);
|
||||
}
|
||||
|
||||
void SurfPhase::setSiteDensity(doublereal n0)
|
||||
{
|
||||
doublereal x = n0;
|
||||
setParameters(1, &x);
|
||||
}
|
||||
|
||||
//void SurfPhase::
|
||||
//setElectricPotential(doublereal V) {
|
||||
// for (int k = 0; k < m_kk; k++) {
|
||||
// m_pe[k] = charge(k)*Faraday*V;
|
||||
// }
|
||||
// _updateThermo(true);
|
||||
//}
|
||||
|
||||
|
||||
/**
|
||||
* Set the coverage fractions to a specified
|
||||
* state. This routine converts to concentrations
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue