Skip to content

Commit

Permalink
Remove deprecated code slated for removal after Cantera 2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
speth authored and bryanwweber committed May 25, 2022
1 parent e5032e5 commit 7e0f469
Show file tree
Hide file tree
Showing 43 changed files with 58 additions and 688 deletions.
8 changes: 0 additions & 8 deletions include/cantera/base/ct_defs.h
Expand Up @@ -100,10 +100,6 @@ const double ElectronMass = 9.1093837015e-31;
//! These constants are found from the defined and measured constants
//! @{

//! Reduced Planck constant \f$ \hbar \f$ [m2-kg/s]
//! @deprecated Unused. To be removed after Cantera 2.6.
const double Planck_bar = Planck / (2 * Pi);

//! Universal Gas Constant \f$ R_u \f$ [J/kmol/K]
const double GasConstant = Avogadro * Boltzmann;

Expand All @@ -112,10 +108,6 @@ const double logGasConstant = std::log(GasConstant);
//! Universal gas constant in cal/mol/K
const double GasConst_cal_mol_K = GasConstant / 4184.0;

//! log(k_b/h)
//! @deprecated Unused. To be removed after Cantera 2.6.
const double logBoltz_Planck = std::log(Boltzmann / Planck);

//! Stefan-Boltzmann constant \f$ \sigma \f$ [W/m2/K4]
const double StefanBoltz = 2.0 * std::pow(Pi, 5) * std::pow(Boltzmann, 4) / (15.0 * std::pow(Planck, 3) * lightSpeed * lightSpeed); // 5.670374419e-8

Expand Down
11 changes: 0 additions & 11 deletions include/cantera/base/global.h
Expand Up @@ -90,17 +90,6 @@ void thread_complete();
//! Returns the hash of the git commit from which Cantera was compiled, if known
std::string gitCommit();

//! Returns root directory where %Cantera is installed
/*!
* @returns a string containing the name of the base directory where %Cantera is
* installed. If the environmental variable CANTERA_ROOT is defined, this
* function will return its value, preferentially.
* @deprecated Unused within Cantera. To be removed after Cantera 2.6
*
* @ingroup inputfiles
*/
std::string canteraRoot();

//! Returns true if Cantera was compiled in debug mode. Used for handling some cases
//! where behavior tested in the test suite changes depending on whether the `NDEBUG`
//! preprocessor macro is defined.
Expand Down
60 changes: 0 additions & 60 deletions include/cantera/base/plots.h

This file was deleted.

