mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
[Equil] Deprecate VCS 'UseCanteraCalls' flag
When this flag is removed, the behavior will be as if the flag's value were 'true'.
This commit is contained in:
@@ -757,6 +757,7 @@ private:
|
||||
|
||||
//! If this is true, then calculations are actually performed within
|
||||
//! Cantera
|
||||
//! @deprecated Will be implicitly 'true' after Cantera 2.2.
|
||||
bool m_useCanteraCalls;
|
||||
|
||||
/**
|
||||
|
||||
@@ -106,6 +106,7 @@ public:
|
||||
double SSStar_Vol0;
|
||||
|
||||
//! If true, this object will call Cantera to do its member calculations.
|
||||
//! @deprecated Will always behave as if 'true' after Cantera 2.2
|
||||
bool UseCanteraCalls;
|
||||
|
||||
int m_VCS_UnitsFormat;
|
||||
|
||||
@@ -308,6 +308,9 @@ void vcs_VolPhase::_updateActCoeff() const
|
||||
}
|
||||
if (m_useCanteraCalls) {
|
||||
TP_ptr->getActivityCoefficients(VCS_DATA_PTR(ActCoeff));
|
||||
} else {
|
||||
warn_deprecated("m_useCanteraCalls", "Setting this flag to 'false' is "
|
||||
"deprecated and will not work after Cantera 2.2.");
|
||||
}
|
||||
m_UpToDate_AC = true;
|
||||
}
|
||||
@@ -325,6 +328,8 @@ void vcs_VolPhase::_updateG0() const
|
||||
if (m_useCanteraCalls) {
|
||||
TP_ptr->getGibbs_ref(VCS_DATA_PTR(SS0ChemicalPotential));
|
||||
} else {
|
||||
warn_deprecated("m_useCanteraCalls", "Setting this flag to 'false' is "
|
||||
"deprecated and will not work after Cantera 2.2.");
|
||||
double R = vcsUtil_gasConstant(p_VCS_UnitsFormat);
|
||||
for (size_t k = 0; k < m_numSpecies; k++) {
|
||||
size_t kglob = IndSpecies[k];
|
||||
@@ -350,6 +355,8 @@ void vcs_VolPhase::_updateGStar() const
|
||||
if (m_useCanteraCalls) {
|
||||
TP_ptr->getStandardChemPotentials(VCS_DATA_PTR(StarChemicalPotential));
|
||||
} else {
|
||||
warn_deprecated("m_useCanteraCalls", "Setting this flag to 'false' is "
|
||||
"deprecated and will not work after Cantera 2.2.");
|
||||
double R = vcsUtil_gasConstant(p_VCS_UnitsFormat);
|
||||
for (size_t k = 0; k < m_numSpecies; k++) {
|
||||
size_t kglob = IndSpecies[k];
|
||||
@@ -393,6 +400,9 @@ void vcs_VolPhase::_updateMoleFractionDependencies()
|
||||
if (TP_ptr) {
|
||||
TP_ptr->setState_PX(Pres_, &(Xmol_[m_MFStartIndex]));
|
||||
}
|
||||
} else {
|
||||
warn_deprecated("m_useCanteraCalls", "Setting this flag to 'false' is "
|
||||
"deprecated and will not work after Cantera 2.2.");
|
||||
}
|
||||
if (!m_isIdealSoln) {
|
||||
m_UpToDate_AC = false;
|
||||
@@ -621,7 +631,10 @@ void vcs_VolPhase::setElectricPotential(const double phi)
|
||||
m_phi = phi;
|
||||
if (m_useCanteraCalls) {
|
||||
TP_ptr->setElectricPotential(m_phi);
|
||||
}
|
||||
} else {
|
||||
warn_deprecated("m_useCanteraCalls", "Setting this flag to 'false' is "
|
||||
"deprecated and will not work after Cantera 2.2.");
|
||||
}
|
||||
// We have changed the state variable. Set uptodate flags to false
|
||||
m_UpToDate_AC = false;
|
||||
m_UpToDate_VolStar = false;
|
||||
@@ -644,6 +657,9 @@ void vcs_VolPhase::setState_TP(const double temp, const double pres)
|
||||
if (m_useCanteraCalls) {
|
||||
TP_ptr->setElectricPotential(m_phi);
|
||||
TP_ptr->setState_TP(temp, pres);
|
||||
} else {
|
||||
warn_deprecated("m_useCanteraCalls", "Setting this flag to 'false' is "
|
||||
"deprecated and will not work after Cantera 2.2.");
|
||||
}
|
||||
Temp_ = temp;
|
||||
Pres_ = pres;
|
||||
@@ -664,6 +680,8 @@ void vcs_VolPhase::_updateVolStar() const
|
||||
if (m_useCanteraCalls) {
|
||||
TP_ptr->getStandardVolumes(VCS_DATA_PTR(StarMolarVol));
|
||||
} else {
|
||||
warn_deprecated("m_useCanteraCalls", "Setting this flag to 'false' is "
|
||||
"deprecated and will not work after Cantera 2.2.");
|
||||
for (size_t k = 0; k < m_numSpecies; k++) {
|
||||
size_t kglob = IndSpecies[k];
|
||||
vcs_SpeciesProperties* sProp = ListSpeciesPtr[k];
|
||||
@@ -687,6 +705,8 @@ double vcs_VolPhase::_updateVolPM() const
|
||||
if (m_useCanteraCalls) {
|
||||
TP_ptr->getPartialMolarVolumes(VCS_DATA_PTR(PartialMolarVol));
|
||||
} else {
|
||||
warn_deprecated("m_useCanteraCalls", "Setting this flag to 'false' is "
|
||||
"deprecated and will not work after Cantera 2.2.");
|
||||
for (size_t k = 0; k < m_numSpecies; k++) {
|
||||
size_t kglob = IndSpecies[k];
|
||||
vcs_SpeciesProperties* sProp = ListSpeciesPtr[k];
|
||||
@@ -863,6 +883,9 @@ void vcs_VolPhase::setPtrThermoPhase(Cantera::ThermoPhase* tp_ptr)
|
||||
}
|
||||
} else {
|
||||
m_useCanteraCalls = false;
|
||||
warn_deprecated("m_useCanteraCalls", "Setting this flag to 'false' is "
|
||||
"deprecated and will not work after Cantera 2.2.");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user