From 1dd7b214b5d71d3403b8ebedb16995a88b75b6b8 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Tue, 14 Apr 2015 15:18:20 -0400 Subject: [PATCH] [Thermo] Deprecate unused method 'getUnitsStandardConc' First step in resolving Issue #96 --- include/cantera/thermo/DebyeHuckel.h | 1 + include/cantera/thermo/FixedChemPotSSTP.h | 1 + include/cantera/thermo/GibbsExcessVPSSTP.h | 1 + include/cantera/thermo/HMWSoln.h | 1 + include/cantera/thermo/IdealMolalSoln.h | 1 + include/cantera/thermo/IdealSolidSolnPhase.h | 1 + include/cantera/thermo/IdealSolnGasVPSS.h | 1 + include/cantera/thermo/MetalSHEelectrons.h | 1 + include/cantera/thermo/MineralEQ3.h | 1 + include/cantera/thermo/MolalityVPSSTP.h | 1 + include/cantera/thermo/RedlichKwongMFTP.h | 1 + include/cantera/thermo/StoichSubstance.h | 1 + include/cantera/thermo/StoichSubstanceSSTP.h | 1 + include/cantera/thermo/ThermoPhase.h | 1 + src/thermo/DebyeHuckel.cpp | 2 ++ src/thermo/FixedChemPotSSTP.cpp | 2 ++ src/thermo/GibbsExcessVPSSTP.cpp | 2 ++ src/thermo/HMWSoln.cpp | 2 ++ src/thermo/IdealMolalSoln.cpp | 3 +++ src/thermo/IdealSolidSolnPhase.cpp | 2 ++ src/thermo/IdealSolnGasVPSS.cpp | 3 +++ src/thermo/MetalSHEelectrons.cpp | 3 +++ src/thermo/MineralEQ3.cpp | 3 +++ src/thermo/MolalityVPSSTP.cpp | 3 +++ src/thermo/RedlichKwongMFTP.cpp | 3 +++ src/thermo/StoichSubstance.cpp | 2 ++ src/thermo/StoichSubstanceSSTP.cpp | 2 ++ src/thermo/ThermoPhase.cpp | 2 ++ 28 files changed, 48 insertions(+) diff --git a/include/cantera/thermo/DebyeHuckel.h b/include/cantera/thermo/DebyeHuckel.h index 948249e02..edffaa547 100644 --- a/include/cantera/thermo/DebyeHuckel.h +++ b/include/cantera/thermo/DebyeHuckel.h @@ -869,6 +869,7 @@ public: * @param k species index. Defaults to 0. * @param sizeUA output int containing the size of the vector. * Currently, this is equal to 6. + * @deprecated To be removed after Cantera 2.2. */ virtual void getUnitsStandardConc(double* uA, int k = 0, int sizeUA = 6) const; diff --git a/include/cantera/thermo/FixedChemPotSSTP.h b/include/cantera/thermo/FixedChemPotSSTP.h index 16375ffcd..6e0c5e144 100644 --- a/include/cantera/thermo/FixedChemPotSSTP.h +++ b/include/cantera/thermo/FixedChemPotSSTP.h @@ -348,6 +348,7 @@ public: * @param k species index. Defaults to 0. * @param sizeUA output int containing the size of the vector. * Currently, this is equal to 6. + * @deprecated To be removed after Cantera 2.2. */ virtual void getUnitsStandardConc(doublereal* uA, int k = 0, int sizeUA = 6) const; diff --git a/include/cantera/thermo/GibbsExcessVPSSTP.h b/include/cantera/thermo/GibbsExcessVPSSTP.h index 36825b58d..024ec1b8c 100644 --- a/include/cantera/thermo/GibbsExcessVPSSTP.h +++ b/include/cantera/thermo/GibbsExcessVPSSTP.h @@ -252,6 +252,7 @@ public: * @param k species index. Defaults to 0. * @param sizeUA output int containing the size of the vector. * Currently, this is equal to 6. + * @deprecated To be removed after Cantera 2.2. */ virtual void getUnitsStandardConc(double* uA, int k = 0, int sizeUA = 6) const; diff --git a/include/cantera/thermo/HMWSoln.h b/include/cantera/thermo/HMWSoln.h index 4021cb578..e38d1d79d 100644 --- a/include/cantera/thermo/HMWSoln.h +++ b/include/cantera/thermo/HMWSoln.h @@ -1670,6 +1670,7 @@ public: * @param k species index. Defaults to 0. * @param sizeUA output int containing the size of the vector. * Currently, this is equal to 6. + * @deprecated To be removed after Cantera 2.2. */ virtual void getUnitsStandardConc(double* uA, int k = 0, int sizeUA = 6) const; diff --git a/include/cantera/thermo/IdealMolalSoln.h b/include/cantera/thermo/IdealMolalSoln.h index bf8b00d52..c32032eec 100644 --- a/include/cantera/thermo/IdealMolalSoln.h +++ b/include/cantera/thermo/IdealMolalSoln.h @@ -383,6 +383,7 @@ public: * @param k species index. Defaults to 0. * @param sizeUA output int containing the size of the vector. * Currently, this is equal to 6. + * @deprecated To be removed after Cantera 2.2. */ virtual void getUnitsStandardConc(double* uA, int k = 0, int sizeUA = 6) const; diff --git a/include/cantera/thermo/IdealSolidSolnPhase.h b/include/cantera/thermo/IdealSolidSolnPhase.h index 41cd7415a..cd0d2e9fa 100644 --- a/include/cantera/thermo/IdealSolidSolnPhase.h +++ b/include/cantera/thermo/IdealSolidSolnPhase.h @@ -440,6 +440,7 @@ public: * kmol/m3 holds for standard concentration units. For * cIdealSolidSolnPhase0 type, the standard concentration is * unitless. + * @deprecated To be removed after Cantera 2.2. */ virtual void getUnitsStandardConc(double* uA, int k = 0, int sizeUA = 6) const; diff --git a/include/cantera/thermo/IdealSolnGasVPSS.h b/include/cantera/thermo/IdealSolnGasVPSS.h index ece08e47b..3b8f70e3d 100644 --- a/include/cantera/thermo/IdealSolnGasVPSS.h +++ b/include/cantera/thermo/IdealSolnGasVPSS.h @@ -189,6 +189,7 @@ public: * @param k species index. Defaults to 0. * @param sizeUA output int containing the size of the vector. * Currently, this is equal to 6. + * @deprecated To be removed after Cantera 2.2. */ virtual void getUnitsStandardConc(double* uA, int k = 0, int sizeUA = 6) const; diff --git a/include/cantera/thermo/MetalSHEelectrons.h b/include/cantera/thermo/MetalSHEelectrons.h index 07ed233e6..b5cce4518 100644 --- a/include/cantera/thermo/MetalSHEelectrons.h +++ b/include/cantera/thermo/MetalSHEelectrons.h @@ -361,6 +361,7 @@ public: * @param k species index. Defaults to 0. * @param sizeUA output int containing the size of the vector. * Currently, this is equal to 6. + * @deprecated To be removed after Cantera 2.2. */ virtual void getUnitsStandardConc(doublereal* uA, int k = 0, int sizeUA = 6) const; diff --git a/include/cantera/thermo/MineralEQ3.h b/include/cantera/thermo/MineralEQ3.h index 538b18db8..e0cca09ca 100644 --- a/include/cantera/thermo/MineralEQ3.h +++ b/include/cantera/thermo/MineralEQ3.h @@ -277,6 +277,7 @@ public: * @param k species index. Defaults to 0. * @param sizeUA output int containing the size of the vector. * Currently, this is equal to 6. + * @deprecated To be removed after Cantera 2.2. */ virtual void getUnitsStandardConc(doublereal* uA, int k = 0, int sizeUA = 6) const; diff --git a/include/cantera/thermo/MolalityVPSSTP.h b/include/cantera/thermo/MolalityVPSSTP.h index 45b071504..b0ae47f12 100644 --- a/include/cantera/thermo/MolalityVPSSTP.h +++ b/include/cantera/thermo/MolalityVPSSTP.h @@ -442,6 +442,7 @@ public: * @param k species index. Defaults to 0. * @param sizeUA output int containing the size of the vector. * Currently, this is equal to 6. + * @deprecated To be removed after Cantera 2.2. */ virtual void getUnitsStandardConc(double* uA, int k = 0, int sizeUA = 6) const; diff --git a/include/cantera/thermo/RedlichKwongMFTP.h b/include/cantera/thermo/RedlichKwongMFTP.h index 31bd9d39f..ef74a100b 100644 --- a/include/cantera/thermo/RedlichKwongMFTP.h +++ b/include/cantera/thermo/RedlichKwongMFTP.h @@ -279,6 +279,7 @@ public: * @param k species index. Defaults to 0. * @param sizeUA output int containing the size of the vector. * Currently, this is equal to 6. + * @deprecated To be removed after Cantera 2.2. */ virtual void getUnitsStandardConc(double* uA, int k = 0, int sizeUA = 6) const; diff --git a/include/cantera/thermo/StoichSubstance.h b/include/cantera/thermo/StoichSubstance.h index fdcfa6653..fece38d42 100644 --- a/include/cantera/thermo/StoichSubstance.h +++ b/include/cantera/thermo/StoichSubstance.h @@ -181,6 +181,7 @@ public: * uA[3] = Pa(pressure) units - default = 0; * uA[4] = Temperature units - default = 0; * uA[5] = time units - default = 0 + * @deprecated To be removed after Cantera 2.2. */ virtual void getUnitsStandardConc(double* uA, int k = 0, int sizeUA = 6) const; diff --git a/include/cantera/thermo/StoichSubstanceSSTP.h b/include/cantera/thermo/StoichSubstanceSSTP.h index 6ca94e296..362746b39 100644 --- a/include/cantera/thermo/StoichSubstanceSSTP.h +++ b/include/cantera/thermo/StoichSubstanceSSTP.h @@ -340,6 +340,7 @@ public: * @param k species index. Defaults to 0. * @param sizeUA output int containing the size of the vector. * Currently, this is equal to 6. + * @deprecated To be removed after Cantera 2.2. */ virtual void getUnitsStandardConc(doublereal* uA, int k = 0, int sizeUA = 6) const; diff --git a/include/cantera/thermo/ThermoPhase.h b/include/cantera/thermo/ThermoPhase.h index 8435a70a8..7d0824951 100644 --- a/include/cantera/thermo/ThermoPhase.h +++ b/include/cantera/thermo/ThermoPhase.h @@ -484,6 +484,7 @@ public: * @param k species index. Defaults to 0. * @param sizeUA output int containing the size of the vector. * Currently, this is equal to 6. + * @deprecated To be removed after Cantera 2.2. */ virtual void getUnitsStandardConc(double* uA, int k = 0, int sizeUA = 6) const; diff --git a/src/thermo/DebyeHuckel.cpp b/src/thermo/DebyeHuckel.cpp index 182bdc8b4..96440c84f 100644 --- a/src/thermo/DebyeHuckel.cpp +++ b/src/thermo/DebyeHuckel.cpp @@ -323,6 +323,8 @@ doublereal DebyeHuckel::standardConcentration(size_t k) const void DebyeHuckel::getUnitsStandardConc(double* uA, int k, int sizeUA) const { + warn_deprecated("DebyeHuckel::getUnitsStandardConc", + "To be removed after Cantera 2.2."); for (int i = 0; i < sizeUA; i++) { if (i == 0) { uA[0] = 1.0; diff --git a/src/thermo/FixedChemPotSSTP.cpp b/src/thermo/FixedChemPotSSTP.cpp index 65ad06a79..120b7cf41 100644 --- a/src/thermo/FixedChemPotSSTP.cpp +++ b/src/thermo/FixedChemPotSSTP.cpp @@ -191,6 +191,8 @@ doublereal FixedChemPotSSTP::logStandardConc(size_t k) const void FixedChemPotSSTP::getUnitsStandardConc(doublereal* uA, int k, int sizeUA) const { + warn_deprecated("FixedChemPotSSTP::getUnitsStandardConc", + "To be removed after Cantera 2.2."); for (int i = 0; i < 6; i++) { uA[i] = 0; } diff --git a/src/thermo/GibbsExcessVPSSTP.cpp b/src/thermo/GibbsExcessVPSSTP.cpp index 6c6e95f38..96a994add 100644 --- a/src/thermo/GibbsExcessVPSSTP.cpp +++ b/src/thermo/GibbsExcessVPSSTP.cpp @@ -232,6 +232,8 @@ double GibbsExcessVPSSTP::checkMFSum(const doublereal* const x) const void GibbsExcessVPSSTP::getUnitsStandardConc(double* uA, int k, int sizeUA) const { + warn_deprecated("GibbsExcessVPSSTP::getUnitsStandardConc", + "To be removed after Cantera 2.2."); // // We assume here that the units of the standard concentration is unitless. In other words activities are // used unchanged in kinetics expressions. This may be changed in implementations of child classes. diff --git a/src/thermo/HMWSoln.cpp b/src/thermo/HMWSoln.cpp index 74732df03..e2c16723a 100644 --- a/src/thermo/HMWSoln.cpp +++ b/src/thermo/HMWSoln.cpp @@ -626,6 +626,8 @@ doublereal HMWSoln::standardConcentration(size_t k) const void HMWSoln::getUnitsStandardConc(double* uA, int k, int sizeUA) const { + warn_deprecated("HMWSoln::getUnitsStandardConc", + "To be removed after Cantera 2.2."); for (int i = 0; i < sizeUA; i++) { if (i == 0) { uA[0] = 1.0; diff --git a/src/thermo/IdealMolalSoln.cpp b/src/thermo/IdealMolalSoln.cpp index b2a465e28..5a7dddf64 100644 --- a/src/thermo/IdealMolalSoln.cpp +++ b/src/thermo/IdealMolalSoln.cpp @@ -267,6 +267,9 @@ doublereal IdealMolalSoln::standardConcentration(size_t k) const void IdealMolalSoln::getUnitsStandardConc(double* uA, int k, int sizeUA) const { + warn_deprecated("IdealMolalSoln::getUnitsStandardConc", + "To be removed after Cantera 2.2."); + int eos = eosType(); if (eos == 0) { for (int i = 0; i < sizeUA; i++) { diff --git a/src/thermo/IdealSolidSolnPhase.cpp b/src/thermo/IdealSolidSolnPhase.cpp index cd00ef578..ecf2050e5 100644 --- a/src/thermo/IdealSolidSolnPhase.cpp +++ b/src/thermo/IdealSolidSolnPhase.cpp @@ -284,6 +284,8 @@ doublereal IdealSolidSolnPhase::logStandardConc(size_t k) const void IdealSolidSolnPhase::getUnitsStandardConc(double* uA, int, int sizeUA) const { + warn_deprecated("IdealSolidSolnPhase::getUnitsStandardConc", + "To be removed after Cantera 2.2."); int eos = eosType(); if (eos == cIdealSolidSolnPhase0) { for (int i = 0; i < sizeUA; i++) { diff --git a/src/thermo/IdealSolnGasVPSS.cpp b/src/thermo/IdealSolnGasVPSS.cpp index 3633df644..1d3783588 100644 --- a/src/thermo/IdealSolnGasVPSS.cpp +++ b/src/thermo/IdealSolnGasVPSS.cpp @@ -197,6 +197,9 @@ doublereal IdealSolnGasVPSS::standardConcentration(size_t k) const void IdealSolnGasVPSS::getUnitsStandardConc(double* uA, int, int sizeUA) const { + warn_deprecated("IdealSolnGasVPSS::getUnitsStandardConc", + "To be removed after Cantera 2.2."); + if (eosType() == cIdealSolnGasPhase0) { for (int i = 0; i < sizeUA; i++) { uA[i] = 0.0; diff --git a/src/thermo/MetalSHEelectrons.cpp b/src/thermo/MetalSHEelectrons.cpp index 21e884b66..bbb37fefc 100644 --- a/src/thermo/MetalSHEelectrons.cpp +++ b/src/thermo/MetalSHEelectrons.cpp @@ -159,6 +159,9 @@ doublereal MetalSHEelectrons::logStandardConc(size_t k) const void MetalSHEelectrons::getUnitsStandardConc(doublereal* uA, int k, int sizeUA) const { + warn_deprecated("MetalSHEelectrons::getUnitsStandardConc", + "To be removed after Cantera 2.2."); + for (int i = 0; i < 6; i++) { uA[i] = 0; } diff --git a/src/thermo/MineralEQ3.cpp b/src/thermo/MineralEQ3.cpp index 947fb7a6a..3c349eb9f 100644 --- a/src/thermo/MineralEQ3.cpp +++ b/src/thermo/MineralEQ3.cpp @@ -146,6 +146,9 @@ doublereal MineralEQ3::logStandardConc(size_t k) const void MineralEQ3::getUnitsStandardConc(doublereal* uA, int k, int sizeUA) const { + warn_deprecated("MineralEQ3::getUnitsStandardConc", + "To be removed after Cantera 2.2."); + for (int i = 0; i < 6; i++) { uA[i] = 0; } diff --git a/src/thermo/MolalityVPSSTP.cpp b/src/thermo/MolalityVPSSTP.cpp index 1183bc45a..ef055ad34 100644 --- a/src/thermo/MolalityVPSSTP.cpp +++ b/src/thermo/MolalityVPSSTP.cpp @@ -331,6 +331,9 @@ void MolalityVPSSTP::getElectrochemPotentials(doublereal* mu) const void MolalityVPSSTP::getUnitsStandardConc(double* uA, int k, int sizeUA) const { + warn_deprecated("MolalityVPSSTP::getUnitsStandardConc", + "To be removed after Cantera 2.2."); + for (int i = 0; i < sizeUA; i++) { if (i == 0) { uA[0] = 1.0; diff --git a/src/thermo/RedlichKwongMFTP.cpp b/src/thermo/RedlichKwongMFTP.cpp index 0c5bc3d7b..6c8e41c93 100644 --- a/src/thermo/RedlichKwongMFTP.cpp +++ b/src/thermo/RedlichKwongMFTP.cpp @@ -304,6 +304,9 @@ doublereal RedlichKwongMFTP::standardConcentration(size_t k) const void RedlichKwongMFTP::getUnitsStandardConc(double* uA, int, int sizeUA) const { + warn_deprecated("RedlichKwongMFTP::getUnitsStandardConc", + "To be removed after Cantera 2.2."); + //int eos = eosType(); for (int i = 0; i < sizeUA; i++) { diff --git a/src/thermo/StoichSubstance.cpp b/src/thermo/StoichSubstance.cpp index 24393d5eb..fbafca7d6 100644 --- a/src/thermo/StoichSubstance.cpp +++ b/src/thermo/StoichSubstance.cpp @@ -138,6 +138,8 @@ void StoichSubstance::getStandardChemPotentials(doublereal* mu0) const void StoichSubstance::getUnitsStandardConc(double* uA, int k, int sizeUA) const { + warn_deprecated("StoichSubstance::getUnitsStandardConc", + "To be removed after Cantera 2.2."); for (int i = 0; i < sizeUA; i++) { uA[i] = 0.0; } diff --git a/src/thermo/StoichSubstanceSSTP.cpp b/src/thermo/StoichSubstanceSSTP.cpp index cd23507b0..c20ae4843 100644 --- a/src/thermo/StoichSubstanceSSTP.cpp +++ b/src/thermo/StoichSubstanceSSTP.cpp @@ -131,6 +131,8 @@ doublereal StoichSubstanceSSTP::logStandardConc(size_t k) const void StoichSubstanceSSTP::getUnitsStandardConc(doublereal* uA, int k, int sizeUA) const { + warn_deprecated("StoichSubstanceSSTP::getUnitsStandardConc", + "To be removed after Cantera 2.2."); for (int i = 0; i < 6; i++) { uA[i] = 0; } diff --git a/src/thermo/ThermoPhase.cpp b/src/thermo/ThermoPhase.cpp index 27016ff34..4b92aeac6 100644 --- a/src/thermo/ThermoPhase.cpp +++ b/src/thermo/ThermoPhase.cpp @@ -587,6 +587,8 @@ void ThermoPhase::setState_SPorSV(doublereal Starget, doublereal p, void ThermoPhase::getUnitsStandardConc(double* uA, int k, int sizeUA) const { + warn_deprecated("ThermoPhase::getUnitsStandardConc", + "To be removed after Cantera 2.2."); for (int i = 0; i < sizeUA; i++) { if (i == 0) { uA[0] = 1.0;