diff --git a/Cantera/src/thermo/DebyeHuckel.cpp b/Cantera/src/thermo/DebyeHuckel.cpp index 5fc2b0871..6a0002b69 100644 --- a/Cantera/src/thermo/DebyeHuckel.cpp +++ b/Cantera/src/thermo/DebyeHuckel.cpp @@ -547,7 +547,7 @@ namespace Cantera { * uA[4] = Temperature units - default = 0; * uA[5] = time units - default = 0 */ - void DebyeHuckel::getUnitsStandardConc(double *uA, int k, int sizeUA) { + void DebyeHuckel::getUnitsStandardConc(double *uA, int k, int sizeUA) const { for (int i = 0; i < sizeUA; i++) { if (i == 0) uA[0] = 1.0; if (i == 1) uA[1] = -nDim(); diff --git a/Cantera/src/thermo/DebyeHuckel.h b/Cantera/src/thermo/DebyeHuckel.h index 59ea54a6b..1b1790599 100644 --- a/Cantera/src/thermo/DebyeHuckel.h +++ b/Cantera/src/thermo/DebyeHuckel.h @@ -956,7 +956,7 @@ namespace Cantera { * Currently, this is equal to 6. */ virtual void getUnitsStandardConc(double *uA, int k = 0, - int sizeUA = 6); + int sizeUA = 6) const; //! Get the array of non-dimensional activities at //! the current solution temperature, pressure, and solution concentration. diff --git a/Cantera/src/thermo/HMWSoln.cpp b/Cantera/src/thermo/HMWSoln.cpp index 0ba29d27a..f59bbc573 100644 --- a/Cantera/src/thermo/HMWSoln.cpp +++ b/Cantera/src/thermo/HMWSoln.cpp @@ -779,7 +779,7 @@ namespace Cantera { * uA[4] = Temperature units - default = 0; * uA[5] = time units - default = 0 */ - void HMWSoln::getUnitsStandardConc(double *uA, int k, int sizeUA) { + void HMWSoln::getUnitsStandardConc(double *uA, int k, int sizeUA) const { for (int i = 0; i < sizeUA; i++) { if (i == 0) uA[0] = 1.0; if (i == 1) uA[1] = -nDim(); diff --git a/Cantera/src/thermo/HMWSoln.h b/Cantera/src/thermo/HMWSoln.h index e6ef2210b..ad17759e6 100644 --- a/Cantera/src/thermo/HMWSoln.h +++ b/Cantera/src/thermo/HMWSoln.h @@ -1014,7 +1014,7 @@ namespace Cantera { * uA[5] = time units - default = 0 */ virtual void getUnitsStandardConc(double *uA, int k = 0, - int sizeUA = 6); + int sizeUA = 6) const; /** * Get the array of non-dimensional molality-based activities at diff --git a/Cantera/src/thermo/IdealMolalSoln.cpp b/Cantera/src/thermo/IdealMolalSoln.cpp index ca1d2d858..6a98971a6 100644 --- a/Cantera/src/thermo/IdealMolalSoln.cpp +++ b/Cantera/src/thermo/IdealMolalSoln.cpp @@ -444,7 +444,7 @@ namespace Cantera { * uA[4] = Temperature units - default = 0; * uA[5] = time units - default = 0 */ - void IdealMolalSoln::getUnitsStandardConc(double *uA, int k, int sizeUA) { + void IdealMolalSoln::getUnitsStandardConc(double *uA, int k, int sizeUA) const { int eos = eosType(); if (eos == 0) { for (int i = 0; i < sizeUA; i++) { diff --git a/Cantera/src/thermo/IdealMolalSoln.h b/Cantera/src/thermo/IdealMolalSoln.h index e15f9066b..09b2c86ca 100644 --- a/Cantera/src/thermo/IdealMolalSoln.h +++ b/Cantera/src/thermo/IdealMolalSoln.h @@ -468,7 +468,7 @@ namespace Cantera { * Currently, this is equal to 6. */ virtual void getUnitsStandardConc(double *uA, int k = 0, - int sizeUA = 6); + int sizeUA = 6) const; /*! * Get the array of non-dimensional activities at diff --git a/Cantera/src/thermo/IdealSolidSolnPhase.cpp b/Cantera/src/thermo/IdealSolidSolnPhase.cpp index f27ecd7ea..be9f46dbd 100644 --- a/Cantera/src/thermo/IdealSolidSolnPhase.cpp +++ b/Cantera/src/thermo/IdealSolidSolnPhase.cpp @@ -578,7 +578,7 @@ namespace Cantera { * unitless. */ void IdealSolidSolnPhase:: - getUnitsStandardConc(double *uA, int, int sizeUA) { + getUnitsStandardConc(double *uA, int, int sizeUA) const { int eos = eosType(); if (eos == cIdealSolidSolnPhase0) { for (int i = 0; i < sizeUA; i++) { diff --git a/Cantera/src/thermo/IdealSolidSolnPhase.h b/Cantera/src/thermo/IdealSolidSolnPhase.h index 3b11107f3..14b976c66 100644 --- a/Cantera/src/thermo/IdealSolidSolnPhase.h +++ b/Cantera/src/thermo/IdealSolidSolnPhase.h @@ -534,7 +534,7 @@ namespace Cantera { * unitless. */ virtual void getUnitsStandardConc(double *uA, int k = 0, - int sizeUA = 6); + int sizeUA = 6) const; //! Get the array of species activity coefficients diff --git a/Cantera/src/thermo/MolalityVPSSTP.cpp b/Cantera/src/thermo/MolalityVPSSTP.cpp index 424f41332..cbfe5df3d 100644 --- a/Cantera/src/thermo/MolalityVPSSTP.cpp +++ b/Cantera/src/thermo/MolalityVPSSTP.cpp @@ -485,7 +485,7 @@ namespace Cantera { * uA[4] = Temperature units - default = 0; * uA[5] = time units - default = 0 */ - void MolalityVPSSTP::getUnitsStandardConc(double *uA, int k, int sizeUA) { + void MolalityVPSSTP::getUnitsStandardConc(double *uA, int k, int sizeUA) const { for (int i = 0; i < sizeUA; i++) { if (i == 0) uA[0] = 1.0; if (i == 1) uA[1] = -nDim(); diff --git a/Cantera/src/thermo/MolalityVPSSTP.h b/Cantera/src/thermo/MolalityVPSSTP.h index 535aacb3c..32f0893f4 100644 --- a/Cantera/src/thermo/MolalityVPSSTP.h +++ b/Cantera/src/thermo/MolalityVPSSTP.h @@ -473,7 +473,7 @@ namespace Cantera { * Currently, this is equal to 6. */ virtual void getUnitsStandardConc(double *uA, int k = 0, - int sizeUA = 6); + int sizeUA = 6) const; //! Get the array of non-dimensional activities (molality diff --git a/Cantera/src/thermo/Phase.cpp b/Cantera/src/thermo/Phase.cpp index 8c51d49fb..dab7e75ff 100755 --- a/Cantera/src/thermo/Phase.cpp +++ b/Cantera/src/thermo/Phase.cpp @@ -230,7 +230,7 @@ namespace Cantera { /* * Copy the vector of molecular weights into vector weights. */ - void Phase::getMolecularWeights(vector_fp& weights) { + void Phase::getMolecularWeights(vector_fp& weights) const { const array_fp& mw = Constituents::molecularWeights(); if (weights.size() < mw.size()) weights.resize(mw.size()); copy(mw.begin(), mw.end(), weights.begin()); @@ -240,7 +240,7 @@ namespace Cantera { * Copy the vector of molecular weights into array weights. * @deprecated */ - void Phase::getMolecularWeights(int iwt, doublereal* weights) { + void Phase::getMolecularWeights(int iwt, doublereal* weights) const { const array_fp& mw = Constituents::molecularWeights(); copy(mw.begin(), mw.end(), weights); } @@ -248,7 +248,7 @@ namespace Cantera { /* * Copy the vector of molecular weights into array weights. */ - void Phase::getMolecularWeights(doublereal* weights) { + void Phase::getMolecularWeights(doublereal* weights) const { const array_fp& mw = Constituents::molecularWeights(); copy(mw.begin(), mw.end(), weights); } @@ -257,7 +257,7 @@ namespace Cantera { * Return a const reference to the internal vector of * molecular weights. */ - const array_fp& Phase::molecularWeights() { + const array_fp& Phase::molecularWeights() const { return Constituents::molecularWeights(); } @@ -265,7 +265,7 @@ namespace Cantera { /** * Get the mole fractions by name. */ - void Phase::getMoleFractionsByName(compositionMap& x) { + void Phase::getMoleFractionsByName(compositionMap& x) const { x.clear(); int kk = nSpecies(); for (int k = 0; k < kk; k++) { diff --git a/Cantera/src/thermo/Phase.h b/Cantera/src/thermo/Phase.h index 5f3fb3efe..5935f1773 100755 --- a/Cantera/src/thermo/Phase.h +++ b/Cantera/src/thermo/Phase.h @@ -364,7 +364,7 @@ namespace Cantera { * * @param weights Output vector of molecular weights (kg/kmol) */ - void getMolecularWeights(vector_fp& weights); + void getMolecularWeights(vector_fp& weights) const; /** * Copy the vector of molecular weights into array weights. @@ -374,20 +374,20 @@ namespace Cantera { * * @deprecated */ - void getMolecularWeights(int iwt, doublereal* weights); + void getMolecularWeights(int iwt, doublereal* weights) const; /** * Copy the vector of molecular weights into array weights. * * @param weights Output array of molecular weights (kg/kmol) */ - void getMolecularWeights(doublereal* weights); + void getMolecularWeights(doublereal* weights) const; /** * Return a const reference to the internal vector of * molecular weights. */ - const array_fp& molecularWeights(); + const array_fp& molecularWeights() const; /** * Get the mole fractions by name. @@ -395,7 +395,7 @@ namespace Cantera { * @param x Output composition map containing the * species mole fractions. */ - void getMoleFractionsByName(compositionMap& x); + void getMoleFractionsByName(compositionMap& x) const; //! Return the mole fraction of a single species /*! @@ -435,7 +435,7 @@ namespace Cantera { doublereal chargeDensity() const; /// Returns the number of spatial dimensions (1, 2, or 3) - int nDim() {return m_ndim;} + int nDim() const {return m_ndim;} //! Set the number of spatial dimensions (1, 2, or 3) /*! diff --git a/Cantera/src/thermo/StoichSubstance.cpp b/Cantera/src/thermo/StoichSubstance.cpp index a08cfb5cf..e4c1f9fe5 100644 --- a/Cantera/src/thermo/StoichSubstance.cpp +++ b/Cantera/src/thermo/StoichSubstance.cpp @@ -117,7 +117,7 @@ namespace Cantera { } void StoichSubstance:: - getUnitsStandardConc(double *uA, int k, int sizeUA) { + getUnitsStandardConc(double *uA, int k, int sizeUA) const { for (int i = 0; i < sizeUA; i++) { uA[i] = 0.0; } diff --git a/Cantera/src/thermo/StoichSubstance.h b/Cantera/src/thermo/StoichSubstance.h index a717f54f7..b72c138ae 100644 --- a/Cantera/src/thermo/StoichSubstance.h +++ b/Cantera/src/thermo/StoichSubstance.h @@ -252,7 +252,7 @@ namespace Cantera { * uA[5] = time units - default = 0 */ virtual void getUnitsStandardConc(double *uA, int k = 0, - int sizeUA = 6); + int sizeUA = 6) const; //@} diff --git a/Cantera/src/thermo/StoichSubstanceSSTP.cpp b/Cantera/src/thermo/StoichSubstanceSSTP.cpp index 092e622ad..034c99118 100644 --- a/Cantera/src/thermo/StoichSubstanceSSTP.cpp +++ b/Cantera/src/thermo/StoichSubstanceSSTP.cpp @@ -225,7 +225,7 @@ namespace Cantera { * uA[5] = time units - default = 0 */ void StoichSubstanceSSTP:: - getUnitsStandardConc(double *uA, int k, int sizeUA) { + getUnitsStandardConc(double *uA, int k, int sizeUA) const { for (int i = 0; i < 6; i++) { uA[i] = 0; } diff --git a/Cantera/src/thermo/StoichSubstanceSSTP.h b/Cantera/src/thermo/StoichSubstanceSSTP.h index 4ed872ff0..f0759366f 100644 --- a/Cantera/src/thermo/StoichSubstanceSSTP.h +++ b/Cantera/src/thermo/StoichSubstanceSSTP.h @@ -360,7 +360,7 @@ namespace Cantera { * Currently, this is equal to 6. */ virtual void getUnitsStandardConc(double *uA, int k = 0, - int sizeUA = 6); + int sizeUA = 6) const; //@} /// @name Partial Molar Properties of the Solution diff --git a/Cantera/src/thermo/ThermoPhase.cpp b/Cantera/src/thermo/ThermoPhase.cpp index 94a6e9eeb..e1c6bcd1b 100644 --- a/Cantera/src/thermo/ThermoPhase.cpp +++ b/Cantera/src/thermo/ThermoPhase.cpp @@ -298,7 +298,7 @@ namespace Cantera { * uA[4] = Temperature units - default = 0; * uA[5] = time units - default = 0 */ - void ThermoPhase::getUnitsStandardConc(double *uA, int k, int sizeUA) { + void ThermoPhase::getUnitsStandardConc(double *uA, int k, int sizeUA) const { for (int i = 0; i < sizeUA; i++) { if (i == 0) uA[0] = 1.0; if (i == 1) uA[1] = -nDim(); diff --git a/Cantera/src/thermo/ThermoPhase.h b/Cantera/src/thermo/ThermoPhase.h index de7db6fe0..5b028aec6 100755 --- a/Cantera/src/thermo/ThermoPhase.h +++ b/Cantera/src/thermo/ThermoPhase.h @@ -576,7 +576,7 @@ namespace Cantera { * Currently, this is equal to 6. */ virtual void getUnitsStandardConc(double *uA, int k = 0, - int sizeUA = 6); + int sizeUA = 6) const; //! Get the array of non-dimensional activities at //! the current solution temperature, pressure, and solution concentration.