From 9d2f7e0220a76a982a456c6931011de3ad818583 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Mon, 24 Jun 2013 15:22:25 +0000 Subject: [PATCH] Deprecate report/modifyParameters methods of SpeciesThermoInterpType --- include/cantera/thermo/AdsorbateThermo.h | 3 +++ include/cantera/thermo/Mu0Poly.h | 1 + include/cantera/thermo/Nasa9Poly1.h | 2 ++ include/cantera/thermo/NasaPoly1.h | 4 ++++ include/cantera/thermo/SpeciesThermoInterpType.h | 4 ++++ src/thermo/Mu0Poly.cpp | 1 + src/thermo/Nasa9Poly1.cpp | 2 ++ src/thermo/Nasa9PolyMultiTempRegion.cpp | 2 ++ src/thermo/Nasa9PolyMultiTempRegion.h | 2 ++ src/thermo/NasaPoly2.h | 2 ++ src/thermo/ShomatePoly.h | 7 +++++++ src/thermo/SpeciesThermoInterpType.cpp | 3 +++ src/thermo/StatMech.cpp | 1 + 13 files changed, 34 insertions(+) diff --git a/include/cantera/thermo/AdsorbateThermo.h b/include/cantera/thermo/AdsorbateThermo.h index 69e0cda6a..7b72e64b6 100644 --- a/include/cantera/thermo/AdsorbateThermo.h +++ b/include/cantera/thermo/AdsorbateThermo.h @@ -12,6 +12,7 @@ #define CT_ADSORBATE_H #include "SpeciesThermoInterpType.h" +#include "cantera/base/global.h" namespace Cantera { @@ -118,10 +119,12 @@ public: s_R[m_index] = h_RT[m_index] - _free_energy_RT(temp); } + //! @deprecated void reportParameters(size_t& n, int& type, doublereal& tlow, doublereal& thigh, doublereal& pref, doublereal* const coeffs) const { + warn_deprecated("AdsorbateThermo::reportParameters"); n = m_index; type = ADSORBATE; tlow = m_lowT; diff --git a/include/cantera/thermo/Mu0Poly.h b/include/cantera/thermo/Mu0Poly.h index 8123ca856..2e258c397 100644 --- a/include/cantera/thermo/Mu0Poly.h +++ b/include/cantera/thermo/Mu0Poly.h @@ -148,6 +148,7 @@ public: doublereal* cp_R, doublereal* h_RT, doublereal* s_R) const ; + //! @deprecated virtual void reportParameters(size_t& n, int& type, doublereal& tlow, doublereal& thigh, doublereal& pref, diff --git a/include/cantera/thermo/Nasa9Poly1.h b/include/cantera/thermo/Nasa9Poly1.h index 7cbb0072b..6158cf0dd 100644 --- a/include/cantera/thermo/Nasa9Poly1.h +++ b/include/cantera/thermo/Nasa9Poly1.h @@ -173,6 +173,7 @@ public: * coeffs[1] is min temperature * coeffs[2] is max temperature * coeffs[3+i] from i =0,9 are the coefficients themselves + * @deprecated */ virtual void reportParameters(size_t& n, int& type, doublereal& tlow, doublereal& thigh, @@ -183,6 +184,7 @@ public: /*! * @param coeffs Vector of coefficients used to set the * parameters for the standard state. + * @deprecated */ virtual void modifyParameters(doublereal* coeffs); diff --git a/include/cantera/thermo/NasaPoly1.h b/include/cantera/thermo/NasaPoly1.h index eb2188a73..776952283 100644 --- a/include/cantera/thermo/NasaPoly1.h +++ b/include/cantera/thermo/NasaPoly1.h @@ -186,10 +186,12 @@ public: updateProperties(tPoly, cp_R, h_RT, s_R); } + //! @deprecated virtual void reportParameters(size_t& n, int& type, doublereal& tlow, doublereal& thigh, doublereal& pref, doublereal* const coeffs) const { + warn_deprecated("NasaPoly1::reportParameters"); n = m_index; type = NASA1; tlow = m_lowT; @@ -206,8 +208,10 @@ public: /*! * @param coeffs Vector of coefficients used to set the * parameters for the standard state. + * @deprecated */ virtual void modifyParameters(doublereal* coeffs) { + warn_deprecated("NasaPoly1::modifyParameters"); m_coeff[0] = coeffs[5]; m_coeff[1] = coeffs[6]; for (int i = 0; i < 5; i++) { diff --git a/include/cantera/thermo/SpeciesThermoInterpType.h b/include/cantera/thermo/SpeciesThermoInterpType.h index eaab77e74..07ed21c24 100644 --- a/include/cantera/thermo/SpeciesThermoInterpType.h +++ b/include/cantera/thermo/SpeciesThermoInterpType.h @@ -235,6 +235,7 @@ public: * @param refPressure output - reference pressure (Pa). * @param coeffs Vector of coefficients used to set the * parameters for the standard state. + * @deprecated */ virtual void reportParameters(size_t& index, int& type, doublereal& minTemp, doublereal& maxTemp, @@ -245,6 +246,7 @@ public: /*! * @param coeffs Vector of coefficients used to set the * parameters for the standard state. + * @deprecated */ virtual void modifyParameters(doublereal* coeffs) {} @@ -356,11 +358,13 @@ public: doublereal* h_RT, doublereal* s_R) const; + //! @deprecated virtual void reportParameters(size_t& index, int& type, doublereal& minTemp, doublereal& maxTemp, doublereal& refPressure, doublereal* const coeffs) const; + //! @deprecated virtual void modifyParameters(doublereal* coeffs); private: diff --git a/src/thermo/Mu0Poly.cpp b/src/thermo/Mu0Poly.cpp index 56ef19dbb..af3d14246 100644 --- a/src/thermo/Mu0Poly.cpp +++ b/src/thermo/Mu0Poly.cpp @@ -128,6 +128,7 @@ void Mu0Poly::reportParameters(size_t& n, int& type, doublereal& pref, doublereal* const coeffs) const { + warn_deprecated("Mu0Poly::reportParameters"); n = m_index; type = MU0_INTERP; tlow = m_lowT; diff --git a/src/thermo/Nasa9Poly1.cpp b/src/thermo/Nasa9Poly1.cpp index 5347a13fa..74cf33d38 100644 --- a/src/thermo/Nasa9Poly1.cpp +++ b/src/thermo/Nasa9Poly1.cpp @@ -137,6 +137,7 @@ void Nasa9Poly1::reportParameters(size_t& n, int& type, doublereal& pref, doublereal* const coeffs) const { + warn_deprecated("Nasa9Poly1::reportParameters"); n = m_index; type = NASA9; tlow = m_lowT; @@ -152,6 +153,7 @@ void Nasa9Poly1::reportParameters(size_t& n, int& type, void Nasa9Poly1::modifyParameters(doublereal* coeffs) { + warn_deprecated("Nasa9Poly1::modifyParameters"); for (int i = 0; i < 9; i++) { m_coeff[i] = coeffs[i]; } diff --git a/src/thermo/Nasa9PolyMultiTempRegion.cpp b/src/thermo/Nasa9PolyMultiTempRegion.cpp index 676edbda6..396ffded5 100644 --- a/src/thermo/Nasa9PolyMultiTempRegion.cpp +++ b/src/thermo/Nasa9PolyMultiTempRegion.cpp @@ -204,6 +204,7 @@ void Nasa9PolyMultiTempRegion::reportParameters(size_t& n, int& type, doublereal& pref, doublereal* const coeffs) const { + warn_deprecated("Nasa9PolyMultiTempRegion::reportParameters"); n = m_index; type = NASA9MULTITEMP; tlow = m_lowT; @@ -229,6 +230,7 @@ void Nasa9PolyMultiTempRegion::reportParameters(size_t& n, int& type, void Nasa9PolyMultiTempRegion::modifyParameters(doublereal* coeffs) { + warn_deprecated("Nasa9PolyMultiTempRegion::modifyParameters"); int index = 3; for (size_t iReg = 0; iReg < m_numTempRegions; iReg++) { m_regionPts[iReg]->modifyParameters(coeffs + index); diff --git a/src/thermo/Nasa9PolyMultiTempRegion.h b/src/thermo/Nasa9PolyMultiTempRegion.h index d557ea748..386c7e8f1 100644 --- a/src/thermo/Nasa9PolyMultiTempRegion.h +++ b/src/thermo/Nasa9PolyMultiTempRegion.h @@ -179,6 +179,7 @@ public: * coeffs[index] = minTempZone * coeffs[index+1] = maxTempZone * coeffs[index+2+i] from i =0,9 are the coefficients themselves + * @deprecated */ virtual void reportParameters(size_t& n, int& type, doublereal& tlow, doublereal& thigh, @@ -189,6 +190,7 @@ public: /*! * @param coeffs Vector of coefficients used to set the * parameters for the standard state. + * @deprecated */ virtual void modifyParameters(doublereal* coeffs); diff --git a/src/thermo/NasaPoly2.h b/src/thermo/NasaPoly2.h index a3edb40de..18746571c 100644 --- a/src/thermo/NasaPoly2.h +++ b/src/thermo/NasaPoly2.h @@ -180,10 +180,12 @@ public: } } + //! @deprecated void reportParameters(size_t& n, int& type, doublereal& tlow, doublereal& thigh, doublereal& pref, doublereal* const coeffs) const { + warn_deprecated("NasaPoly2::reportParameters"); n = m_index; type = NASA2; tlow = m_lowT; diff --git a/src/thermo/ShomatePoly.h b/src/thermo/ShomatePoly.h index 990335aa0..10f9d0c2e 100644 --- a/src/thermo/ShomatePoly.h +++ b/src/thermo/ShomatePoly.h @@ -13,6 +13,7 @@ #define CT_SHOMATEPOLY1_H #include "cantera/thermo/SpeciesThermoInterpType.h" +#include "cantera/base/global.h" namespace Cantera { @@ -216,10 +217,12 @@ public: updateProperties(tPoly, cp_R, h_RT, s_R); } + //! @deprecated virtual void reportParameters(size_t& n, int& type, doublereal& tlow, doublereal& thigh, doublereal& pref, doublereal* const coeffs) const { + warn_deprecated("ShomatePoly::reportParameters"); n = m_index; type = SHOMATE; tlow = m_lowT; @@ -236,6 +239,7 @@ public: * parameters for the standard state. */ virtual void modifyParameters(doublereal* coeffs) { + warn_deprecated("ShomatePoly::modifyParameters"); if (m_coeff.size() != 7) { throw CanteraError("modifyParameters", "modifying something that hasn't been initialized"); @@ -495,10 +499,12 @@ public: } } + //! @deprecated virtual void reportParameters(size_t& n, int& type, doublereal& tlow, doublereal& thigh, doublereal& pref, doublereal* const coeffs) const { + warn_deprecated("ShomatePoly2::reportParameters"); n = m_index; type = SHOMATE2; tlow = m_lowT; @@ -517,6 +523,7 @@ public: * parameters for the standard state. */ virtual void modifyParameters(doublereal* coeffs) { + warn_deprecated("ShomatePoly2::modifyParameters"); delete msp_low; delete msp_high; std::copy(coeffs, coeffs + 15, m_coeff.begin()); diff --git a/src/thermo/SpeciesThermoInterpType.cpp b/src/thermo/SpeciesThermoInterpType.cpp index 69d54fd2b..aca1119c4 100644 --- a/src/thermo/SpeciesThermoInterpType.cpp +++ b/src/thermo/SpeciesThermoInterpType.cpp @@ -8,6 +8,7 @@ #include "cantera/thermo/VPSSMgr.h" #include "cantera/thermo/PDSS.h" #include "cantera/base/ctexceptions.h" + #include "cantera/base/global.h" namespace Cantera { @@ -128,6 +129,7 @@ void STITbyPDSS::reportParameters(size_t& index, int& type, doublereal& refPressure, doublereal* const coeffs) const { + warn_deprecated("STITbyPDSS::reportParameters"); index = m_speciesIndex; type = PDSS_TYPE; minTemp = m_vpssmgr_ptr->minTemp(m_speciesIndex); @@ -137,6 +139,7 @@ void STITbyPDSS::reportParameters(size_t& index, int& type, void STITbyPDSS::modifyParameters(doublereal* coeffs) { + warn_deprecated("STITbyPDSS::modifyParameters"); } } diff --git a/src/thermo/StatMech.cpp b/src/thermo/StatMech.cpp index 326bb13cc..5300c7f38 100644 --- a/src/thermo/StatMech.cpp +++ b/src/thermo/StatMech.cpp @@ -641,6 +641,7 @@ void StatMech::reportParameters(size_t& n, int& type, doublereal& pref, doublereal* const coeffs) const { + warn_deprecated("StatMech::reportParameters"); species* s; n = m_index;