diff --git a/Cantera/src/thermo/ConstDensityThermo.h b/Cantera/src/thermo/ConstDensityThermo.h index 70106ccb8..7384a367a 100755 --- a/Cantera/src/thermo/ConstDensityThermo.h +++ b/Cantera/src/thermo/ConstDensityThermo.h @@ -383,7 +383,7 @@ namespace Cantera { * @param n number of parameters * @param c array of \a n coefficients */ - virtual void getParameters(int &n, doublereal * const c) { + virtual void getParameters(int &n, doublereal * const c) const { double d = density(); c[0] = d; n = 1; diff --git a/Cantera/src/thermo/DebyeHuckel.cpp b/Cantera/src/thermo/DebyeHuckel.cpp index b834af9a8..5fc2b0871 100644 --- a/Cantera/src/thermo/DebyeHuckel.cpp +++ b/Cantera/src/thermo/DebyeHuckel.cpp @@ -1853,7 +1853,8 @@ namespace Cantera { */ void DebyeHuckel::setParameters(int n, doublereal* c) { } - void DebyeHuckel::getParameters(int &n, doublereal * const c) { + + void DebyeHuckel::getParameters(int &n, doublereal * const c) const { } /* diff --git a/Cantera/src/thermo/DebyeHuckel.h b/Cantera/src/thermo/DebyeHuckel.h index e14ad3d7c..59ea54a6b 100644 --- a/Cantera/src/thermo/DebyeHuckel.h +++ b/Cantera/src/thermo/DebyeHuckel.h @@ -1362,7 +1362,7 @@ namespace Cantera { * @param n number of parameters * @param c array of \a n coefficients */ - virtual void getParameters(int &n, doublereal * const c); + virtual void getParameters(int &n, doublereal * const c) const; //! Set equation of state parameter values from XML entries. /*! diff --git a/Cantera/src/thermo/HMWSoln.cpp b/Cantera/src/thermo/HMWSoln.cpp index adcdd79af..0ba29d27a 100644 --- a/Cantera/src/thermo/HMWSoln.cpp +++ b/Cantera/src/thermo/HMWSoln.cpp @@ -1400,7 +1400,8 @@ namespace Cantera { */ void HMWSoln::setParameters(int n, doublereal* c) { } - void HMWSoln::getParameters(int &n, doublereal * const c) { + + void HMWSoln::getParameters(int &n, doublereal * const c) const { } /** * Set equation of state parameter values from XML diff --git a/Cantera/src/thermo/HMWSoln.h b/Cantera/src/thermo/HMWSoln.h index 78a0ccf99..b045bb623 100644 --- a/Cantera/src/thermo/HMWSoln.h +++ b/Cantera/src/thermo/HMWSoln.h @@ -1357,7 +1357,7 @@ namespace Cantera { * @param n number of parameters * @param c array of \a n coefficients */ - virtual void getParameters(int &n, doublereal * const c); + virtual void getParameters(int &n, doublereal * const c) const; /** * Set equation of state parameter values from XML diff --git a/Cantera/src/thermo/IdealMolalSoln.cpp b/Cantera/src/thermo/IdealMolalSoln.cpp index 539e065d1..ca1d2d858 100644 --- a/Cantera/src/thermo/IdealMolalSoln.cpp +++ b/Cantera/src/thermo/IdealMolalSoln.cpp @@ -1114,7 +1114,8 @@ namespace Cantera { */ void IdealMolalSoln::setParameters(int n, doublereal* c) { } - void IdealMolalSoln::getParameters(int &n, doublereal * const c) { + + void IdealMolalSoln::getParameters(int &n, doublereal * const c) const { } /* diff --git a/Cantera/src/thermo/IdealMolalSoln.h b/Cantera/src/thermo/IdealMolalSoln.h index 3cb024060..e15f9066b 100644 --- a/Cantera/src/thermo/IdealMolalSoln.h +++ b/Cantera/src/thermo/IdealMolalSoln.h @@ -825,7 +825,7 @@ namespace Cantera { * @param n number of parameters (output) * @param c array of n coefficients */ - virtual void getParameters(int &n, doublereal * const c); + virtual void getParameters(int &n, doublereal * const c) const; /*! * Set equation of state parameter values from XML diff --git a/Cantera/src/thermo/LatticePhase.h b/Cantera/src/thermo/LatticePhase.h index e227869d6..e2c0ca3e7 100644 --- a/Cantera/src/thermo/LatticePhase.h +++ b/Cantera/src/thermo/LatticePhase.h @@ -146,7 +146,7 @@ namespace Cantera { // set the site density of sublattice n virtual void setParameters(int n, doublereal* c) {} - virtual void getParameters(int &n, doublereal * const c) { + virtual void getParameters(int &n, doublereal * const c) const { double d = molarDensity(); c[0] = d; n = 1; diff --git a/Cantera/src/thermo/SingleSpeciesTP.h b/Cantera/src/thermo/SingleSpeciesTP.h index 5d990b75d..8fa5436fe 100644 --- a/Cantera/src/thermo/SingleSpeciesTP.h +++ b/Cantera/src/thermo/SingleSpeciesTP.h @@ -625,7 +625,8 @@ namespace Cantera { * */ virtual void setParameters(int n, doublereal* c) {} - virtual void getParameters(int &n, doublereal * const c) {} + + virtual void getParameters(int &n, doublereal * const c) const {} /** * Set equation of state parameter values from XML diff --git a/Cantera/src/thermo/StoichSubstance.cpp b/Cantera/src/thermo/StoichSubstance.cpp index b8b08cf78..a08cfb5cf 100644 --- a/Cantera/src/thermo/StoichSubstance.cpp +++ b/Cantera/src/thermo/StoichSubstance.cpp @@ -128,7 +128,7 @@ namespace Cantera { setDensity(rho); } - void StoichSubstance::getParameters(int &n, double * const c) { + void StoichSubstance::getParameters(int &n, double * const c) const { double rho = density(); c[0] = rho; } diff --git a/Cantera/src/thermo/StoichSubstance.h b/Cantera/src/thermo/StoichSubstance.h index 1437bf0fa..a717f54f7 100644 --- a/Cantera/src/thermo/StoichSubstance.h +++ b/Cantera/src/thermo/StoichSubstance.h @@ -427,7 +427,8 @@ namespace Cantera { virtual void initThermo(); virtual void setParameters(int n, double *c); - virtual void getParameters(int &n, double * const c); + + virtual void getParameters(int &n, double * const c) const; virtual void setParametersFromXML(const XML_Node& eosdata); diff --git a/Cantera/src/thermo/StoichSubstanceSSTP.cpp b/Cantera/src/thermo/StoichSubstanceSSTP.cpp index 0dc4034b7..092e622ad 100644 --- a/Cantera/src/thermo/StoichSubstanceSSTP.cpp +++ b/Cantera/src/thermo/StoichSubstanceSSTP.cpp @@ -415,7 +415,7 @@ namespace Cantera { * n = 1 * C[0] = density of phase [ kg/m3 ] */ - void StoichSubstanceSSTP::getParameters(int &n, double * const c) { + void StoichSubstanceSSTP::getParameters(int &n, double * const c) const { double rho = density(); n = 1; c[0] = rho; diff --git a/Cantera/src/thermo/StoichSubstanceSSTP.h b/Cantera/src/thermo/StoichSubstanceSSTP.h index 631476de7..4ed872ff0 100644 --- a/Cantera/src/thermo/StoichSubstanceSSTP.h +++ b/Cantera/src/thermo/StoichSubstanceSSTP.h @@ -482,7 +482,7 @@ namespace Cantera { * - n = 1 * - c[0] = density of phase [ kg/m3 ] */ - virtual void getParameters(int &n, double * const c); + virtual void getParameters(int &n, double * const c) const; //! Set equation of state parameter values from XML entries. /*! diff --git a/Cantera/src/thermo/ThermoPhase.h b/Cantera/src/thermo/ThermoPhase.h index e6492dc20..de7db6fe0 100755 --- a/Cantera/src/thermo/ThermoPhase.h +++ b/Cantera/src/thermo/ThermoPhase.h @@ -1390,7 +1390,7 @@ namespace Cantera { * location of a phase object in a list, and is used by the * interface library (clib) routines for this purpose. */ - int index() { return m_index; } + int index() const { return m_index; } /** @@ -1425,7 +1425,7 @@ namespace Cantera { * @param n number of parameters * @param c array of \a n coefficients */ - virtual void getParameters(int &n, doublereal * const c) {} + virtual void getParameters(int &n, doublereal * const c) const {} //! Set equation of state parameter values from XML entries.