From 386c215b3bc0faccc6c15dc51df16e34880e4709 Mon Sep 17 00:00:00 2001 From: "Bryan W. Weber" Date: Tue, 11 Jun 2019 12:46:57 -0400 Subject: [PATCH] [Thermo] Deprecate PureFluid, use PureFluidPhase instead The convenience wrapper PureFluid class can be replaced by PureFluidPhase::initThermoFile or other methods of creating ThermoPhase instances. --- include/cantera/PureFluid.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/include/cantera/PureFluid.h b/include/cantera/PureFluid.h index 540db8ebf..69f119e30 100644 --- a/include/cantera/PureFluid.h +++ b/include/cantera/PureFluid.h @@ -6,6 +6,8 @@ #ifndef CXX_PUREFLUID #define CXX_PUREFLUID +#pragma message("warning: PureFluid.h is deprecated and will be removed after Cantera 2.5.0.") + #include "thermo/PureFluidPhase.h" #include "kinetics.h" @@ -13,12 +15,20 @@ namespace Cantera { //! Wrapper for PureFluidPhase with constructor from file +/*! + * @deprecated To be removed after Cantera 2.5.0. Replaceable with PureFluidPhase. + */ class PureFluid : public PureFluidPhase { public: - PureFluid() : m_ok(false), m_r(0) {} + PureFluid() : m_ok(false), m_r(0) { + warn_deprecated("class PureFluid", "To be removed after Cantera 2.5.0. " + "Replaceable with PureFluidPhase."); + } PureFluid(const std::string& infile, std::string id="") : m_ok(false), m_r(0) { + warn_deprecated("class PureFluid", "To be removed after Cantera 2.5.0. " + "Replaceable with PureFluidPhase::initThermoFile."); m_r = get_XML_File(infile); if (id == "-") { id = ""; @@ -51,10 +61,18 @@ protected: XML_Node* m_r; }; + +//! Water definition from liquidvapor input file +/*! + * @deprecated To be removed after Cantera 2.5.0. Replaceable with PureFluidPhase. + */ class Water : public PureFluid { public: - Water() : PureFluid(std::string("liquidvapor.cti"),std::string("water")) {} + Water() : PureFluid(std::string("liquidvapor.cti"),std::string("water")) { + warn_deprecated("class Water", "To be removed after Cantera 2.5.0. " + "Replaceable with PureFluidPhase."); + } virtual ~Water() {} };