From 34dc185ec5cdaefa6d8a1817c10c442ba32c8c53 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Fri, 3 Jun 2022 17:53:55 -0400 Subject: [PATCH] [Thermo] Deprecate unused getChemPotentials_RT method --- include/cantera/thermo/IdealSolidSolnPhase.h | 1 + include/cantera/thermo/MaskellSolidSolnPhase.h | 1 + include/cantera/thermo/MixtureFugacityTP.h | 1 + include/cantera/thermo/RedlichKwongMFTP.h | 1 + include/cantera/thermo/SingleSpeciesTP.h | 1 + include/cantera/thermo/ThermoPhase.h | 2 ++ include/cantera/thermo/VPStandardStateTP.h | 1 + src/thermo/IdealSolidSolnPhase.cpp | 2 ++ src/thermo/MaskellSolidSolnPhase.cpp | 3 +++ src/thermo/MixtureFugacityTP.cpp | 2 ++ src/thermo/RedlichKwongMFTP.cpp | 2 ++ src/thermo/SingleSpeciesTP.cpp | 2 ++ src/thermo/VPStandardStateTP.cpp | 3 +++ 13 files changed, 22 insertions(+) diff --git a/include/cantera/thermo/IdealSolidSolnPhase.h b/include/cantera/thermo/IdealSolidSolnPhase.h index 1b6f2b24f10..5a14ec9c038 100644 --- a/include/cantera/thermo/IdealSolidSolnPhase.h +++ b/include/cantera/thermo/IdealSolidSolnPhase.h @@ -306,6 +306,7 @@ class IdealSolidSolnPhase : public ThermoPhase * * @param mu Output vector of dimensionless chemical potentials. * Length = m_kk. + * @deprecated To be removed after Cantera 3.0. Use getChemPotentials() instead. */ virtual void getChemPotentials_RT(doublereal* mu) const; diff --git a/include/cantera/thermo/MaskellSolidSolnPhase.h b/include/cantera/thermo/MaskellSolidSolnPhase.h index 139bfff17ed..9fb9b889fce 100644 --- a/include/cantera/thermo/MaskellSolidSolnPhase.h +++ b/include/cantera/thermo/MaskellSolidSolnPhase.h @@ -80,6 +80,7 @@ class MaskellSolidSolnPhase : public VPStandardStateTP virtual void getActivityCoefficients(doublereal* ac) const; virtual void getChemPotentials(doublereal* mu) const; + //! @deprecated To be removed after Cantera 3.0. Use getChemPotentials() instead. virtual void getChemPotentials_RT(doublereal* mu) const; //! @} diff --git a/include/cantera/thermo/MixtureFugacityTP.h b/include/cantera/thermo/MixtureFugacityTP.h index ed723e4d91d..b1683706e30 100644 --- a/include/cantera/thermo/MixtureFugacityTP.h +++ b/include/cantera/thermo/MixtureFugacityTP.h @@ -141,6 +141,7 @@ class MixtureFugacityTP : public ThermoPhase * * @param mu Output vector of non-dimensional species chemical potentials * Length: m_kk. + * @deprecated To be removed after Cantera 3.0. Use getChemPotentials() instead. */ virtual void getChemPotentials_RT(doublereal* mu) const; diff --git a/include/cantera/thermo/RedlichKwongMFTP.h b/include/cantera/thermo/RedlichKwongMFTP.h index f6ceba56d59..826cfe63f61 100644 --- a/include/cantera/thermo/RedlichKwongMFTP.h +++ b/include/cantera/thermo/RedlichKwongMFTP.h @@ -98,6 +98,7 @@ class RedlichKwongMFTP : public MixtureFugacityTP * * @param mu Output vector of non-dimensional species chemical potentials * Length: m_kk. + * @deprecated To be removed after Cantera 3.0. Use getChemPotentials() instead. */ virtual void getChemPotentials_RT(doublereal* mu) const; diff --git a/include/cantera/thermo/SingleSpeciesTP.h b/include/cantera/thermo/SingleSpeciesTP.h index 7b7ceb9affe..0921dc58b4a 100644 --- a/include/cantera/thermo/SingleSpeciesTP.h +++ b/include/cantera/thermo/SingleSpeciesTP.h @@ -125,6 +125,7 @@ class SingleSpeciesTP : public ThermoPhase * * @param murt On return, Contains the chemical potential / RT of the * single species and the phase. Units are unitless. Length = 1 + * @deprecated To be removed after Cantera 3.0. Use getChemPotentials() instead. */ virtual void getChemPotentials_RT(doublereal* murt) const; diff --git a/include/cantera/thermo/ThermoPhase.h b/include/cantera/thermo/ThermoPhase.h index ddd9af110e1..0c383e50ffa 100644 --- a/include/cantera/thermo/ThermoPhase.h +++ b/include/cantera/thermo/ThermoPhase.h @@ -471,6 +471,8 @@ class ThermoPhase : public Phase * * @param mu Output vector of dimensionless chemical potentials. * Length: m_kk. + * + * @deprecated To be removed after Cantera 3.0. Use getChemPotentials() instead. */ virtual void getChemPotentials_RT(doublereal* mu) const { throw NotImplementedError("ThermoPhase::getChemPotentials_RT"); diff --git a/include/cantera/thermo/VPStandardStateTP.h b/include/cantera/thermo/VPStandardStateTP.h index f44383cd55e..36ca9e3ec02 100644 --- a/include/cantera/thermo/VPStandardStateTP.h +++ b/include/cantera/thermo/VPStandardStateTP.h @@ -76,6 +76,7 @@ class VPStandardStateTP : public ThermoPhase * * @param mu Output vector of non-dimensional species chemical potentials * Length: m_kk. + * @deprecated To be removed after Cantera 3.0. Use getChemPotentials() instead. */ virtual void getChemPotentials_RT(doublereal* mu) const; diff --git a/src/thermo/IdealSolidSolnPhase.cpp b/src/thermo/IdealSolidSolnPhase.cpp index 9ec6eb046f9..47705c6bc74 100644 --- a/src/thermo/IdealSolidSolnPhase.cpp +++ b/src/thermo/IdealSolidSolnPhase.cpp @@ -146,6 +146,8 @@ void IdealSolidSolnPhase::getChemPotentials(doublereal* mu) const void IdealSolidSolnPhase::getChemPotentials_RT(doublereal* mu) const { + warn_deprecated("IdealSolidSolnPhase::getChemPotentials_RT", + "To be removed after Cantera 3.0. Use getChemPotentials instead."); double delta_pdRT = (m_Pcurrent - m_Pref) / (temperature() * GasConstant); const vector_fp& g_RT = gibbs_RT_ref(); for (size_t k = 0; k < m_kk; k++) { diff --git a/src/thermo/MaskellSolidSolnPhase.cpp b/src/thermo/MaskellSolidSolnPhase.cpp index 30d67500931..dd51cf5cdda 100644 --- a/src/thermo/MaskellSolidSolnPhase.cpp +++ b/src/thermo/MaskellSolidSolnPhase.cpp @@ -10,6 +10,7 @@ #include "cantera/thermo/MaskellSolidSolnPhase.h" #include "cantera/base/stringUtils.h" +#include "cantera/base/global.h" #include @@ -112,6 +113,8 @@ void MaskellSolidSolnPhase::getChemPotentials(doublereal* mu) const void MaskellSolidSolnPhase::getChemPotentials_RT(doublereal* mu) const { + warn_deprecated("MaskellSolidSolnPhase::getChemPotentials_RT", + "To be removed after Cantera 3.0. Use getChemPotentials instead."); getChemPotentials(mu); for (size_t sp=0; sp < m_kk; ++sp) { mu[sp] *= 1.0 / RT(); diff --git a/src/thermo/MixtureFugacityTP.cpp b/src/thermo/MixtureFugacityTP.cpp index 1d4d3725a2f..206802dc9fa 100644 --- a/src/thermo/MixtureFugacityTP.cpp +++ b/src/thermo/MixtureFugacityTP.cpp @@ -63,6 +63,8 @@ double MixtureFugacityTP::entropy_mole() const void MixtureFugacityTP::getChemPotentials_RT(doublereal* muRT) const { + warn_deprecated("MixtureFugacityTP::getChemPotentials_RT", + "To be removed after Cantera 3.0. Use getChemPotentials instead."); getChemPotentials(muRT); for (size_t k = 0; k < m_kk; k++) { muRT[k] *= 1.0 / RT(); diff --git a/src/thermo/RedlichKwongMFTP.cpp b/src/thermo/RedlichKwongMFTP.cpp index 3267af53572..29de5111834 100644 --- a/src/thermo/RedlichKwongMFTP.cpp +++ b/src/thermo/RedlichKwongMFTP.cpp @@ -186,6 +186,8 @@ void RedlichKwongMFTP::getActivityCoefficients(doublereal* ac) const void RedlichKwongMFTP::getChemPotentials_RT(doublereal* muRT) const { + warn_deprecated("RedlichKwongMFTP::getChemPotentials_RT", + "To be removed after Cantera 3.0. Use getChemPotentials instead."); getChemPotentials(muRT); for (size_t k = 0; k < m_kk; k++) { muRT[k] *= 1.0 / RT(); diff --git a/src/thermo/SingleSpeciesTP.cpp b/src/thermo/SingleSpeciesTP.cpp index 9a423226dbf..c4a110c0159 100644 --- a/src/thermo/SingleSpeciesTP.cpp +++ b/src/thermo/SingleSpeciesTP.cpp @@ -95,6 +95,8 @@ void SingleSpeciesTP::getChemPotentials(doublereal* mu) const void SingleSpeciesTP::getChemPotentials_RT(doublereal* murt) const { + warn_deprecated("SingleSpeciesTP::getChemPotentials_RT", + "To be removed after Cantera 3.0. Use getChemPotentials instead."); getStandardChemPotentials(murt); murt[0] /= RT(); } diff --git a/src/thermo/VPStandardStateTP.cpp b/src/thermo/VPStandardStateTP.cpp index a277b860c31..84e5882b920 100644 --- a/src/thermo/VPStandardStateTP.cpp +++ b/src/thermo/VPStandardStateTP.cpp @@ -13,6 +13,7 @@ #include "cantera/thermo/PDSS.h" #include "cantera/thermo/Species.h" #include "cantera/base/utilities.h" +#include "cantera/base/global.h" using namespace std; @@ -39,6 +40,8 @@ int VPStandardStateTP::standardStateConvention() const void VPStandardStateTP::getChemPotentials_RT(doublereal* muRT) const { + warn_deprecated("VPStandardStateTP::getChemPotentials_RT", + "To be removed after Cantera 3.0. Use getChemPotentials instead."); getChemPotentials(muRT); for (size_t k = 0; k < m_kk; k++) { muRT[k] *= 1.0 / RT();