diff --git a/Cantera/src/thermo/DebyeHuckel.cpp b/Cantera/src/thermo/DebyeHuckel.cpp index 33645818b..8461b1ee2 100644 --- a/Cantera/src/thermo/DebyeHuckel.cpp +++ b/Cantera/src/thermo/DebyeHuckel.cpp @@ -202,7 +202,7 @@ namespace Cantera { * duplicate the current object. It uses the copy constructor * defined above. */ - ThermoPhase* DebyeHuckel::duplMyselfAsThermoPhase() { + ThermoPhase* DebyeHuckel::duplMyselfAsThermoPhase() const { DebyeHuckel* mtp = new DebyeHuckel(*this); return (ThermoPhase *) mtp; } diff --git a/Cantera/src/thermo/DebyeHuckel.h b/Cantera/src/thermo/DebyeHuckel.h index e8ee89420..a3e169b5f 100644 --- a/Cantera/src/thermo/DebyeHuckel.h +++ b/Cantera/src/thermo/DebyeHuckel.h @@ -639,7 +639,7 @@ namespace Cantera { virtual ~DebyeHuckel(); //! Duplicator from the ThermoPhase parent class - ThermoPhase *duplMyselfAsThermoPhase(); + ThermoPhase *duplMyselfAsThermoPhase() const; /** * diff --git a/Cantera/src/thermo/HMWSoln.cpp b/Cantera/src/thermo/HMWSoln.cpp index af09733b3..ece034668 100644 --- a/Cantera/src/thermo/HMWSoln.cpp +++ b/Cantera/src/thermo/HMWSoln.cpp @@ -380,7 +380,7 @@ namespace Cantera { * duplicate the current object. It uses the copy constructor * defined above. */ - ThermoPhase* HMWSoln::duplMyselfAsThermoPhase() { + ThermoPhase* HMWSoln::duplMyselfAsThermoPhase() const { HMWSoln* mtp = new HMWSoln(*this); return (ThermoPhase *) mtp; } diff --git a/Cantera/src/thermo/HMWSoln.h b/Cantera/src/thermo/HMWSoln.h index 63e7dcc92..11d4a7ca3 100644 --- a/Cantera/src/thermo/HMWSoln.h +++ b/Cantera/src/thermo/HMWSoln.h @@ -108,7 +108,7 @@ namespace Cantera { virtual ~HMWSoln(); - ThermoPhase *duplMyselfAsThermoPhase(); + ThermoPhase *duplMyselfAsThermoPhase() const; /** * diff --git a/Cantera/src/thermo/IdealMolalSoln.cpp b/Cantera/src/thermo/IdealMolalSoln.cpp index 7134b1360..539e065d1 100644 --- a/Cantera/src/thermo/IdealMolalSoln.cpp +++ b/Cantera/src/thermo/IdealMolalSoln.cpp @@ -106,7 +106,7 @@ namespace Cantera { /** * */ - ThermoPhase* IdealMolalSoln::duplMyselfAsThermoPhase() { + ThermoPhase* IdealMolalSoln::duplMyselfAsThermoPhase() const { IdealMolalSoln* mtp = new IdealMolalSoln(*this); return (ThermoPhase *) mtp; } diff --git a/Cantera/src/thermo/IdealMolalSoln.h b/Cantera/src/thermo/IdealMolalSoln.h index 4db97cd53..04af927fc 100644 --- a/Cantera/src/thermo/IdealMolalSoln.h +++ b/Cantera/src/thermo/IdealMolalSoln.h @@ -130,7 +130,7 @@ namespace Cantera { * * @return It returns a ThermoPhase pointer. */ - ThermoPhase *duplMyselfAsThermoPhase(); + ThermoPhase *duplMyselfAsThermoPhase() const; /** * diff --git a/Cantera/src/thermo/IdealSolidSolnPhase.cpp b/Cantera/src/thermo/IdealSolidSolnPhase.cpp index 1df530f0c..f27ecd7ea 100644 --- a/Cantera/src/thermo/IdealSolidSolnPhase.cpp +++ b/Cantera/src/thermo/IdealSolidSolnPhase.cpp @@ -113,7 +113,7 @@ namespace Cantera { * not the copy constructor, because it has to be * a virtual function) */ - ThermoPhase* IdealSolidSolnPhase::duplMyselfAsThermoPhase() { + ThermoPhase* IdealSolidSolnPhase::duplMyselfAsThermoPhase() const { IdealSolidSolnPhase *ii = new IdealSolidSolnPhase(*this); return (ThermoPhase*) ii; } diff --git a/Cantera/src/thermo/IdealSolidSolnPhase.h b/Cantera/src/thermo/IdealSolidSolnPhase.h index 01da48ace..4ff34146f 100644 --- a/Cantera/src/thermo/IdealSolidSolnPhase.h +++ b/Cantera/src/thermo/IdealSolidSolnPhase.h @@ -155,7 +155,7 @@ namespace Cantera { * not the copy constructor, because it has to be * a virtual function) */ - virtual ThermoPhase* duplMyselfAsThermoPhase(); + virtual ThermoPhase* duplMyselfAsThermoPhase() const; //! Destructor virtual ~IdealSolidSolnPhase() {} diff --git a/Cantera/src/thermo/MolalityVPSSTP.cpp b/Cantera/src/thermo/MolalityVPSSTP.cpp index 395c1194b..284a5e205 100644 --- a/Cantera/src/thermo/MolalityVPSSTP.cpp +++ b/Cantera/src/thermo/MolalityVPSSTP.cpp @@ -107,7 +107,7 @@ namespace Cantera { * a pointer to ThermoPhase. */ ThermoPhase* - MolalityVPSSTP::duplMyselfAsThermoPhase() { + MolalityVPSSTP::duplMyselfAsThermoPhase() const { MolalityVPSSTP* mtp = new MolalityVPSSTP(*this); return (ThermoPhase *) mtp; } diff --git a/Cantera/src/thermo/MolalityVPSSTP.h b/Cantera/src/thermo/MolalityVPSSTP.h index 945509a10..535aacb3c 100644 --- a/Cantera/src/thermo/MolalityVPSSTP.h +++ b/Cantera/src/thermo/MolalityVPSSTP.h @@ -202,7 +202,7 @@ namespace Cantera { * inherited from ThermoPhase even if the application only has * a pointer to ThermoPhase to work with. */ - virtual ThermoPhase *duplMyselfAsThermoPhase(); + virtual ThermoPhase *duplMyselfAsThermoPhase() const; /** * diff --git a/Cantera/src/thermo/State.cpp b/Cantera/src/thermo/State.cpp index 30971e5b1..eb616cb53 100644 --- a/Cantera/src/thermo/State.cpp +++ b/Cantera/src/thermo/State.cpp @@ -80,7 +80,6 @@ namespace Cantera { } void State::setMoleFractions(const doublereal* x) { - int k; doublereal sum = 0.0, norm = 0.0; sum = dot(x, x + m_kk, m_molwts.begin()); doublereal rsum = 1.0/sum; @@ -126,7 +125,6 @@ namespace Cantera { void State::setMassFractions(const doublereal* y) { doublereal norm = 0.0, sum = 0.0; - int k; //cblas_dcopy(m_kk, y, 1, m_y.begin(), 1); norm = accumulate(y, y + m_kk, 0.0); copy(y, y + m_kk, m_y.begin()); @@ -148,7 +146,6 @@ namespace Cantera { } void State::setMassFractions_NoNorm(const doublereal* y) { - int k; doublereal sum = 0.0; copy(y, y + m_kk, m_y.begin()); transform(m_y.begin(), m_y.end(), m_rmolwts.begin(), m_ym.begin(), diff --git a/Cantera/src/thermo/ThermoPhase.cpp b/Cantera/src/thermo/ThermoPhase.cpp index 16ba43d2a..d04deb731 100644 --- a/Cantera/src/thermo/ThermoPhase.cpp +++ b/Cantera/src/thermo/ThermoPhase.cpp @@ -115,7 +115,7 @@ namespace Cantera { * Currently, this is not fully implemented. If called, an * exception will be called by the ThermoPhase copy constructor. */ - ThermoPhase *ThermoPhase::duplMyselfAsThermoPhase() { + ThermoPhase *ThermoPhase::duplMyselfAsThermoPhase() const { ThermoPhase* tp = new ThermoPhase(*this); return tp; } diff --git a/Cantera/src/thermo/ThermoPhase.h b/Cantera/src/thermo/ThermoPhase.h index 8f24f8eeb..d613b6634 100755 --- a/Cantera/src/thermo/ThermoPhase.h +++ b/Cantera/src/thermo/ThermoPhase.h @@ -275,7 +275,7 @@ namespace Cantera { * Currently, this is not fully implemented. If called, an * exception will be called. */ - virtual ThermoPhase *duplMyselfAsThermoPhase(); + virtual ThermoPhase *duplMyselfAsThermoPhase() const; /** * diff --git a/Cantera/src/thermo/VPStandardStateTP.cpp b/Cantera/src/thermo/VPStandardStateTP.cpp index 4520881dc..2ac782bd6 100644 --- a/Cantera/src/thermo/VPStandardStateTP.cpp +++ b/Cantera/src/thermo/VPStandardStateTP.cpp @@ -115,7 +115,7 @@ namespace Cantera { * Duplication function. * This calls the copy constructor for this object. */ - ThermoPhase* VPStandardStateTP::duplMyselfAsThermoPhase() { + ThermoPhase* VPStandardStateTP::duplMyselfAsThermoPhase() const { VPStandardStateTP* vptp = new VPStandardStateTP(*this); return (ThermoPhase *) vptp; } diff --git a/Cantera/src/thermo/VPStandardStateTP.h b/Cantera/src/thermo/VPStandardStateTP.h index f62b85ae0..c84122976 100644 --- a/Cantera/src/thermo/VPStandardStateTP.h +++ b/Cantera/src/thermo/VPStandardStateTP.h @@ -117,7 +117,7 @@ namespace Cantera { /* * Duplication routine */ - virtual ThermoPhase *duplMyselfAsThermoPhase(); + virtual ThermoPhase *duplMyselfAsThermoPhase() const; //@} diff --git a/Cantera/src/thermo/WaterSSTP.cpp b/Cantera/src/thermo/WaterSSTP.cpp index 4c1d24ba2..c5a6bfea3 100644 --- a/Cantera/src/thermo/WaterSSTP.cpp +++ b/Cantera/src/thermo/WaterSSTP.cpp @@ -99,7 +99,7 @@ namespace Cantera { } - ThermoPhase *WaterSSTP::duplMyselfAsThermoPhase() { + ThermoPhase *WaterSSTP::duplMyselfAsThermoPhase() const { WaterSSTP* wtp = new WaterSSTP(*this); return (ThermoPhase *) wtp; } diff --git a/Cantera/src/thermo/WaterSSTP.h b/Cantera/src/thermo/WaterSSTP.h index 5abe6e8f4..059263c5a 100644 --- a/Cantera/src/thermo/WaterSSTP.h +++ b/Cantera/src/thermo/WaterSSTP.h @@ -162,7 +162,7 @@ namespace Cantera { virtual ~WaterSSTP(); //! Duplicator from a ThermoPhase object - ThermoPhase *duplMyselfAsThermoPhase(); + ThermoPhase *duplMyselfAsThermoPhase() const; /** *