diff --git a/include/cantera/thermo/GeneralSpeciesThermo.h b/include/cantera/thermo/GeneralSpeciesThermo.h index df51e4ece..8c945cfed 100644 --- a/include/cantera/thermo/GeneralSpeciesThermo.h +++ b/include/cantera/thermo/GeneralSpeciesThermo.h @@ -123,9 +123,9 @@ public: doublereal& maxTemp, doublereal& refPressure) const; - virtual doublereal reportOneHf298(int k) const; + virtual doublereal reportOneHf298(const size_t k) const; - virtual void modifyOneHf298(const int k, const doublereal Hf298New); + virtual void modifyOneHf298(const size_t k, const doublereal Hf298New); private: //! Provide the SpeciesthermoInterpType object diff --git a/include/cantera/thermo/IdealGasPhase.h b/include/cantera/thermo/IdealGasPhase.h index 0d0523a3e..c6b91b48a 100644 --- a/include/cantera/thermo/IdealGasPhase.h +++ b/include/cantera/thermo/IdealGasPhase.h @@ -768,7 +768,7 @@ public: */ virtual void getEnthalpy_RT_ref(doublereal* hrt) const; - virtual void modifyOneHf298SS(const size_t& k, const doublereal Hf298New) { + virtual void modifyOneHf298SS(const size_t k, const doublereal Hf298New) { m_spthermo->modifyOneHf298(k, Hf298New); m_tlast += 0.0001234; } diff --git a/include/cantera/thermo/LatticePhase.h b/include/cantera/thermo/LatticePhase.h index 8818446e8..0ef4a3d23 100644 --- a/include/cantera/thermo/LatticePhase.h +++ b/include/cantera/thermo/LatticePhase.h @@ -741,7 +741,7 @@ public: * @param k Species k * @param Hf298New Specify the new value of the Heat of Formation at 298K and 1 bar */ - virtual void modifyOneHf298SS(const size_t& k, const doublereal Hf298New) { + virtual void modifyOneHf298SS(const size_t k, const doublereal Hf298New) { m_spthermo->modifyOneHf298(k, Hf298New); m_tlast += 0.0001234; } diff --git a/include/cantera/thermo/LatticeSolidPhase.h b/include/cantera/thermo/LatticeSolidPhase.h index d8d380604..ce7dd21fd 100644 --- a/include/cantera/thermo/LatticeSolidPhase.h +++ b/include/cantera/thermo/LatticeSolidPhase.h @@ -632,7 +632,7 @@ public: * @param k Species k * @param Hf298New Specify the new value of the Heat of Formation at 298K and 1 bar */ - virtual void modifyOneHf298SS(const size_t& k, const doublereal Hf298New); + virtual void modifyOneHf298SS(const size_t k, const doublereal Hf298New); private: //! error routine diff --git a/include/cantera/thermo/MixtureFugacityTP.h b/include/cantera/thermo/MixtureFugacityTP.h index f149927ce..e046c7365 100644 --- a/include/cantera/thermo/MixtureFugacityTP.h +++ b/include/cantera/thermo/MixtureFugacityTP.h @@ -486,7 +486,7 @@ public: * @param Hf298New Specify the new value of the Heat of Formation at 298K and 1 bar. * units = J/kmol. */ - void modifyOneHf298SS(const int k, const doublereal Hf298New); + void modifyOneHf298SS(const size_t k, const doublereal Hf298New); //! Returns the vector of nondimensional //! Gibbs free energies of the reference state at the current temperature diff --git a/include/cantera/thermo/NasaPoly1.h b/include/cantera/thermo/NasaPoly1.h index c6e550e08..760e03575 100644 --- a/include/cantera/thermo/NasaPoly1.h +++ b/include/cantera/thermo/NasaPoly1.h @@ -216,7 +216,7 @@ public: return h; } - virtual void modifyOneHf298(const size_t& k, const doublereal Hf298New) { + virtual void modifyOneHf298(const size_t k, const doublereal Hf298New) { if (k != m_index) { return; } diff --git a/include/cantera/thermo/SimpleThermo.h b/include/cantera/thermo/SimpleThermo.h index 626d6dadb..d490f4756 100644 --- a/include/cantera/thermo/SimpleThermo.h +++ b/include/cantera/thermo/SimpleThermo.h @@ -263,11 +263,11 @@ public: } } - virtual doublereal reportOneHf298(int k) const { + virtual doublereal reportOneHf298(const size_t k) const { throw CanteraError("reportHF298", "unimplemented"); } - virtual void modifyOneHf298(const int k, const doublereal Hf298New) { + virtual void modifyOneHf298(const size_t k, const doublereal Hf298New) { throw CanteraError("reportHF298", "unimplemented"); } diff --git a/include/cantera/thermo/SingleSpeciesTP.h b/include/cantera/thermo/SingleSpeciesTP.h index 1cee0413b..bd0c89aa3 100644 --- a/include/cantera/thermo/SingleSpeciesTP.h +++ b/include/cantera/thermo/SingleSpeciesTP.h @@ -334,7 +334,7 @@ public: * @param k Species k * @param Hf298New Specify the new value of the Heat of Formation at 298K and 1 bar */ - virtual void modifyOneHf298SS(const size_t& k, const doublereal Hf298New) { + virtual void modifyOneHf298SS(const size_t k, const doublereal Hf298New) { m_spthermo->modifyOneHf298(k, Hf298New); m_tlast += 0.0001234; } diff --git a/include/cantera/thermo/SpeciesThermo.h b/include/cantera/thermo/SpeciesThermo.h index 05a39a8fe..4a1a99d0e 100644 --- a/include/cantera/thermo/SpeciesThermo.h +++ b/include/cantera/thermo/SpeciesThermo.h @@ -317,7 +317,7 @@ public: * @param k species index * @return Returns the current value of the Heat of Formation at 298K and 1 bar */ - virtual doublereal reportOneHf298(int k) const = 0; + virtual doublereal reportOneHf298(const size_t k) const = 0; //! Modify the value of the 298 K Heat of Formation of the standard state of //! one species in the phase (J kmol-1) @@ -329,7 +329,7 @@ public: * @param Hf298New Specify the new value of the Heat of Formation at 298K and 1 bar. * units = J/kmol. */ - virtual void modifyOneHf298(const int k, const doublereal Hf298New) = 0; + virtual void modifyOneHf298(const size_t k, const doublereal Hf298New) = 0; }; //@} diff --git a/include/cantera/thermo/SpeciesThermoInterpType.h b/include/cantera/thermo/SpeciesThermoInterpType.h index 090f40400..82b3d7691 100644 --- a/include/cantera/thermo/SpeciesThermoInterpType.h +++ b/include/cantera/thermo/SpeciesThermoInterpType.h @@ -286,7 +286,7 @@ public: * @param k Species k * @param Hf298New Specify the new value of the Heat of Formation at 298K and 1 bar */ - virtual void modifyOneHf298(const int k, const doublereal Hf298New); + virtual void modifyOneHf298(const size_t k, const doublereal Hf298New); protected: //! lowest valid temperature diff --git a/include/cantera/thermo/SpeciesThermoMgr.h b/include/cantera/thermo/SpeciesThermoMgr.h index cbd262ba0..8d9e1e6f9 100644 --- a/include/cantera/thermo/SpeciesThermoMgr.h +++ b/include/cantera/thermo/SpeciesThermoMgr.h @@ -107,11 +107,11 @@ public: doublereal& maxTemp, doublereal& refPressure) const; - virtual doublereal reportOneHf298(int k) const { + virtual doublereal reportOneHf298(const size_t k) const { throw CanteraError("reportHF298", "unimplemented"); } - virtual void modifyOneHf298(const int k, const doublereal Hf298New) { + virtual void modifyOneHf298(const size_t k, const doublereal Hf298New) { throw CanteraError("reportHF298", "unimplemented"); } diff --git a/include/cantera/thermo/StoichSubstance.h b/include/cantera/thermo/StoichSubstance.h index 4e0fdf0e8..aa8a7ca29 100644 --- a/include/cantera/thermo/StoichSubstance.h +++ b/include/cantera/thermo/StoichSubstance.h @@ -297,7 +297,7 @@ public: */ virtual void getEnthalpy_RT_ref(doublereal* hrt) const; - virtual void modifyOneHf298SS(const size_t& k, const doublereal Hf298New) { + virtual void modifyOneHf298SS(const size_t k, const doublereal Hf298New) { m_spthermo->modifyOneHf298(k, Hf298New); m_tlast += 0.0001234; } diff --git a/include/cantera/thermo/SurfPhase.h b/include/cantera/thermo/SurfPhase.h index 3a80a3f1c..3894f791b 100644 --- a/include/cantera/thermo/SurfPhase.h +++ b/include/cantera/thermo/SurfPhase.h @@ -519,7 +519,7 @@ public: * @param k Species k * @param Hf298New Specify the new value of the Heat of Formation at 298K and 1 bar */ - virtual void modifyOneHf298SS(const size_t& k, const doublereal Hf298New) { + virtual void modifyOneHf298SS(const size_t k, const doublereal Hf298New) { m_spthermo->modifyOneHf298(k, Hf298New); m_tlast += 0.0001234; } diff --git a/include/cantera/thermo/ThermoPhase.h b/include/cantera/thermo/ThermoPhase.h index 12ac4ddbd..a163a682e 100644 --- a/include/cantera/thermo/ThermoPhase.h +++ b/include/cantera/thermo/ThermoPhase.h @@ -189,7 +189,7 @@ public: * @param k Species k * @param Hf298New Specify the new value of the Heat of Formation at 298K and 1 bar */ - virtual void modifyOneHf298SS(const size_t& k, const doublereal Hf298New) { + virtual void modifyOneHf298SS(const size_t k, const doublereal Hf298New) { m_spthermo->modifyOneHf298(k, Hf298New); } diff --git a/include/cantera/thermo/VPStandardStateTP.h b/include/cantera/thermo/VPStandardStateTP.h index 79a7f525a..96bfb34c3 100644 --- a/include/cantera/thermo/VPStandardStateTP.h +++ b/include/cantera/thermo/VPStandardStateTP.h @@ -407,7 +407,7 @@ public: * @param Hf298New Specify the new value of the Heat of Formation at 298K and 1 bar. * units = J/kmol. */ - void modifyOneHf298SS(const size_t& k, const doublereal Hf298New); + void modifyOneHf298SS(const size_t k, const doublereal Hf298New); //! Returns the vector of nondimensional //! Gibbs free energies of the reference state at the current temperature diff --git a/src/thermo/ConstCpPoly.cpp b/src/thermo/ConstCpPoly.cpp index e3c9d762d..d91d5a5e0 100644 --- a/src/thermo/ConstCpPoly.cpp +++ b/src/thermo/ConstCpPoly.cpp @@ -120,7 +120,7 @@ doublereal ConstCpPoly::reportHf298(doublereal* const h298) const return h; } -void ConstCpPoly::modifyOneHf298(const size_t& k, const doublereal Hf298New) +void ConstCpPoly::modifyOneHf298(const size_t k, const doublereal Hf298New) { if (k != m_index) { return; diff --git a/src/thermo/ConstCpPoly.h b/src/thermo/ConstCpPoly.h index d5a7d28cd..b9e27c3dc 100644 --- a/src/thermo/ConstCpPoly.h +++ b/src/thermo/ConstCpPoly.h @@ -115,7 +115,7 @@ public: virtual void modifyParameters(doublereal* coeffs); virtual doublereal reportHf298(doublereal* const h298 = 0) const; - virtual void modifyOneHf298(const size_t& k, const doublereal Hf298New); + virtual void modifyOneHf298(const size_t k, const doublereal Hf298New); protected: //! Base temperature diff --git a/src/thermo/GeneralSpeciesThermo.cpp b/src/thermo/GeneralSpeciesThermo.cpp index 05b30c75a..098cba653 100644 --- a/src/thermo/GeneralSpeciesThermo.cpp +++ b/src/thermo/GeneralSpeciesThermo.cpp @@ -304,7 +304,7 @@ SpeciesThermoInterpType* GeneralSpeciesThermo::provideSTIT(size_t k) return m_sp[k]; } -doublereal GeneralSpeciesThermo::reportOneHf298(int k) const +doublereal GeneralSpeciesThermo::reportOneHf298(const size_t k) const { SpeciesThermoInterpType* sp_ptr = m_sp[k]; doublereal h = -1.0; @@ -314,7 +314,7 @@ doublereal GeneralSpeciesThermo::reportOneHf298(int k) const return h; } -void GeneralSpeciesThermo::modifyOneHf298(const int k, const doublereal Hf298New) +void GeneralSpeciesThermo::modifyOneHf298(const size_t k, const doublereal Hf298New) { SpeciesThermoInterpType* sp_ptr = m_sp[k]; if (sp_ptr) { diff --git a/src/thermo/LatticeSolidPhase.cpp b/src/thermo/LatticeSolidPhase.cpp index 032bff74b..29e9bd143 100644 --- a/src/thermo/LatticeSolidPhase.cpp +++ b/src/thermo/LatticeSolidPhase.cpp @@ -512,7 +512,7 @@ void LatticeSolidPhase::setParametersFromXML(const XML_Node& eosdata) } -void LatticeSolidPhase::modifyOneHf298SS(const size_t& k, const doublereal Hf298New) +void LatticeSolidPhase::modifyOneHf298SS(const size_t k, const doublereal Hf298New) { for (size_t n = 0; n < m_nlattice; n++) { if (lkstart_[n+1] < k) { diff --git a/src/thermo/MixtureFugacityTP.cpp b/src/thermo/MixtureFugacityTP.cpp index 3916c5624..dcbd5601e 100644 --- a/src/thermo/MixtureFugacityTP.cpp +++ b/src/thermo/MixtureFugacityTP.cpp @@ -147,7 +147,7 @@ void MixtureFugacityTP::getEnthalpy_RT(doublereal* hrt) const getEnthalpy_RT_ref(hrt); } -void MixtureFugacityTP::modifyOneHf298SS(const int k, const doublereal Hf298New) +void MixtureFugacityTP::modifyOneHf298SS(const size_t k, const doublereal Hf298New) { m_spthermo->modifyOneHf298(k, Hf298New); m_Tlast_ref += 0.0001234; diff --git a/src/thermo/NasaPoly2.h b/src/thermo/NasaPoly2.h index 68fa557a1..e9bbe093e 100644 --- a/src/thermo/NasaPoly2.h +++ b/src/thermo/NasaPoly2.h @@ -178,7 +178,7 @@ public: return h; } - void modifyOneHf298(const size_t& k, const doublereal Hf298New) { + void modifyOneHf298(const size_t k, const doublereal Hf298New) { if (k != m_index) { return; } diff --git a/src/thermo/NasaThermo.cpp b/src/thermo/NasaThermo.cpp index ea87cf185..5a3d3e720 100644 --- a/src/thermo/NasaThermo.cpp +++ b/src/thermo/NasaThermo.cpp @@ -209,10 +209,10 @@ void NasaThermo::reportParams(size_t index, int& type, } } -doublereal NasaThermo::reportOneHf298(const int k) const +doublereal NasaThermo::reportOneHf298(const size_t k) const { - int grp = m_group_map[k]; - int pos = m_posInGroup_map[k]; + size_t grp = m_group_map[k]; + size_t pos = m_posInGroup_map[k]; const std::vector &mlg = m_low[grp-1]; const NasaPoly1* nlow = &(mlg[pos]); doublereal tmid = nlow->maxTemp(); @@ -227,10 +227,10 @@ doublereal NasaThermo::reportOneHf298(const int k) const return h; } -void NasaThermo::modifyOneHf298(const int k, const doublereal Hf298New) +void NasaThermo::modifyOneHf298(const size_t k, const doublereal Hf298New) { - int grp = m_group_map[k]; - int pos = m_posInGroup_map[k]; + size_t grp = m_group_map[k]; + size_t pos = m_posInGroup_map[k]; std::vector &mlg = m_low[grp-1]; NasaPoly1* nlow = &(mlg[pos]); std::vector &mhg = m_high[grp-1]; diff --git a/src/thermo/NasaThermo.h b/src/thermo/NasaThermo.h index 62ddaab2e..794703adc 100644 --- a/src/thermo/NasaThermo.h +++ b/src/thermo/NasaThermo.h @@ -145,8 +145,8 @@ public: doublereal& maxTemp, doublereal& refPressure) const; - virtual doublereal reportOneHf298(const int k) const; - virtual void modifyOneHf298(const int k, const doublereal Hf298New); + virtual doublereal reportOneHf298(const size_t k) const; + virtual void modifyOneHf298(const size_t k, const doublereal Hf298New); //! Initialized to the type of parameterization /*! diff --git a/src/thermo/ShomatePoly.h b/src/thermo/ShomatePoly.h index bb0d840be..414e3c309 100644 --- a/src/thermo/ShomatePoly.h +++ b/src/thermo/ShomatePoly.h @@ -243,7 +243,7 @@ public: return hh; } - virtual void modifyOneHf298(const int k, const doublereal Hf298New) { + virtual void modifyOneHf298(const size_t k, const doublereal Hf298New) { doublereal hnow = reportHf298(); doublereal delH = Hf298New - hnow; m_coeff[5] += delH / 1.0E6; @@ -476,7 +476,7 @@ public: return h; } - virtual void modifyOneHf298(const size_t& k, const doublereal Hf298New) { + virtual void modifyOneHf298(const size_t k, const doublereal Hf298New) { if (k != m_index) { return; } diff --git a/src/thermo/ShomateThermo.h b/src/thermo/ShomateThermo.h index 4a7942044..693c9c2ee 100644 --- a/src/thermo/ShomateThermo.h +++ b/src/thermo/ShomateThermo.h @@ -328,12 +328,12 @@ public: } } - virtual doublereal reportOneHf298(int k) const { + virtual doublereal reportOneHf298(const size_t k) const { doublereal h; doublereal t = 298.15; - int grp = m_group_map[k]; - int pos = m_posInGroup_map[k]; + size_t grp = m_group_map[k]; + size_t pos = m_posInGroup_map[k]; const std::vector &mlg = m_low[grp-1]; const ShomatePoly* nlow = &(mlg[pos]); @@ -348,10 +348,10 @@ public: return h; } - virtual void modifyOneHf298(const int k, const doublereal Hf298New) { + virtual void modifyOneHf298(const size_t k, const doublereal Hf298New) { - int grp = m_group_map[k]; - int pos = m_posInGroup_map[k]; + size_t grp = m_group_map[k]; + size_t pos = m_posInGroup_map[k]; std::vector &mlg = m_low[grp-1]; ShomatePoly* nlow = &(mlg[pos]); std::vector &mhg = m_high[grp-1]; diff --git a/src/thermo/SpeciesThermoInterpType.cpp b/src/thermo/SpeciesThermoInterpType.cpp index 4b8bf38cb..e3092e5c5 100644 --- a/src/thermo/SpeciesThermoInterpType.cpp +++ b/src/thermo/SpeciesThermoInterpType.cpp @@ -57,7 +57,7 @@ doublereal SpeciesThermoInterpType::reportHf298(doublereal* const h298) const } //==================================================================================================== -void SpeciesThermoInterpType::modifyOneHf298(const int k, const doublereal Hf298New) +void SpeciesThermoInterpType::modifyOneHf298(const size_t k, const doublereal Hf298New) { throw CanteraError("SpeciesThermoInterpType::modifyOneHf298", "Not implemented"); diff --git a/src/thermo/VPStandardStateTP.cpp b/src/thermo/VPStandardStateTP.cpp index b4c4794de..d48704e96 100644 --- a/src/thermo/VPStandardStateTP.cpp +++ b/src/thermo/VPStandardStateTP.cpp @@ -162,7 +162,7 @@ void VPStandardStateTP::getEnthalpy_RT(doublereal* hrt) const } //================================================================================================ -void VPStandardStateTP::modifyOneHf298SS(const size_t& k, const doublereal Hf298New) +void VPStandardStateTP::modifyOneHf298SS(const size_t k, const doublereal Hf298New) { m_spthermo->modifyOneHf298(k, Hf298New); m_Tlast_ss += 0.0001234;