Skip to content

Commit

Permalink
[Thermo] Deprecate unused getChemPotentials_RT method
Browse files Browse the repository at this point in the history
  • Loading branch information
speth committed Jan 22, 2023
1 parent 7290046 commit 34dc185
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/cantera/thermo/IdealSolidSolnPhase.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions include/cantera/thermo/MaskellSolidSolnPhase.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

//! @}
Expand Down
1 change: 1 addition & 0 deletions include/cantera/thermo/MixtureFugacityTP.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions include/cantera/thermo/RedlichKwongMFTP.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions include/cantera/thermo/SingleSpeciesTP.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 2 additions & 0 deletions include/cantera/thermo/ThermoPhase.h
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
1 change: 1 addition & 0 deletions include/cantera/thermo/VPStandardStateTP.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 2 additions & 0 deletions src/thermo/IdealSolidSolnPhase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down
3 changes: 3 additions & 0 deletions src/thermo/MaskellSolidSolnPhase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include "cantera/thermo/MaskellSolidSolnPhase.h"
#include "cantera/base/stringUtils.h"
#include "cantera/base/global.h"

#include <cassert>

Expand Down Expand Up @@ -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();
Expand Down
2 changes: 2 additions & 0 deletions src/thermo/MixtureFugacityTP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 2 additions & 0 deletions src/thermo/RedlichKwongMFTP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 2 additions & 0 deletions src/thermo/SingleSpeciesTP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
3 changes: 3 additions & 0 deletions src/thermo/VPStandardStateTP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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();
Expand Down

0 comments on commit 34dc185

Please sign in to comment.