4 changes: 0 additions & 4 deletions include/cantera/clib/ctreactor.h
Expand Up @@ -14,7 +14,6 @@
extern "C" {
#endif

CANTERA_CAPI int reactor_new2(const char* type); //!< @deprecated To be changed after Cantera 2.6.
CANTERA_CAPI int reactor_new(const char* type);
CANTERA_CAPI int reactor_del(int i);
CANTERA_CAPI int reactor_setInitialVolume(int i, double v);
Expand Down Expand Up @@ -48,20 +47,17 @@ extern "C" {
CANTERA_CAPI double reactornet_atol(int i);
CANTERA_CAPI double reactornet_sensitivity(int i, const char* v, int p, int r);

CANTERA_CAPI int flowdev_new2(const char* type); //!< @deprecated To be removed after Cantera 2.6.
CANTERA_CAPI int flowdev_new(const char* type);
CANTERA_CAPI int flowdev_del(int i);
CANTERA_CAPI int flowdev_install(int i, int n, int m);
CANTERA_CAPI int flowdev_setMaster(int i, int n);
CANTERA_CAPI double flowdev_massFlowRate2(int i); //!< @deprecated To be removed after Cantera 2.6.
CANTERA_CAPI double flowdev_massFlowRate(int i);
CANTERA_CAPI int flowdev_setMassFlowCoeff(int i, double v);
CANTERA_CAPI int flowdev_setValveCoeff(int i, double v);
CANTERA_CAPI int flowdev_setPressureCoeff(int i, double v);
CANTERA_CAPI int flowdev_setPressureFunction(int i, int n);
CANTERA_CAPI int flowdev_setTimeFunction(int i, int n);

CANTERA_CAPI int wall_new2(const char* type); //!< @deprecated To be removed after Cantera 2.6.
CANTERA_CAPI int wall_new(const char* type);
CANTERA_CAPI int wall_del(int i);
CANTERA_CAPI int wall_install(int i, int n, int m);
Expand Down
13 changes: 0 additions & 13 deletions include/cantera/kinetics/KineticsFactory.h
Expand Up @@ -15,19 +15,6 @@
namespace Cantera
{

//! @deprecated Unused. To be removed after Cantera 2.6.
class UnknownKineticsModel : public CanteraError
{
public:
UnknownKineticsModel(const std::string& proc, const std::string& kineticsModel) :
CanteraError(proc, "Specified Kinetics model "
+ kineticsModel +
" does not match any known type.") {
warn_deprecated("class UnknownKineticsModel",
"Unused. To be removed after Cantera 2.6.");
}
};

/**
* Factory for kinetics managers.
*/
Expand Down
12 changes: 2 additions & 10 deletions include/cantera/thermo/EdgePhase.h
Expand Up @@ -32,19 +32,11 @@ class EdgePhase : public SurfPhase
public:
//! Construct and initialize an EdgePhase directly from an input file
/*!
* @param infile name of the input file
* @param infile name of the input file. If blank, an empty phase will be created.
* @param id name of the phase id in the file.
* If this is blank, the first phase in the file is used.
*/
explicit EdgePhase(const std::string& infile, const std::string& id="");

//! Constructor
/*!
* @param n0 Surface site density (kmol m-1).
* @deprecated The `n0` constructor argument is deprecated and will be
* removed after Cantera 2.6. Use setSiteDensity() instead.
*/
EdgePhase(doublereal n0=-1.0);
explicit EdgePhase(const std::string& infile="", const std::string& id="");

virtual std::string type() const {
return "Edge";
Expand Down
19 changes: 2 additions & 17 deletions include/cantera/thermo/IdealSolidSolnPhase.h
Expand Up @@ -39,18 +39,6 @@ namespace Cantera
class IdealSolidSolnPhase : public ThermoPhase
{
public:
/**
* Constructor for IdealSolidSolnPhase.
* The generalized concentrations can have three different forms
* depending on the value of the member attribute #m_formGC, which
* is supplied in the constructor or read from the input file.
*
* @param formCG This parameter initializes the #m_formGC variable.
* @deprecated the formGC argument is deprecated and will be removed after
* Cantera 2.6. Use the setStandardConcentrationModel method instead.
*/
IdealSolidSolnPhase(int formCG=-1);

//! Construct and initialize an IdealSolidSolnPhase ThermoPhase object
//! directly from an ASCII input file
/*!
Expand All @@ -64,12 +52,9 @@ class IdealSolidSolnPhase : public ThermoPhase
* created.
* @param id The name of this phase. This is used to look up
* the phase in the input file.
* @param formCG This parameter initializes the #m_formGC variable.
* @deprecated the formGC argument is deprecated and will be removed after
* Cantera 2.6. Use the setStandardConcentrationModel method instead.
*/
explicit IdealSolidSolnPhase(const std::string& infile,
const std::string& id="", int formCG=-1);
explicit IdealSolidSolnPhase(const std::string& infile="",
const std::string& id="");

virtual std::string type() const {
return "IdealSolidSoln";
Expand Down
4 changes: 0 additions & 4 deletions include/cantera/thermo/Phase.h
Expand Up @@ -850,10 +850,6 @@ class Phase
m_caseSensitiveSpecies = cflag;
}

//! Set root Solution holding all phase information
//! @deprecated This function has no effect. To be removed after Cantera 2.6.
virtual void setRoot(std::shared_ptr<Solution> root);

//! Converts a compositionMap to a vector with entries for each species
//! Species that are not specified are set to zero in the vector
/*!
Expand Down
23 changes: 0 additions & 23 deletions include/cantera/thermo/StoichSubstance.h
Expand Up @@ -227,29 +227,6 @@ class StoichSubstance : public SingleSpeciesTP
virtual void initThermo();
virtual void getSpeciesParameters(const std::string& name,
AnyMap& speciesNode) const;

//! Set the equation of state parameters
/*!
* @internal
*
* @param n number of parameters
* @param c array of \a n coefficients
* c[0] = density of phase [ kg/m3 ]
*/
virtual void setParameters(int n, doublereal* const c);

//! Get the equation of state parameters in a vector
/*!
* @internal
*
* @param n number of parameters
* @param c array of \a n coefficients
*
* For this phase:
* - n = 1
* - c[0] = density of phase [ kg/m3 ]
*/
virtual void getParameters(int& n, doublereal* const c) const;
};

}
Expand Down
25 changes: 2 additions & 23 deletions include/cantera/thermo/SurfPhase.h
Expand Up @@ -97,23 +97,14 @@ namespace Cantera
class SurfPhase : public ThermoPhase
{
public:
//! Constructor.
/*!
* @param n0 Site Density of the Surface Phase
* Units: kmol m-2.
* @deprecated The `n0` constructor argument is deprecated and will be
* removed after Cantera 2.6. Use setSiteDensity() instead.
*/
SurfPhase(doublereal n0 = -1.0);

//! Construct and initialize a SurfPhase ThermoPhase object directly from an
//! ASCII input file
/*!
* @param infile name of the input file
* @param infile name of the input file. If blank, an empty phase will be created.
* @param id name of the phase id in the file.
* If this is blank, the first phase in the file is used.
*/
explicit SurfPhase(const std::string& infile, const std::string& id="");
explicit SurfPhase(const std::string& infile="", const std::string& id="");

virtual std::string type() const {
return "Surf";
Expand Down Expand Up @@ -204,18 +195,6 @@ class SurfPhase : public ThermoPhase
virtual doublereal standardConcentration(size_t k = 0) const;
virtual doublereal logStandardConc(size_t k=0) const;

//! Set the equation of state parameters from the argument list
/*!
* @internal
* Set equation of state parameters.
*
* @param n number of parameters. Must be one
* @param c array of \a n coefficients
* c[0] = The site density (kmol m-2)
* @deprecated To be removed after Cantera 2.6
*/
virtual void setParameters(int n, doublereal* const c);

virtual void initThermo();
virtual void getParameters(AnyMap& phaseNode) const;

Expand Down
25 changes: 0 additions & 25 deletions include/cantera/thermo/ThermoFactory.h
Expand Up @@ -24,31 +24,6 @@ namespace Cantera
*/
//@{

//! Specific error to be thrown if the type of Thermo manager is unrecognized.
/*!
* This particular error class may be caught, if the application may have other
* models that the main Cantera application doesn't know about.
*
* @deprecated Unused. To be removed after Cantera 2.6.
*/
class UnknownThermoPhaseModel : public CanteraError
{
public:
//! Constructor
/*!
* @param proc Function name where the error occurred.
* @param thermoModel Sting name of ThermoPhase which didn't match
*/
UnknownThermoPhaseModel(const std::string& proc,
const std::string& thermoModel) :
CanteraError(proc, "Specified ThermoPhase model "
+ thermoModel +
" does not match any known type.") {
warn_deprecated("class UnknownThermoPhaseModel",
"Unused. To be removed after Cantera 2.6.");
}
};


//! Factory class for thermodynamic property managers.
/*!
Expand Down
24 changes: 0 additions & 24 deletions include/cantera/thermo/ThermoPhase.h
Expand Up @@ -1615,26 +1615,6 @@ class ThermoPhase : public Phase
*/
virtual void initThermo();

//! Set the equation of state parameters
/*!
* @internal The number and meaning of these depends on the subclass.
*
* @param n number of parameters
* @param c array of \a n coefficients
* @deprecated To be removed after Cantera 2.6
*/
virtual void setParameters(int n, doublereal* const c);

//! Get the equation of state parameters in a vector
/*!
* @internal The number and meaning of these depends on the subclass.
*
* @param n number of parameters
* @param c array of \a n coefficients
* @deprecated To be removed after Cantera 2.6
*/
virtual void getParameters(int& n, doublereal* const c) const;

//! Set equation of state parameters from an AnyMap phase description.
//! Phases that need additional parameters from the root node should
//! override this method.
Expand Down Expand Up @@ -1818,10 +1798,6 @@ class ThermoPhase : public Phase
mutable doublereal m_tlast;
};

//! typedef for the ThermoPhase class
//! @deprecated To be removed after Cantera 2.6.
typedef ThermoPhase thermo_t;

}

#endif
6 changes: 0 additions & 6 deletions include/cantera/zeroD/ConstPressureReactor.h
Expand Up @@ -24,12 +24,6 @@ class ConstPressureReactor : public Reactor
public:
ConstPressureReactor() {}

virtual std::string typeStr() const {
warn_deprecated("ConstPressureReactor::typeStr",
"To be removed after Cantera 2.6. Use type() instead.");
return "ConstPressureReactor";
}

virtual std::string type() const {
return "ConstPressureReactor";
}
Expand Down
9 changes: 0 additions & 9 deletions include/cantera/zeroD/FlowDevice.h
Expand Up @@ -29,15 +29,6 @@ class FlowDevice
FlowDevice(const FlowDevice&) = delete;
FlowDevice& operator=(const FlowDevice&) = delete;

//! String indicating the flow device implemented.
//! Usually corresponds to the name of the derived class.
//! @deprecated To be removed after Cantera 2.6. Use type() instead.
virtual std::string typeStr() const {
warn_deprecated("FlowDevice::typeStr",
"To be removed after Cantera 2.6. Use type() instead.");
return "FlowDevice";
}

//! String indicating the flow device implemented. Usually
//! corresponds to the name of the derived class.
virtual std::string type() const {
Expand Down

0 comments on commit 7e0f469

Please sign in to comment.