From 2e3726fe5fca583178ec03e01cad5be6378d6cd5 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Mon, 28 Mar 2016 00:01:39 -0400 Subject: [PATCH] [Thermo] Mark overrides of ThermoPhase methods as virtual consistently --- include/cantera/thermo/DebyeHuckel.h | 4 +-- include/cantera/thermo/EdgePhase.h | 2 +- include/cantera/thermo/FixedChemPotSSTP.h | 4 +-- include/cantera/thermo/HMWSoln.h | 6 ++-- include/cantera/thermo/IdealGasPhase.h | 2 +- include/cantera/thermo/IdealMolalSoln.h | 6 ++-- include/cantera/thermo/IdealSolidSolnPhase.h | 6 ++-- include/cantera/thermo/IdealSolnGasVPSS.h | 10 +++--- .../cantera/thermo/IonsFromNeutralVPSSTP.h | 2 +- include/cantera/thermo/LatticePhase.h | 2 +- include/cantera/thermo/LatticeSolidPhase.h | 12 +++---- include/cantera/thermo/MargulesVPSSTP.h | 2 +- include/cantera/thermo/MetalSHEelectrons.h | 2 +- include/cantera/thermo/MineralEQ3.h | 2 +- .../cantera/thermo/MixedSolventElectrolyte.h | 2 +- include/cantera/thermo/MixtureFugacityTP.h | 8 ++--- include/cantera/thermo/MolalityVPSSTP.h | 4 +-- include/cantera/thermo/MolarityIonicVPSSTP.h | 2 +- .../cantera/thermo/PhaseCombo_Interaction.h | 2 +- include/cantera/thermo/PureFluidPhase.h | 2 +- include/cantera/thermo/RedlichKisterVPSSTP.h | 2 +- include/cantera/thermo/RedlichKwongMFTP.h | 4 +-- include/cantera/thermo/SingleSpeciesTP.h | 34 +++++++++---------- include/cantera/thermo/StoichSubstance.h | 2 +- include/cantera/thermo/SurfPhase.h | 2 +- include/cantera/thermo/VPStandardStateTP.h | 8 ++--- include/cantera/thermo/WaterSSTP.h | 6 ++-- 27 files changed, 70 insertions(+), 70 deletions(-) diff --git a/include/cantera/thermo/DebyeHuckel.h b/include/cantera/thermo/DebyeHuckel.h index 8e6db5ffd..869e3fca2 100644 --- a/include/cantera/thermo/DebyeHuckel.h +++ b/include/cantera/thermo/DebyeHuckel.h @@ -582,7 +582,7 @@ public: DebyeHuckel(const DebyeHuckel&); DebyeHuckel& operator=(const DebyeHuckel&); - ThermoPhase* duplMyselfAsThermoPhase() const; + virtual ThermoPhase* duplMyselfAsThermoPhase() const; virtual ~DebyeHuckel(); //! Full constructor for creating the phase. @@ -664,7 +664,7 @@ public: * * @param rho Input density (kg/m^3). */ - void setDensity(const doublereal rho); + virtual void setDensity(const doublereal rho); //! Set the internally stored molar density (kmol/m^3) of the phase. /** diff --git a/include/cantera/thermo/EdgePhase.h b/include/cantera/thermo/EdgePhase.h index b85cb6086..a0c1b3b3d 100644 --- a/include/cantera/thermo/EdgePhase.h +++ b/include/cantera/thermo/EdgePhase.h @@ -37,7 +37,7 @@ public: EdgePhase(const EdgePhase& right); EdgePhase& operator=(const EdgePhase& right); - ThermoPhase* duplMyselfAsThermoPhase() const; + virtual ThermoPhase* duplMyselfAsThermoPhase() const; //! returns the equation of state type virtual int eosType() const { diff --git a/include/cantera/thermo/FixedChemPotSSTP.h b/include/cantera/thermo/FixedChemPotSSTP.h index 91efe4cf1..1b2a7fb08 100644 --- a/include/cantera/thermo/FixedChemPotSSTP.h +++ b/include/cantera/thermo/FixedChemPotSSTP.h @@ -184,7 +184,7 @@ public: FixedChemPotSSTP(const FixedChemPotSSTP& right); FixedChemPotSSTP& operator=(const FixedChemPotSSTP& right); - ThermoPhase* duplMyselfAsThermoPhase() const; + virtual ThermoPhase* duplMyselfAsThermoPhase() const; /** * Equation of state flag. @@ -278,7 +278,7 @@ public: * @param vbar On return, contains the molar volume of the single species * and the phase. Units are m^3 / kmol. Length = 1 */ - void getPartialMolarVolumes(doublereal* vbar) const; + virtual void getPartialMolarVolumes(doublereal* vbar) const; //@} /// @name Properties of the Standard State of the Species in the Solution diff --git a/include/cantera/thermo/HMWSoln.h b/include/cantera/thermo/HMWSoln.h index b1815d582..494727243 100644 --- a/include/cantera/thermo/HMWSoln.h +++ b/include/cantera/thermo/HMWSoln.h @@ -1192,7 +1192,7 @@ public: HMWSoln(const HMWSoln& right); HMWSoln& operator=(const HMWSoln& right); virtual ~HMWSoln(); - ThermoPhase* duplMyselfAsThermoPhase() const; + virtual ThermoPhase* duplMyselfAsThermoPhase() const; //! Import, construct, and initialize a HMWSoln phase //! specification from an XML tree into the current object. @@ -1350,7 +1350,7 @@ public: * * @param rho Input density (kg/m^3). */ - void setDensity(const doublereal rho); + virtual void setDensity(const doublereal rho); //! Set the internally stored molar density (kmol/m^3) for the phase. /** @@ -1362,7 +1362,7 @@ public: * * @param conc Input molar density (kmol/m^3). */ - void setMolarDensity(const doublereal conc); + virtual void setMolarDensity(const doublereal conc); /** * @} diff --git a/include/cantera/thermo/IdealGasPhase.h b/include/cantera/thermo/IdealGasPhase.h index 554f113fa..23ac2e799 100644 --- a/include/cantera/thermo/IdealGasPhase.h +++ b/include/cantera/thermo/IdealGasPhase.h @@ -320,7 +320,7 @@ public: IdealGasPhase(const IdealGasPhase& right); IdealGasPhase& operator=(const IdealGasPhase& right); - ThermoPhase* duplMyselfAsThermoPhase() const; + virtual ThermoPhase* duplMyselfAsThermoPhase() const; //! Equation of state flag. /*! diff --git a/include/cantera/thermo/IdealMolalSoln.h b/include/cantera/thermo/IdealMolalSoln.h index 6ac329c4d..3e6906da9 100644 --- a/include/cantera/thermo/IdealMolalSoln.h +++ b/include/cantera/thermo/IdealMolalSoln.h @@ -91,7 +91,7 @@ public: IdealMolalSoln(const IdealMolalSoln&); IdealMolalSoln& operator=(const IdealMolalSoln&); - ThermoPhase* duplMyselfAsThermoPhase() const; + virtual ThermoPhase* duplMyselfAsThermoPhase() const; //! Constructor for phase initialization /*! @@ -230,7 +230,7 @@ public: * * @param rho Input Density */ - void setDensity(const doublereal rho); + virtual void setDensity(const doublereal rho); /** * Overridden setMolarDensity() function is necessary because the density @@ -240,7 +240,7 @@ public: * * @param rho Input Density */ - void setMolarDensity(const doublereal rho); + virtual void setMolarDensity(const doublereal rho); //! The isothermal compressibility. Units: 1/Pa. /*! diff --git a/include/cantera/thermo/IdealSolidSolnPhase.h b/include/cantera/thermo/IdealSolidSolnPhase.h index 659a233cc..8ef4eb28f 100644 --- a/include/cantera/thermo/IdealSolidSolnPhase.h +++ b/include/cantera/thermo/IdealSolidSolnPhase.h @@ -494,7 +494,7 @@ public: * @param hrt Vector of length m_kk, which on return hrt[k] will contain the * nondimensional standard state enthalpy of species k. */ - void getEnthalpy_RT(doublereal* hrt) const; + virtual void getEnthalpy_RT(doublereal* hrt) const; //! Get the nondimensional Entropies for the species standard states at the //! current T and P of the solution. @@ -505,7 +505,7 @@ public: * @param sr Vector of length m_kk, which on return sr[k] will contain the * nondimensional standard state entropy for species k. */ - void getEntropy_R(doublereal* sr) const; + virtual void getEntropy_R(doublereal* sr) const; /** * Get the nondimensional Gibbs function for the species standard states at @@ -553,7 +553,7 @@ public: * @param cpr Vector of length m_kk, which on return cpr[k] will contain the * nondimensional constant pressure heat capacity for species k. */ - void getCp_R(doublereal* cpr) const; + virtual void getCp_R(doublereal* cpr) const; virtual void getStandardVolumes(doublereal* vol) const; diff --git a/include/cantera/thermo/IdealSolnGasVPSS.h b/include/cantera/thermo/IdealSolnGasVPSS.h index 072bbc23d..bf0203d0d 100644 --- a/include/cantera/thermo/IdealSolnGasVPSS.h +++ b/include/cantera/thermo/IdealSolnGasVPSS.h @@ -61,10 +61,10 @@ public: //! @name Molar Thermodynamic Properties //! @{ - doublereal enthalpy_mole() const; - doublereal entropy_mole() const; - doublereal cp_mole() const; - doublereal cv_mole() const; + virtual doublereal enthalpy_mole() const; + virtual doublereal entropy_mole() const; + virtual doublereal cp_mole() const; + virtual doublereal cv_mole() const; //! @} //! @name Mechanical Properties @@ -146,7 +146,7 @@ public: virtual void setParametersFromXML(const XML_Node& thermoNode); virtual void initThermo(); - void setToEquilState(const doublereal* lambda_RT); + virtual void setToEquilState(const doublereal* lambda_RT); virtual void initThermoXML(XML_Node& phaseNode, const std::string& id); private: diff --git a/include/cantera/thermo/IonsFromNeutralVPSSTP.h b/include/cantera/thermo/IonsFromNeutralVPSSTP.h index 37d02cebf..3e3fa50de 100644 --- a/include/cantera/thermo/IonsFromNeutralVPSSTP.h +++ b/include/cantera/thermo/IonsFromNeutralVPSSTP.h @@ -327,7 +327,7 @@ public: //@} virtual void initThermo(); - void initThermoXML(XML_Node& phaseNode, const std::string& id); + virtual void initThermoXML(XML_Node& phaseNode, const std::string& id); private: //! Initialize lengths of local variables after all species have diff --git a/include/cantera/thermo/LatticePhase.h b/include/cantera/thermo/LatticePhase.h index 15383ee75..bcd4f2928 100644 --- a/include/cantera/thermo/LatticePhase.h +++ b/include/cantera/thermo/LatticePhase.h @@ -245,7 +245,7 @@ public: LatticePhase(const LatticePhase& right); LatticePhase& operator=(const LatticePhase& right); - ThermoPhase* duplMyselfAsThermoPhase() const; + virtual ThermoPhase* duplMyselfAsThermoPhase() const; //! Full constructor for a lattice phase /*! diff --git a/include/cantera/thermo/LatticeSolidPhase.h b/include/cantera/thermo/LatticeSolidPhase.h index 5022bab65..f0bf0d56e 100644 --- a/include/cantera/thermo/LatticeSolidPhase.h +++ b/include/cantera/thermo/LatticeSolidPhase.h @@ -116,7 +116,7 @@ public: LatticeSolidPhase(const LatticeSolidPhase& right); LatticeSolidPhase& operator=(const LatticeSolidPhase& right); virtual ~LatticeSolidPhase(); - ThermoPhase* duplMyselfAsThermoPhase() const; + virtual ThermoPhase* duplMyselfAsThermoPhase() const; //! Equation of state type flag. /*! @@ -287,15 +287,15 @@ public: */ virtual void getMoleFractions(doublereal* const x) const; - doublereal moleFraction(const int k) const { + virtual doublereal moleFraction(const int k) const { throw NotImplementedError("LatticeSolidPhase::moleFraction"); } - void getMassFractions(doublereal* const y) const { + virtual void getMassFractions(doublereal* const y) const { throw NotImplementedError("LatticeSolidPhase::getMassFractions"); } - doublereal massFraction(const int k) const { + virtual doublereal massFraction(const int k) const { throw NotImplementedError("LatticeSolidPhase::massFraction"); } @@ -307,11 +307,11 @@ public: throw NotImplementedError("LatticeSolidPhase::setMassFractions_NoNorm"); } - void getConcentrations(doublereal* const c) const { + virtual void getConcentrations(doublereal* const c) const { throw NotImplementedError("LatticeSolidPhase::getConcentrations"); } - doublereal concentration(int k) const { + virtual doublereal concentration(int k) const { throw NotImplementedError("LatticeSolidPhase::concentration"); } diff --git a/include/cantera/thermo/MargulesVPSSTP.h b/include/cantera/thermo/MargulesVPSSTP.h index 2ab749323..18ed00be3 100644 --- a/include/cantera/thermo/MargulesVPSSTP.h +++ b/include/cantera/thermo/MargulesVPSSTP.h @@ -362,7 +362,7 @@ public: /// @{ virtual void initThermo(); - void initThermoXML(XML_Node& phaseNode, const std::string& id); + virtual void initThermoXML(XML_Node& phaseNode, const std::string& id); //! @} //! @name Derivatives of Thermodynamic Variables needed for Applications diff --git a/include/cantera/thermo/MetalSHEelectrons.h b/include/cantera/thermo/MetalSHEelectrons.h index 4af162d97..0cc76b6db 100644 --- a/include/cantera/thermo/MetalSHEelectrons.h +++ b/include/cantera/thermo/MetalSHEelectrons.h @@ -198,7 +198,7 @@ public: MetalSHEelectrons(const MetalSHEelectrons& right); MetalSHEelectrons& operator=(const MetalSHEelectrons& right); - ThermoPhase* duplMyselfAsThermoPhase() const; + virtual ThermoPhase* duplMyselfAsThermoPhase() const; /** * Equation of state flag. diff --git a/include/cantera/thermo/MineralEQ3.h b/include/cantera/thermo/MineralEQ3.h index 3249c6635..8922d786f 100644 --- a/include/cantera/thermo/MineralEQ3.h +++ b/include/cantera/thermo/MineralEQ3.h @@ -113,7 +113,7 @@ public: MineralEQ3(const MineralEQ3& right); MineralEQ3& operator=(const MineralEQ3& right); - ThermoPhase* duplMyselfAsThermoPhase() const; + virtual ThermoPhase* duplMyselfAsThermoPhase() const; /** * Equation of state flag. diff --git a/include/cantera/thermo/MixedSolventElectrolyte.h b/include/cantera/thermo/MixedSolventElectrolyte.h index 31ac55886..b0ec6bcc1 100644 --- a/include/cantera/thermo/MixedSolventElectrolyte.h +++ b/include/cantera/thermo/MixedSolventElectrolyte.h @@ -308,7 +308,7 @@ public: /// @{ virtual void initThermo(); - void initThermoXML(XML_Node& phaseNode, const std::string& id); + virtual void initThermoXML(XML_Node& phaseNode, const std::string& id); /** * @} diff --git a/include/cantera/thermo/MixtureFugacityTP.h b/include/cantera/thermo/MixtureFugacityTP.h index 8e683c29d..2b4932f79 100644 --- a/include/cantera/thermo/MixtureFugacityTP.h +++ b/include/cantera/thermo/MixtureFugacityTP.h @@ -129,7 +129,7 @@ public: * @param mu Output vector of non-dimensional species chemical potentials * Length: m_kk. */ - void getChemPotentials_RT(doublereal* mu) const; + virtual void getChemPotentials_RT(doublereal* mu) const; //@} /*! @@ -200,7 +200,7 @@ public: * @param[out] gpure Array of standard state Gibbs free energies. length = * m_kk. units are J/kmol. */ - void getPureGibbs(doublereal* gpure) const; + virtual void getPureGibbs(doublereal* gpure) const; //! Returns the vector of nondimensional internal Energies of the standard //! state at the current temperature and pressure of the solution for each @@ -309,7 +309,7 @@ public: * * @return return the pressure in pascals. */ - doublereal pressure() const { + virtual doublereal pressure() const { return m_Pcurrent; } @@ -343,7 +343,7 @@ public: virtual void getEnthalpy_RT_ref(doublereal* hrt) const; virtual void getGibbs_RT_ref(doublereal* grt) const; - void modifyOneHf298SS(const size_t k, const doublereal Hf298New); + virtual void modifyOneHf298SS(const size_t k, const doublereal Hf298New); protected: //! Returns the vector of nondimensional Gibbs free energies of the diff --git a/include/cantera/thermo/MolalityVPSSTP.h b/include/cantera/thermo/MolalityVPSSTP.h index c97b8c8d8..8a914fb27 100644 --- a/include/cantera/thermo/MolalityVPSSTP.h +++ b/include/cantera/thermo/MolalityVPSSTP.h @@ -403,7 +403,7 @@ public: * @param ac Output vector containing the mole-fraction based activity * coefficients. length: m_kk. */ - void getActivityCoefficients(doublereal* ac) const; + virtual void getActivityCoefficients(doublereal* ac) const; //! Get the array of non-dimensional molality based activity coefficients at //! the current solution temperature, pressure, and solution concentration. @@ -486,7 +486,7 @@ public: //@{ virtual void initThermo(); - void initThermoXML(XML_Node& phaseNode, const std::string& id); + virtual void initThermoXML(XML_Node& phaseNode, const std::string& id); //@} diff --git a/include/cantera/thermo/MolarityIonicVPSSTP.h b/include/cantera/thermo/MolarityIonicVPSSTP.h index ffd7ffb44..2a2af1645 100644 --- a/include/cantera/thermo/MolarityIonicVPSSTP.h +++ b/include/cantera/thermo/MolarityIonicVPSSTP.h @@ -168,7 +168,7 @@ public: /// @{ virtual void initThermo(); - void initThermoXML(XML_Node& phaseNode, const std::string& id); + virtual void initThermoXML(XML_Node& phaseNode, const std::string& id); //! @} virtual std::string report(bool show_thermo=true, diff --git a/include/cantera/thermo/PhaseCombo_Interaction.h b/include/cantera/thermo/PhaseCombo_Interaction.h index aa9842933..bf593f426 100644 --- a/include/cantera/thermo/PhaseCombo_Interaction.h +++ b/include/cantera/thermo/PhaseCombo_Interaction.h @@ -469,7 +469,7 @@ public: /// @{ virtual void initThermo(); - void initThermoXML(XML_Node& phaseNode, const std::string& id); + virtual void initThermoXML(XML_Node& phaseNode, const std::string& id); //! @} //! @name Derivatives of Thermodynamic Variables needed for Applications diff --git a/include/cantera/thermo/PureFluidPhase.h b/include/cantera/thermo/PureFluidPhase.h index 5c3635034..fadb13e03 100644 --- a/include/cantera/thermo/PureFluidPhase.h +++ b/include/cantera/thermo/PureFluidPhase.h @@ -35,7 +35,7 @@ public: PureFluidPhase(const PureFluidPhase& right); PureFluidPhase& operator=(const PureFluidPhase& right); - ThermoPhase* duplMyselfAsThermoPhase() const; + virtual ThermoPhase* duplMyselfAsThermoPhase() const; //! Equation of state type virtual int eosType() const { diff --git a/include/cantera/thermo/RedlichKisterVPSSTP.h b/include/cantera/thermo/RedlichKisterVPSSTP.h index f7741a92e..4cf8f3b3b 100644 --- a/include/cantera/thermo/RedlichKisterVPSSTP.h +++ b/include/cantera/thermo/RedlichKisterVPSSTP.h @@ -366,7 +366,7 @@ public: /// To see how they are used, see importPhase(). virtual void initThermo(); - void initThermoXML(XML_Node& phaseNode, const std::string& id); + virtual void initThermoXML(XML_Node& phaseNode, const std::string& id); //! @} //! @name Derivatives of Thermodynamic Variables needed for Applications diff --git a/include/cantera/thermo/RedlichKwongMFTP.h b/include/cantera/thermo/RedlichKwongMFTP.h index 0385ccb00..688660452 100644 --- a/include/cantera/thermo/RedlichKwongMFTP.h +++ b/include/cantera/thermo/RedlichKwongMFTP.h @@ -160,7 +160,7 @@ public: * @param mu Output vector of non-dimensional species chemical potentials * Length: m_kk. */ - void getChemPotentials_RT(doublereal* mu) const; + virtual void getChemPotentials_RT(doublereal* mu) const; virtual void getChemPotentials(doublereal* mu) const; virtual void getPartialMolarEnthalpies(doublereal* hbar) const; @@ -192,7 +192,7 @@ public: virtual void setParametersFromXML(const XML_Node& thermoNode); virtual void initThermo(); - void setToEquilState(const doublereal* lambda_RT); + virtual void setToEquilState(const doublereal* lambda_RT); virtual void initThermoXML(XML_Node& phaseNode, const std::string& id); private: diff --git a/include/cantera/thermo/SingleSpeciesTP.h b/include/cantera/thermo/SingleSpeciesTP.h index e168811a6..32ed6dd0f 100644 --- a/include/cantera/thermo/SingleSpeciesTP.h +++ b/include/cantera/thermo/SingleSpeciesTP.h @@ -62,7 +62,7 @@ public: SingleSpeciesTP(const SingleSpeciesTP& right); SingleSpeciesTP& operator=(const SingleSpeciesTP& right); - ThermoPhase* duplMyselfAsThermoPhase() const; + virtual ThermoPhase* duplMyselfAsThermoPhase() const; /** * Returns the equation of state type flag. This is a modified base class. @@ -80,12 +80,12 @@ public: * @{ */ - doublereal enthalpy_mole() const; - doublereal intEnergy_mole() const; - doublereal entropy_mole() const; - doublereal gibbs_mole() const; - doublereal cp_mole() const; - doublereal cv_mole() const; + virtual doublereal enthalpy_mole() const; + virtual doublereal intEnergy_mole() const; + virtual doublereal entropy_mole() const; + virtual doublereal gibbs_mole() const; + virtual doublereal cp_mole() const; + virtual doublereal cv_mole() const; /** * @} @@ -134,7 +134,7 @@ public: * @param murt On return, Contains the chemical potential / RT of the * single species and the phase. Units are unitless. Length = 1 */ - void getChemPotentials_RT(doublereal* murt) const; + virtual void getChemPotentials_RT(doublereal* murt) const; //! Get the array of chemical potentials /*! @@ -145,7 +145,7 @@ public: * @param mu On return, Contains the chemical potential of the single * species and the phase. Units are J / kmol . Length = 1 */ - void getChemPotentials(doublereal* mu) const; + virtual void getChemPotentials(doublereal* mu) const; //! Get the species partial molar enthalpies. Units: J/kmol. /*! @@ -154,7 +154,7 @@ public: * @param hbar Output vector of species partial molar enthalpies. * Length: 1. units are J/kmol. */ - void getPartialMolarEnthalpies(doublereal* hbar) const; + virtual void getPartialMolarEnthalpies(doublereal* hbar) const; //! Get the species partial molar internal energies. Units: J/kmol. /*! @@ -172,7 +172,7 @@ public: * @param sbar On return, Contains the entropy of the single species and the * phase. Units are J / kmol / K . Length = 1 */ - void getPartialMolarEntropies(doublereal* sbar) const; + virtual void getPartialMolarEntropies(doublereal* sbar) const; //! Get the species partial molar Heat Capacities. Units: J/ kmol /K. /*! @@ -181,7 +181,7 @@ public: * @param cpbar On return, Contains the heat capacity of the single species * and the phase. Units are J / kmol / K . Length = 1 */ - void getPartialMolarCp(doublereal* cpbar) const; + virtual void getPartialMolarCp(doublereal* cpbar) const; //! Get the species partial molar volumes. Units: m^3/kmol. /*! @@ -190,7 +190,7 @@ public: * @param vbar On return, Contains the molar volume of the single species * and the phase. Units are m^3 / kmol. Length = 1 */ - void getPartialMolarVolumes(doublereal* vbar) const; + virtual void getPartialMolarVolumes(doublereal* vbar) const; //@} /// @name Properties of the Standard State of the Species in the Solution @@ -200,7 +200,7 @@ public: /// are not resolved at the SingleSpeciesTP level. //@{ - void getPureGibbs(doublereal* gpure) const; + virtual void getPureGibbs(doublereal* gpure) const; //! Get the molar volumes of each species in their standard states at the //! current T and P of the solution. @@ -213,7 +213,7 @@ public: * @param vbar On output this contains the standard volume of the species * and phase (m^3/kmol). Vector of length 1 */ - void getStandardVolumes(doublereal* vbar) const; + virtual void getStandardVolumes(doublereal* vbar) const; //@} /// @name Thermodynamic Values for the Species Reference State @@ -237,10 +237,10 @@ public: */ //! Mass fractions are fixed, with Y[0] = 1.0. - void setMassFractions(const doublereal* const y) {}; + virtual void setMassFractions(const doublereal* const y) {}; //! Mole fractions are fixed, with x[0] = 1.0. - void setMoleFractions(const doublereal* const x) {}; + virtual void setMoleFractions(const doublereal* const x) {}; virtual void setState_HP(doublereal h, doublereal p, doublereal tol = 1.e-8); diff --git a/include/cantera/thermo/StoichSubstance.h b/include/cantera/thermo/StoichSubstance.h index 21fb7e18b..4a0907a24 100644 --- a/include/cantera/thermo/StoichSubstance.h +++ b/include/cantera/thermo/StoichSubstance.h @@ -173,7 +173,7 @@ public: StoichSubstance(const StoichSubstance& right); StoichSubstance& operator=(const StoichSubstance& right); - ThermoPhase* duplMyselfAsThermoPhase() const; + virtual ThermoPhase* duplMyselfAsThermoPhase() const; /** * Equation of state flag. diff --git a/include/cantera/thermo/SurfPhase.h b/include/cantera/thermo/SurfPhase.h index 31764d7c0..b5053b2dc 100644 --- a/include/cantera/thermo/SurfPhase.h +++ b/include/cantera/thermo/SurfPhase.h @@ -167,7 +167,7 @@ public: SurfPhase(const SurfPhase& right); SurfPhase& operator=(const SurfPhase& right); - ThermoPhase* duplMyselfAsThermoPhase() const; + virtual ThermoPhase* duplMyselfAsThermoPhase() const; //! Equation of state type flag. /*! diff --git a/include/cantera/thermo/VPStandardStateTP.h b/include/cantera/thermo/VPStandardStateTP.h index 026d40a7f..4d21a83cf 100644 --- a/include/cantera/thermo/VPStandardStateTP.h +++ b/include/cantera/thermo/VPStandardStateTP.h @@ -82,7 +82,7 @@ public: * @param mu Output vector of non-dimensional species chemical potentials * Length: m_kk. */ - void getChemPotentials_RT(doublereal* mu) const; + virtual void getChemPotentials_RT(doublereal* mu) const; //@} @@ -100,7 +100,7 @@ public: virtual void getEnthalpy_RT(doublereal* hrt) const; virtual void getEntropy_R(doublereal* sr) const; virtual void getGibbs_RT(doublereal* grt) const; - void getPureGibbs(doublereal* gpure) const; + virtual void getPureGibbs(doublereal* gpure) const; virtual void getIntEnergy_RT(doublereal* urt) const; virtual void getCp_R(doublereal* cpr) const; virtual void getStandardVolumes(doublereal* vol) const; @@ -142,7 +142,7 @@ public: * * @return return the pressure in pascals. */ - doublereal pressure() const { + virtual doublereal pressure() const { return m_Pcurrent; } @@ -228,7 +228,7 @@ public: //@{ virtual void getEnthalpy_RT_ref(doublereal* hrt) const; - void modifyOneHf298SS(const size_t k, const doublereal Hf298New); + virtual void modifyOneHf298SS(const size_t k, const doublereal Hf298New); virtual void getGibbs_RT_ref(doublereal* grt) const; protected: diff --git a/include/cantera/thermo/WaterSSTP.h b/include/cantera/thermo/WaterSSTP.h index 284e427a4..ba350827f 100644 --- a/include/cantera/thermo/WaterSSTP.h +++ b/include/cantera/thermo/WaterSSTP.h @@ -128,7 +128,7 @@ public: WaterSSTP(const WaterSSTP&); WaterSSTP& operator=(const WaterSSTP&); - ThermoPhase* duplMyselfAsThermoPhase() const; + virtual ThermoPhase* duplMyselfAsThermoPhase() const; //! Full constructor for a water phase /*! @@ -172,8 +172,8 @@ public: virtual void getStandardChemPotentials(doublereal* gss) const; virtual void getGibbs_RT(doublereal* grt) const; - void getEnthalpy_RT(doublereal* hrt) const; - void getEntropy_R(doublereal* sr) const; + virtual void getEnthalpy_RT(doublereal* hrt) const; + virtual void getEntropy_R(doublereal* sr) const; virtual void getCp_R(doublereal* cpr) const; virtual void getIntEnergy_RT(doublereal* urt) const;