[Thermo] Deprecate PureFluid, use PureFluidPhase instead

The convenience wrapper PureFluid class can be replaced by
PureFluidPhase::initThermoFile or other methods of creating ThermoPhase
instances.
This commit is contained in:
Bryan W. Weber 2019-06-11 12:46:57 -04:00 committed by Ray Speth
parent 409227cd05
commit 386c215b3b

View file

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