diff --git a/Cantera/src/thermo/EdgePhase.h b/Cantera/src/thermo/EdgePhase.h index 0a3cc247d..8cf709117 100644 --- a/Cantera/src/thermo/EdgePhase.h +++ b/Cantera/src/thermo/EdgePhase.h @@ -43,9 +43,24 @@ namespace Cantera { */ EdgePhase(doublereal n0 = 0.0); + //! Copy Constructor + /*! + * @param right Object to be copied + */ + EdgePhase(const EdgePhase & right); + + //! Assignment Operator + /*! + * @param right Object to be copied + */ + EdgePhase& operator=(const EdgePhase & right); + //! Destructor virtual ~EdgePhase() {} + //! Duplicator from a ThermoPhase object + ThermoPhase *duplMyselfAsThermoPhase() const; + //! returns the equation of state type virtual int eosType() const { return cEdge; } diff --git a/Cantera/src/thermo/IdealGasPDSS.cpp b/Cantera/src/thermo/IdealGasPDSS.cpp index 7ccd8a26a..d010ad46b 100644 --- a/Cantera/src/thermo/IdealGasPDSS.cpp +++ b/Cantera/src/thermo/IdealGasPDSS.cpp @@ -72,6 +72,12 @@ namespace Cantera { IdealGasPDSS::~IdealGasPDSS() { } + //! Duplicator + ThermoPhase *IdealGasPDSS::duplMyselfAsThermoPhase() const { + IdealGasPDSS * idg = new IdealGasPDSS(*this); + return (ThermoPhase *) idg; + } + void IdealGasPDSS::constructPDSS(ThermoPhase *tp, int spindex) { initThermo(); } diff --git a/Cantera/src/thermo/IdealGasPDSS.h b/Cantera/src/thermo/IdealGasPDSS.h index beaa7fc73..dbbcd1122 100644 --- a/Cantera/src/thermo/IdealGasPDSS.h +++ b/Cantera/src/thermo/IdealGasPDSS.h @@ -37,11 +37,29 @@ namespace Cantera { * Basic list of constructors and duplicators */ IdealGasPDSS(ThermoPhase *tp, int spindex); + + //! Copy Constructur + /*! + * @param b Object to be copied + */ IdealGasPDSS(const IdealGasPDSS &b); + + //! Assignment operator + /*! + * @param b Object to be copeid + */ IdealGasPDSS& operator=(const IdealGasPDSS&b); - IdealGasPDSS(ThermoPhase *tp, int spindex, std::string inputFile, std::string id = ""); - IdealGasPDSS(ThermoPhase *tp, int spindex, XML_Node& phaseRef, std::string id = ""); + + IdealGasPDSS(ThermoPhase *tp, int spindex, + std::string inputFile, std::string id = ""); + IdealGasPDSS(ThermoPhase *tp, int spindex, XML_Node& phaseRef, + std::string id = ""); + + //! Destructor virtual ~IdealGasPDSS(); + + //! Duplicator + virtual ThermoPhase *duplMyselfAsThermoPhase() const; /** * diff --git a/Cantera/src/thermo/IdealMolalSoln.h b/Cantera/src/thermo/IdealMolalSoln.h index 04af927fc..6b2dff88e 100644 --- a/Cantera/src/thermo/IdealMolalSoln.h +++ b/Cantera/src/thermo/IdealMolalSoln.h @@ -95,7 +95,7 @@ namespace Cantera { //! Copy Constructor IdealMolalSoln(const IdealMolalSoln &); - //! Equality operator + //! Assignment operator IdealMolalSoln& operator=(const IdealMolalSoln&); //! Constructor for phase initialization diff --git a/Cantera/src/thermo/LatticePhase.cpp b/Cantera/src/thermo/LatticePhase.cpp index 36550f45f..ca5e36026 100644 --- a/Cantera/src/thermo/LatticePhase.cpp +++ b/Cantera/src/thermo/LatticePhase.cpp @@ -21,6 +21,63 @@ namespace Cantera { + //! Base Empty constructor + LatticePhase::LatticePhase() : + m_tlast(0.0) + { + } + + //! Copy Constructor + /*! + * @param right Object to be copied + */ + LatticePhase::LatticePhase(const LatticePhase &right) : + m_tlast(0.0) + { + *this = operator=(right); + } + + //! Assignment operator + /*! + * @param right Object to be copied + */ + LatticePhase& LatticePhase::operator=(const LatticePhase& right) { + if (&right != this) { + ThermoPhase::operator=(right); + m_mm = right.m_mm; + m_tmin = right.m_tmin; + m_tmax = right.m_tmax; + m_p0 = right.m_p0; + m_tlast = right.m_tlast; + m_h0_RT = right.m_h0_RT; + m_cp0_R = right.m_cp0_R; + m_g0_RT = right.m_g0_RT; + m_s0_R = right.m_s0_R; + m_press = right.m_press; + m_vacancy = right.m_vacancy; + m_molar_density = right.m_molar_density; + } + return *this; + } + + //! Destructor + LatticePhase::~LatticePhase() { + } + + //! Duplication function + /*! + * This virtual function is used to create a duplicate of the + * current phase. It's used to duplicate the phase when given + * a ThermoPhase pointer to the phase. + * + * @return It returns a ThermoPhase pointer. + */ + ThermoPhase *LatticePhase::duplMyselfAsThermoPhase() const { + LatticePhase *igp = new LatticePhase(*this); + return (ThermoPhase *) igp; + } + + doublereal LatticePhase:: enthalpy_mole() const { doublereal p0 = m_spthermo->refPressure(); diff --git a/Cantera/src/thermo/LatticePhase.h b/Cantera/src/thermo/LatticePhase.h index df8a7ec2f..e227869d6 100644 --- a/Cantera/src/thermo/LatticePhase.h +++ b/Cantera/src/thermo/LatticePhase.h @@ -31,9 +31,33 @@ namespace Cantera { public: - LatticePhase() : m_tlast(0.0) {} + //! Base Empty constructor + LatticePhase(); - virtual ~LatticePhase() {} + //! Copy Constructor + /*! + * @param right Object to be copied + */ + LatticePhase(const LatticePhase &right); + + //! Assignment operator + /*! + * @param right Object to be copied + */ + LatticePhase& operator=(const LatticePhase& right); + + //! Destructor + virtual ~LatticePhase(); + + //! Duplication function + /*! + * This virtual function is used to create a duplicate of the + * current phase. It's used to duplicate the phase when given + * a ThermoPhase pointer to the phase. + * + * @return It returns a ThermoPhase pointer. + */ + ThermoPhase *duplMyselfAsThermoPhase() const; virtual int eosType() const { return cLattice; } @@ -134,7 +158,9 @@ namespace Cantera { protected: int m_mm; - doublereal m_tmin, m_tmax, m_p0; + doublereal m_tmin; + doublereal m_tmax; + doublereal m_p0; mutable doublereal m_tlast; mutable array_fp m_h0_RT; mutable array_fp m_cp0_R; diff --git a/Cantera/src/thermo/LatticeSolidPhase.cpp b/Cantera/src/thermo/LatticeSolidPhase.cpp index c01b9b8f9..8cce4c479 100644 --- a/Cantera/src/thermo/LatticeSolidPhase.cpp +++ b/Cantera/src/thermo/LatticeSolidPhase.cpp @@ -26,6 +26,59 @@ using namespace std; namespace Cantera { + + // Base empty constructor + LatticeSolidPhase::LatticeSolidPhase() : + m_tlast(0.0) + { + } + + // Copy Constructor + /* + * @param right Object to be copied + */ + LatticeSolidPhase::LatticeSolidPhase(const LatticeSolidPhase &right) : + m_tlast(0.0) + { + *this = operator=(right); + } + + // Assignment operator + /* + * @param right Object to be copied + */ + LatticeSolidPhase& + LatticeSolidPhase::operator=(const LatticeSolidPhase& right) { + if (&right != this) { + ThermoPhase::operator=(right); + m_mm = right.m_mm; + m_kk = right.m_kk; + m_tlast = right.m_tlast; + m_press = right.m_press; + m_molar_density = right.m_molar_density; + m_nlattice = right.m_nlattice; + m_x = right.m_x; + } + return *this; + } + + //! Destructor + LatticeSolidPhase::~LatticeSolidPhase() { + } + + // Duplication function + /* + * This virtual function is used to create a duplicate of the + * current phase. It's used to duplicate the phase when given + * a ThermoPhase pointer to the phase. + * + * @return It returns a %ThermoPhase pointer. + */ + ThermoPhase *LatticeSolidPhase::duplMyselfAsThermoPhase() const { + LatticeSolidPhase *igp = new LatticeSolidPhase(*this); + return (ThermoPhase *) igp; + } + doublereal LatticeSolidPhase:: enthalpy_mole() const { _updateThermo(); diff --git a/Cantera/src/thermo/LatticeSolidPhase.h b/Cantera/src/thermo/LatticeSolidPhase.h index d38500e9d..f9a4a3fe4 100644 --- a/Cantera/src/thermo/LatticeSolidPhase.h +++ b/Cantera/src/thermo/LatticeSolidPhase.h @@ -34,9 +34,33 @@ namespace Cantera { public: - LatticeSolidPhase() : m_tlast(0.0) {} + //! Base empty constructor + LatticeSolidPhase(); - virtual ~LatticeSolidPhase() {} + //! Copy Constructor + /*! + * @param right Object to be copied + */ + LatticeSolidPhase(const LatticeSolidPhase &right); + + //! Assignment operator + /*! + * @param right Object to be copied + */ + LatticeSolidPhase& operator=(const LatticeSolidPhase& right); + + //! Destructor + virtual ~LatticeSolidPhase(); + + //! Duplication function + /*! + * This virtual function is used to create a duplicate of the + * current phase. It's used to duplicate the phase when given + * a ThermoPhase pointer to the phase. + * + * @return It returns a ThermoPhase pointer. + */ + ThermoPhase *duplMyselfAsThermoPhase() const; virtual int eosType() const { return cLatticeSolid; } diff --git a/Cantera/src/thermo/MetalPhase.h b/Cantera/src/thermo/MetalPhase.h index 9e7dd3a43..a7bd456ec 100644 --- a/Cantera/src/thermo/MetalPhase.h +++ b/Cantera/src/thermo/MetalPhase.h @@ -35,9 +35,27 @@ namespace Cantera { MetalPhase() {} - virtual ~MetalPhase() {} + MetalPhase(const MetalPhase &right) { + *this = operator=(right); + } - // Overloaded methoods of class ThermoPhase + MetalPhase& operator=(const MetalPhase &right) { + if (&right != this) { + ThermoPhase::operator=(right); + m_press = right.m_press; + } + return *this; + } + + virtual ~MetalPhase() {} + + //! Duplicator + virtual ThermoPhase *duplMyselfAsThermoPhase() const { + MetalPhase * idg = new MetalPhase(*this); + return (ThermoPhase *) idg; + } + + // Overloaded methods of class ThermoPhase virtual int eosType() const { return cMetal; } diff --git a/Cantera/src/thermo/PDSS.h b/Cantera/src/thermo/PDSS.h index 282453773..f84f9b55c 100644 --- a/Cantera/src/thermo/PDSS.h +++ b/Cantera/src/thermo/PDSS.h @@ -41,8 +41,19 @@ namespace Cantera { */ PDSS(); PDSS(ThermoPhase *tp, int spindex); + + //! Copy Constructor + /*! + * @param b object to be copied + */ PDSS(const PDSS &b); + + //! Assignment operator + /*! + * @param b Object to be copied + */ PDSS& operator=(const PDSS&b); + PDSS(ThermoPhase *tp, int spindex, std::string inputFile, std::string id = ""); PDSS(ThermoPhase *tp, int spindex, XML_Node& phaseRef, std::string id = ""); virtual ~PDSS(); diff --git a/Cantera/src/thermo/PureFluidPhase.cpp b/Cantera/src/thermo/PureFluidPhase.cpp index e46cdb8bc..6f8de086f 100644 --- a/Cantera/src/thermo/PureFluidPhase.cpp +++ b/Cantera/src/thermo/PureFluidPhase.cpp @@ -1,6 +1,7 @@ /** * @file PureFluidPhase.cpp - * Definitions for a ThermoPhase object for a pure fluid phase consisting of gas, liquid, mixed-gas-liquid + * Definitions for a ThermoPhase object for a pure fluid phase consisting + * of gas, liquid, mixed-gas-liquid * and supercritical fluid (see \ref thermoprops * and class \link Cantera::PureFluidPhase PureFluidPhase\endlink). */ @@ -17,7 +18,64 @@ namespace Cantera { - PureFluidPhase::~PureFluidPhase() { delete m_sub; } + // Base Constructor + PureFluidPhase::PureFluidPhase() : + ThermoPhase(), + m_sub(0), + m_subflag(0), + m_mw(-1.0), + m_verbose(false) + { + } + + // CopyConstructor + PureFluidPhase::PureFluidPhase(const PureFluidPhase& right) : + ThermoPhase(), + m_sub(0), + m_subflag(0), + m_mw(-1.0), + m_verbose(false) + { + *this = right; + } + + //! Assignment operator + /*! + * @param right Object to be copied + */ + PureFluidPhase& PureFluidPhase::operator=(const PureFluidPhase& right) { + if (&right != this) { + ThermoPhase::operator=(right); + if (m_sub) { + delete m_sub; + } + m_subflag = right.m_subflag; + m_sub = tpx::GetSub(m_subflag); + m_mw = right.m_mw; + m_verbose = right.m_verbose; + } + return *this; + } + + // Duplicator from the %ThermoPhase parent class + /* + * Given a pointer to a %ThermoPhase object, this function will + * duplicate the %ThermoPhase object and all underlying structures. + * This is basically a wrapper around the copy constructor. + * + * @return returns a pointer to a %ThermoPhase + */ + ThermoPhase *PureFluidPhase::duplMyselfAsThermoPhase() const { + PureFluidPhase *igp = new PureFluidPhase(*this); + return (ThermoPhase *) igp; + } + + + + + PureFluidPhase::~PureFluidPhase() { + delete m_sub; + } void PureFluidPhase:: initThermo() { diff --git a/Cantera/src/thermo/PureFluidPhase.h b/Cantera/src/thermo/PureFluidPhase.h index 30df53b3d..c7d05a69f 100644 --- a/Cantera/src/thermo/PureFluidPhase.h +++ b/Cantera/src/thermo/PureFluidPhase.h @@ -63,13 +63,34 @@ namespace Cantera { public: - //! Base Constructor - PureFluidPhase() : ThermoPhase(), m_sub(0), m_subflag(0), - m_mw(-1.0), m_verbose(false) {} + //! Empty Base Constructor + PureFluidPhase(); + + //! Copy Constructor + /*! + * @param right Object to be copied + */ + PureFluidPhase(const PureFluidPhase &right); + + //! Assignment operator + /*! + * @param right Object to be copied + */ + PureFluidPhase& operator=(const PureFluidPhase& right); //! Destructor virtual ~PureFluidPhase(); - + + //! Duplication function + /*! + * This virtual function is used to create a duplicate of the + * current phase. It's used to duplicate the phase when given + * a ThermoPhase pointer to the phase. + * + * @return It returns a ThermoPhase pointer. + */ + ThermoPhase *duplMyselfAsThermoPhase() const; + //! Equation of state type virtual int eosType() const { return cPureFluid; } diff --git a/Cantera/src/thermo/SingleSpeciesTP.cpp b/Cantera/src/thermo/SingleSpeciesTP.cpp index f2c4fcbf2..e9980ada2 100644 --- a/Cantera/src/thermo/SingleSpeciesTP.cpp +++ b/Cantera/src/thermo/SingleSpeciesTP.cpp @@ -28,9 +28,8 @@ namespace Cantera { * */ - /** - * SingleSpeciesTP(): - * + // Base empty constructor. + /* * Base constructor -> does nothing but called the inherited * class constructor */ @@ -44,15 +43,62 @@ namespace Cantera { { } - /** - * ~SingleSpeciesTP(): - * + + //! Copy constructor + /*! + * @param right Object to be copied + */ + SingleSpeciesTP::SingleSpeciesTP(const SingleSpeciesTP &right): + ThermoPhase(), + m_tmin(0.0), + m_tmax(0.0), + m_press(OneAtm), + m_p0(OneAtm), + m_tlast(-1.0) + { + *this = operator=(right); + } + + //! Assignment operator + /*! + * @param right Object to be copied + */ + SingleSpeciesTP & SingleSpeciesTP::operator=(const SingleSpeciesTP & right) { + if (&right != this) { + ThermoPhase::operator=(right); + m_tmin = right.m_tmin; + m_tmax = right.m_tmax; + m_press = right.m_press; + m_p0 = right.m_p0; + m_tlast = right.m_tlast; + m_h0_RT = right.m_h0_RT; + m_cp0_R = right.m_cp0_R; + m_s0_R = right.m_s0_R; + } + return *this; + } + + /* * destructor -> does nothing but implicitly calls the inherited * class destructors. */ SingleSpeciesTP::~SingleSpeciesTP() { } + + //! Duplication function + /*! + * This virtual function is used to create a duplicate of the + * current phase. It's used to duplicate the phase when given + * a ThermoPhase pointer to the phase. + * + * @return It returns a ThermoPhase pointer. + */ + ThermoPhase *SingleSpeciesTP::duplMyselfAsThermoPhase() const { + SingleSpeciesTP *stp = new SingleSpeciesTP(*this); + return (ThermoPhase *) stp; + } + /** * * ------------------- Utilities ---------------------------------- diff --git a/Cantera/src/thermo/SingleSpeciesTP.h b/Cantera/src/thermo/SingleSpeciesTP.h index 9229fd46f..5d990b75d 100644 --- a/Cantera/src/thermo/SingleSpeciesTP.h +++ b/Cantera/src/thermo/SingleSpeciesTP.h @@ -67,7 +67,8 @@ namespace Cantera { * of such a compound even past the phase equilibrium point, up to the * point where the phase itself ceases to be a stable phase. * - * This class doesn't do much at the initialization level. It's SingleSpeciesTP::initThermo() + * This class doesn't do much at the initialization level. + * It's SingleSpeciesTP::initThermo() * member does check that one and only one species has been defined * to occupy the phase. * @@ -77,12 +78,34 @@ namespace Cantera { public: - /// Constructor. + //! Base empty constructor. SingleSpeciesTP(); - /// Destructor + //! Copy constructor + /*! + * @param right Object to be copied + */ + SingleSpeciesTP(const SingleSpeciesTP &right); + + //! Assignment operator + /*! + * @param right Object to be copied + */ + SingleSpeciesTP & operator=(const SingleSpeciesTP & right); + + //! Destructor virtual ~SingleSpeciesTP(); + //! Duplication function + /*! + * This virtual function is used to create a duplicate of the + * current phase. It's used to duplicate the phase when given + * a ThermoPhase pointer to the phase. + * + * @return It returns a ThermoPhase pointer. + */ + ThermoPhase *duplMyselfAsThermoPhase() const; + /** * * @name Information Methods diff --git a/Cantera/src/thermo/StoichSubstanceSSTP.cpp b/Cantera/src/thermo/StoichSubstanceSSTP.cpp index 79f207b45..0dc4034b7 100644 --- a/Cantera/src/thermo/StoichSubstanceSSTP.cpp +++ b/Cantera/src/thermo/StoichSubstanceSSTP.cpp @@ -39,6 +39,11 @@ namespace Cantera { { } + // Full Constructor. + /* + * @param phaseRef XML node pointing to a StoichSubstanceSSTP description + * @param id Id of the phase. + */ StoichSubstanceSSTP::StoichSubstanceSSTP(XML_Node& xmlphase, std::string id) { if (id != "") { std::string idxml = xmlphase["id"]; @@ -56,6 +61,28 @@ namespace Cantera { importPhase(xmlphase, this); } + //! Copy constructor + /*! + * @param right Object to be copied + */ + StoichSubstanceSSTP::StoichSubstanceSSTP(const StoichSubstanceSSTP &right) : + SingleSpeciesTP() + { + *this = operator=(right); + } + + //! Assignment operator + /*! + * @param right Object to be copied + */ + StoichSubstanceSSTP & + StoichSubstanceSSTP::operator=(const StoichSubstanceSSTP & right) { + if (&right != this) { + SingleSpeciesTP::operator=(right); + } + return *this; + } + /* * Destructor for the routine (virtual) * @@ -64,6 +91,20 @@ namespace Cantera { { } + // Duplication function + /* + * This virtual function is used to create a duplicate of the + * current phase. It's used to duplicate the phase when given + * a ThermoPhase pointer to the phase. + * + * @return It returns a ThermoPhase pointer. + */ + ThermoPhase *StoichSubstanceSSTP::duplMyselfAsThermoPhase() const { + StoichSubstanceSSTP *stp = new StoichSubstanceSSTP(*this); + return (ThermoPhase *) stp; + } + + /* * ---- Utilities ----- */ diff --git a/Cantera/src/thermo/StoichSubstanceSSTP.h b/Cantera/src/thermo/StoichSubstanceSSTP.h index fa6233750..631476de7 100644 --- a/Cantera/src/thermo/StoichSubstanceSSTP.h +++ b/Cantera/src/thermo/StoichSubstanceSSTP.h @@ -53,7 +53,8 @@ namespace Cantera { * The enthalpy function is given by the following relation. * * \f[ - * \raggedright h^o_k(T,P) = h^{ref}_k(T) + \tilde v \left( P - P_{ref} \right) + * \raggedright h^o_k(T,P) = + * h^{ref}_k(T) + \tilde v \left( P - P_{ref} \right) * \f] * * For an incompressible, @@ -166,25 +167,42 @@ namespace Cantera { class StoichSubstanceSSTP : public SingleSpeciesTP { public: - /** - * Default Constructor for the StoichSubstanceSSTP class - */ + + //! Default Constructor for the StoichSubstanceSSTP class StoichSubstanceSSTP(); - //! Constructor. + //! Full Constructor. /*! * @param phaseRef XML node pointing to a StoichSubstanceSSTP description * @param id Id of the phase. */ StoichSubstanceSSTP(XML_Node& phaseRef, std::string id = ""); - - /** - * Destructor for the routine (virtual) - * + //! Copy constructor + /*! + * @param right Object to be copied */ + StoichSubstanceSSTP(const StoichSubstanceSSTP &right); + + //! Assignment operator + /*! + * @param right Object to be copied + */ + StoichSubstanceSSTP & operator=(const StoichSubstanceSSTP & right); + + //! Destructor for the routine (virtual) virtual ~StoichSubstanceSSTP(); + //! Duplication function + /*! + * This virtual function is used to create a duplicate of the + * current phase. It's used to duplicate the phase when given + * a ThermoPhase pointer to the phase. + * + * @return It returns a ThermoPhase pointer. + */ + ThermoPhase *duplMyselfAsThermoPhase() const; + /** * * @name Utilities @@ -399,8 +417,8 @@ namespace Cantera { * term \f$ P_{ref} \hat v\f$ is subtracted from the specified reference molar * enthalpy to compute the standard state molar internal energy. * - * @param urt output vector of nondimensional standard state internal energies - * of the species. Length: m_kk. + * @param urt output vector of nondimensional standard state + * internal energies of the species. Length: m_kk. */ virtual void getIntEnergy_RT(doublereal* urt) const; diff --git a/Cantera/src/thermo/SurfPhase.cpp b/Cantera/src/thermo/SurfPhase.cpp index ceecdde15..d3f909fc5 100644 --- a/Cantera/src/thermo/SurfPhase.cpp +++ b/Cantera/src/thermo/SurfPhase.cpp @@ -113,7 +113,7 @@ namespace Cantera { * @return returns a pointer to a %ThermoPhase */ ThermoPhase *SurfPhase::duplMyselfAsThermoPhase() const { - ThermoPhase *igp = new SurfPhase(*this); + SurfPhase *igp = new SurfPhase(*this); return (ThermoPhase *) igp; } @@ -441,10 +441,46 @@ namespace Cantera { } } + // Default constructor + EdgePhase::EdgePhase(doublereal n0) : SurfPhase(n0) { + setNDim(1); + } - EdgePhase::EdgePhase(doublereal n0) : SurfPhase(n0) { - setNDim(1); + // Copy Constructor + /* + * @param right Object to be copied + */ + EdgePhase::EdgePhase(const EdgePhase & right) : + SurfPhase(right.m_n0) + { + setNDim(1); + *this = operator=(right); + } + + // Assignment Operator + /* + * @param right Object to be copied + */ + EdgePhase& EdgePhase::operator=(const EdgePhase & right) { + if (&right != this) { + SurfPhase::operator=(right); + setNDim(1); } + return *this; + } + + // Duplicator from the %ThermoPhase parent class + /* + * Given a pointer to a %ThermoPhase object, this function will + * duplicate the %ThermoPhase object and all underlying structures. + * This is basically a wrapper around the copy constructor. + * + * @return returns a pointer to a %ThermoPhase + */ + ThermoPhase *EdgePhase::duplMyselfAsThermoPhase() const { + EdgePhase *igp = new EdgePhase(*this); + return (ThermoPhase *) igp; + } void EdgePhase:: setParametersFromXML(const XML_Node& eosdata) { diff --git a/Cantera/src/thermo/VPStandardStateTP.h b/Cantera/src/thermo/VPStandardStateTP.h index c84122976..951682f04 100644 --- a/Cantera/src/thermo/VPStandardStateTP.h +++ b/Cantera/src/thermo/VPStandardStateTP.h @@ -65,7 +65,8 @@ namespace Cantera { * The virtual function #_updateRefStateThermo() is supplied to do this * and may be reimplemented in child routines. A default implementation * based on the speciesThermo class is supplied in this base class. - * #_updateStandardStateThermo() is called whenever a reference state property is needed. + * #_updateStandardStateThermo() is called whenever a reference state + * property is needed. * * When #m_useTmpStandardStateStorage is true, then the following * internal arrays, containing information on the standard state properties