Skip to content

Commit

Permalink
Mark unused/untested classes as deprecated
Browse files Browse the repository at this point in the history
Deprecated thermo classes: Adsorbate, MetalSHEelectrons, MineralEQ3,
MolarityIonicVPSSTP, PhaseCombo_Interaction

Deprecated kinetics classes: AqueousKinetics

Deprecated transport classes: LTPSpecies, LiquidTranInteraction,
LiquidTransport, LiquidTransportData, LiquidTransportParams, SimpleTransport,
SolidTransport, SolidTransportData, Tortuosity

See #267
  • Loading branch information
speth committed Feb 16, 2018
1 parent 20f891f commit 6d22be2
Show file tree
Hide file tree
Showing 29 changed files with 58 additions and 3 deletions.
2 changes: 2 additions & 0 deletions include/cantera/kinetics/AqueousKinetics.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ namespace Cantera
* future version of Cantera. See
* https://github.com/Cantera/cantera/issues/267 for additional information.
*
* @deprecated To be removed after Cantera 2.4
*
* @ingroup kinetics
*/
class AqueousKinetics : public BulkKinetics
Expand Down
3 changes: 3 additions & 0 deletions include/cantera/thermo/AdsorbateThermo.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ namespace Cantera
* future version of Cantera. See
* https://github.com/Cantera/cantera/issues/267 for additional information.
*
* @deprecated To be removed after Cantera 2.4
*
* This class is designed specifically for use by the class MultiSpeciesThermo.
* It implements a model for the thermodynamic properties of a molecule that can
* be modeled as a set of independent quantum harmonic oscillators.
Expand All @@ -48,6 +50,7 @@ class Adsorbate : public SpeciesThermoInterpType
Adsorbate(double tlow, double thigh, double pref, const double* coeffs)
: SpeciesThermoInterpType(tlow, thigh, pref)
{
warn_deprecated("Class Adsorbate", "To be removed after Cantera 2.4");
m_freq.resize(int(coeffs[0]));
m_be = coeffs[1];
std::copy(coeffs+2, coeffs + 2 + m_freq.size(), m_freq.begin());
Expand Down
2 changes: 2 additions & 0 deletions include/cantera/thermo/MetalSHEelectrons.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ namespace Cantera
* future version of Cantera. See
* https://github.com/Cantera/cantera/issues/267 for additional information.
*
* @deprecated To be removed after Cantera 2.4
*
* The class is based on the electron having a chemical potential equal to one-
* half of the entropy of the H2 gas at the system pressure
*
Expand Down
6 changes: 5 additions & 1 deletion include/cantera/thermo/MineralEQ3.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ namespace Cantera
* future version of Cantera. See
* https://github.com/Cantera/cantera/issues/267 for additional information.
*
* @deprecated To be removed after Cantera 2.4
*
* This class inherits from SingleSpeciesTP class. EQ's parameterization is
* mapped onto the Shomate polynomial class.
*
Expand Down Expand Up @@ -96,7 +98,9 @@ class MineralEQ3 : public StoichSubstance
{
public:
//! Default constructor for the MineralEQ3 class
MineralEQ3() {}
MineralEQ3() {
warn_deprecated("Class MineralEQ3", "To be removed after Cantera 2.4");
}

//! Construct and initialize a MineralEQ3 ThermoPhase object
//! directly from an ASCII input file
Expand Down
2 changes: 2 additions & 0 deletions include/cantera/thermo/MolarityIonicVPSSTP.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ namespace Cantera
* future version of Cantera. See
* https://github.com/Cantera/cantera/issues/267 for additional information.
*
* @deprecated To be removed after Cantera 2.4
*
* This class adds additional functions onto the ThermoPhase interface that
* handles the calculation of the excess Gibbs free energy. The ThermoPhase
* class includes a member function, ThermoPhase::activityConvention() that
Expand Down
2 changes: 2 additions & 0 deletions include/cantera/thermo/PhaseCombo_Interaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ namespace Cantera
* future version of Cantera. See
* https://github.com/Cantera/cantera/issues/267 for additional information.
*
* @deprecated To be removed after Cantera 2.4
*
* PhaseCombo_Interaction derives from class GibbsExcessVPSSTP which is derived
* from VPStandardStateTP, and overloads the virtual methods defined there with
* ones that use expressions appropriate for the Margules Excess Gibbs free
Expand Down
2 changes: 2 additions & 0 deletions include/cantera/transport/LTPspecies.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ enum LTPTemperatureDependenceType {
//! Class LTPspecies holds transport parameterizations for a specific liquid-
//! phase species.
/*!
* @deprecated To be removed after Cantera 2.4
*
* Subclasses handle different means of specifying transport properties like
* constant, %Arrhenius or polynomial temperature fits. In its current state,
* it is primarily suitable for specifying temperature dependence, but the
Expand Down
4 changes: 4 additions & 0 deletions include/cantera/transport/LiquidTranInteraction.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ namespace Cantera
{
//! Composition dependence type for liquid mixture transport properties
/*!
* @deprecated To be removed after Cantera 2.4
*
* Types of temperature dependencies:
* - 0 - Mixture calculations with this property are not allowed
* - 1 - Use solvent (species 0) properties
Expand Down Expand Up @@ -86,6 +88,8 @@ enum LiquidTranMixingModel {

//! Base class to handle transport property evaluation in a mixture.
/*!
* @deprecated To be removed after Cantera 2.4
*
* In a mixture, the mixture transport properties will generally depend on the
* contributions of each of the standard state species transport properties.
* Many composition dependencies are possible. This class,
Expand Down
2 changes: 2 additions & 0 deletions include/cantera/transport/LiquidTransport.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ namespace Cantera
* future version of Cantera. See
* https://github.com/Cantera/cantera/issues/267 for additional information.
*
* @deprecated To be removed after Cantera 2.4
*
* Liquid Transport is set up with some flexibility in this class. Transport
* properties like viscosity and thermal conductivity are allowed flexibility
* within the constraints of the LiquidTransportProperty and
Expand Down
2 changes: 2 additions & 0 deletions include/cantera/transport/LiquidTransportData.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ namespace Cantera
//! Class LiquidTransportData holds transport parameters for a
//! specific liquid-phase species.
/*!
* @deprecated To be removed after Cantera 2.4
*
* A LiquidTransportData object is created for each species.
*
* This class is mainly used to collect transport properties from the parse
Expand Down
2 changes: 2 additions & 0 deletions include/cantera/transport/LiquidTransportParams.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ namespace Cantera
//! Class LiquidTransportParams holds transport model parameters relevant to
//! transport in mixtures.
/*!
* @deprecated To be removed after Cantera 2.4
*
* This class is used by TransportFactory to initialize transport objects.
*/
class LiquidTransportParams : public TransportParams
Expand Down
4 changes: 3 additions & 1 deletion include/cantera/transport/SimpleTransport.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ namespace Cantera
//! Class SimpleTransport implements mixture-averaged transport properties for
//! liquid phases.
/*!
* The model is based on that described by Newman, Electrochemical Systems
* @deprecated To be removed after Cantera 2.4
*
* The model is based on that described by Newman, Electrochemical Systems
*
* The velocity of species i may be described by the following equation p. 297
* (12.1)
Expand Down
2 changes: 2 additions & 0 deletions include/cantera/transport/SolidTransport.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ namespace Cantera
//! Class SolidTransport implements transport properties for solids.
//! @ingroup tranprops
/*!
* @deprecated To be removed after Cantera 2.4
*
* @attention This class currently does not have any test cases or examples. Its
* implementation may be incomplete, and future changes to Cantera may
* unexpectedly cause this class to stop working. If you use this class,
Expand Down
2 changes: 2 additions & 0 deletions include/cantera/transport/SolidTransportData.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ namespace Cantera
//! Class SolidTransportData holds transport parameters for a specific solid-
//! phase species.
/*!
* @deprecated To be removed after Cantera 2.4
*
* A SolidTransportData object is created for a solid phase
* (not for each species as happens for the analogous LiquidTransportData).
*
Expand Down
2 changes: 2 additions & 0 deletions include/cantera/transport/Tortuosity.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ namespace Cantera
* future version of Cantera. See
* https://github.com/Cantera/cantera/issues/267 for additional information.
*
* @deprecated To be removed after Cantera 2.4
*
* Class to compute the increase in diffusive path length associated with
* tortuous path diffusion through, for example, porous media. This base class
* implementation relates tortuosity to volume fraction through a power-law
Expand Down
1 change: 1 addition & 0 deletions src/kinetics/AqueousKinetics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ namespace Cantera
AqueousKinetics::AqueousKinetics(thermo_t* thermo) :
BulkKinetics(thermo)
{
warn_deprecated("Class AqueousKinetics", "To be removed after Cantera 2.4");
}

void AqueousKinetics::_update_rates_T()
Expand Down
3 changes: 3 additions & 0 deletions src/thermo/MetalSHEelectrons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,18 @@ namespace Cantera

MetalSHEelectrons::MetalSHEelectrons()
{
warn_deprecated("Class MetalSHEelectrons", "To be removed after Cantera 2.4");
}

MetalSHEelectrons::MetalSHEelectrons(const std::string& infile, const std::string& id_)
{
warn_deprecated("Class MetalSHEelectrons", "To be removed after Cantera 2.4");
initThermoFile(infile, id_);
}

MetalSHEelectrons::MetalSHEelectrons(XML_Node& xmlphase, const std::string& id_)
{
warn_deprecated("Class MetalSHEelectrons", "To be removed after Cantera 2.4");
importPhase(xmlphase, this);
}

Expand Down
2 changes: 2 additions & 0 deletions src/thermo/MineralEQ3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ namespace Cantera

MineralEQ3::MineralEQ3(const std::string& infile, const std::string& id_)
{
warn_deprecated("Class MineralEQ3", "To be removed after Cantera 2.4");
initThermoFile(infile, id_);
}

MineralEQ3::MineralEQ3(XML_Node& xmlphase, const std::string& id_)
{
warn_deprecated("Class MineralEQ3", "To be removed after Cantera 2.4");
importPhase(xmlphase, this);
}

Expand Down
3 changes: 3 additions & 0 deletions src/thermo/MolarityIonicVPSSTP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ MolarityIonicVPSSTP::MolarityIonicVPSSTP() :
numPBSpecies_(m_kk),
neutralPBindexStart(0)
{
warn_deprecated("Class MolarityIonicVPSSTP", "To be removed after Cantera 2.4");
}

MolarityIonicVPSSTP::MolarityIonicVPSSTP(const std::string& inputFile,
Expand All @@ -38,6 +39,7 @@ MolarityIonicVPSSTP::MolarityIonicVPSSTP(const std::string& inputFile,
numPBSpecies_(m_kk),
neutralPBindexStart(0)
{
warn_deprecated("Class MolarityIonicVPSSTP", "To be removed after Cantera 2.4");
initThermoFile(inputFile, id_);
}

Expand All @@ -47,6 +49,7 @@ MolarityIonicVPSSTP::MolarityIonicVPSSTP(XML_Node& phaseRoot,
numPBSpecies_(m_kk),
neutralPBindexStart(0)
{
warn_deprecated("Class MolarityIonicVPSSTP", "To be removed after Cantera 2.4");
importPhase(phaseRoot, this);
}

Expand Down
3 changes: 3 additions & 0 deletions src/thermo/PhaseCombo_Interaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ PhaseCombo_Interaction::PhaseCombo_Interaction() :
formMargules_(0),
formTempModel_(0)
{
warn_deprecated("Class PhaseCombo_Interaction", "To be removed after Cantera 2.4");
}

PhaseCombo_Interaction::PhaseCombo_Interaction(const std::string& inputFile,
Expand All @@ -27,6 +28,7 @@ PhaseCombo_Interaction::PhaseCombo_Interaction(const std::string& inputFile,
formMargules_(0),
formTempModel_(0)
{
warn_deprecated("Class PhaseCombo_Interaction", "To be removed after Cantera 2.4");
initThermoFile(inputFile, id_);
}

Expand All @@ -36,6 +38,7 @@ PhaseCombo_Interaction::PhaseCombo_Interaction(XML_Node& phaseRoot,
formMargules_(0),
formTempModel_(0)
{
warn_deprecated("Class PhaseCombo_Interaction", "To be removed after Cantera 2.4");
importPhase(phaseRoot, this);
}

Expand Down
1 change: 1 addition & 0 deletions src/transport/LTPspecies.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ LTPspecies::LTPspecies() :
m_thermo(0),
m_mixWeight(1.0)
{
warn_deprecated("class LTPspecies", "To be removed after Cantera 2.4");
}

LTPspecies* LTPspecies::duplMyselfAsLTPspecies() const
Expand Down
1 change: 1 addition & 0 deletions src/transport/LiquidTranInteraction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ LiquidTranInteraction::LiquidTranInteraction(TransportPropertyType tp_ind) :
m_model(LTI_MODEL_NOTSET),
m_property(tp_ind)
{
warn_deprecated("Class LiquidTranInteraction", "To be removed after Cantera 2.4");
}

LiquidTranInteraction::~LiquidTranInteraction()
Expand Down
1 change: 1 addition & 0 deletions src/transport/LiquidTransport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ LiquidTransport::LiquidTransport(thermo_t* thermo, int ndim) :
m_mode(-1000),
m_debug(false)
{
warn_deprecated("Class LiquidTransport", "To be removed after Cantera 2.4");
}

LiquidTransport::~LiquidTransport()
Expand Down
1 change: 1 addition & 0 deletions src/transport/LiquidTransportData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ LiquidTransportData::LiquidTransportData() :
electCond(0),
speciesDiffusivity(0)
{
warn_deprecated("class LiquidTransportData", "To be removed after Cantera 2.4");
}

LiquidTransportData::LiquidTransportData(const LiquidTransportData& right) :
Expand Down
1 change: 1 addition & 0 deletions src/transport/LiquidTransportParams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ LiquidTransportParams::LiquidTransportParams() :
model_hydroradius(LTI_MODEL_NOTSET),
compositionDepTypeDefault_(LTI_MODEL_NOTSET)
{
warn_deprecated("Class LiquidTransportParams", "To be removed after Cantera 2.4");
}

LiquidTransportParams::~LiquidTransportParams()
Expand Down
1 change: 1 addition & 0 deletions src/transport/SimpleTransport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ SimpleTransport::SimpleTransport(thermo_t* thermo, int ndim) :
m_cond_mix_ok(false),
m_nDim(1)
{
warn_deprecated("Class SimpleTransport", "To be removed after Cantera 2.4");
}

SimpleTransport::~SimpleTransport()
Expand Down
1 change: 1 addition & 0 deletions src/transport/SolidTransport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ SolidTransport::SolidTransport() :
m_Nlam(0),
m_Elam(0)
{
warn_deprecated("Class SolidTransport", "To be removed after Cantera 2.4");
}

bool SolidTransport::initSolid(SolidTransportData& tr)
Expand Down
1 change: 1 addition & 0 deletions src/transport/SolidTransportData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ SolidTransportData::SolidTransportData() :
defectDiffusivity(0),
defectActivity(0)
{
warn_deprecated("Class SolidTransportData", "To be removed after Cantera 2.4");
}

SolidTransportData::SolidTransportData(const SolidTransportData& right) :
Expand Down
2 changes: 1 addition & 1 deletion test/transport/transportFromScratch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ TEST_F(SimpleTransportTest, fromXML)
int main(int argc, char** argv)
{
printf("Running main() from transportFromScratch.cpp\n");
Cantera::make_deprecation_warnings_fatal();
// Cantera::make_deprecation_warnings_fatal();
testing::InitGoogleTest(&argc, argv);
int result = RUN_ALL_TESTS();
appdelete();
Expand Down

0 comments on commit 6d22be2

Please sign in to comment.