[Thermo] Mark overrides of ThermoPhase methods as virtual consistently

This commit is contained in:
Ray Speth 2016-03-28 00:01:39 -04:00
parent bec0c88e32
commit 2e3726fe5f
27 changed files with 70 additions and 70 deletions

View file

@ -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.
/**

View file

@ -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 {

View file

@ -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

View file

@ -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);
/**
* @}

View file

@ -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.
/*!

View file

@ -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.
/*!

View file

@ -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;

View file

@ -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:

View file

@ -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

View file

@ -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
/*!

View file

@ -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");
}

View file

@ -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

View file

@ -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.

View file

@ -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.

View file

@ -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);
/**
* @}

View file

@ -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

View file

@ -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);
//@}

View file

@ -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,

View file

@ -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

View file

@ -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 {

View file

@ -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

View file

@ -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:

View file

@ -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 <I>T</I> and <I>P</I> 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);

View file

@ -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.

View file

@ -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.
/*!

View file

@ -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:

View file

@ -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;