Removed some deprecated functions
This commit is contained in:
parent
11128fadbd
commit
8b6c9a0bf7
21 changed files with 16 additions and 589 deletions
|
|
@ -32,41 +32,6 @@ extern std::string FP_Format;
|
|||
|
||||
extern std::string INT_Format;
|
||||
|
||||
//! This function adds a child node with the name, "bool", with a value
|
||||
//! consisting of a single bool
|
||||
/*!
|
||||
* This function will add a child node to the current XML node, with the
|
||||
* name "bool". It will have a title attribute, and the body
|
||||
* of the XML node will be filled out with a single bool.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* Code snippet:
|
||||
* @verbatim
|
||||
const XML_Node &node;
|
||||
std::string titleString = "doSpecialOp";
|
||||
bool value = true;
|
||||
addBool(node, titleString, value);
|
||||
@endverbatim
|
||||
*
|
||||
* Creates the following the snippet in the XML file:
|
||||
* @verbatim
|
||||
<parentNode>
|
||||
<bool title="doSpecialOp" type="optional">
|
||||
true
|
||||
<\integer>
|
||||
<\parentNode>
|
||||
@endverbatim
|
||||
*
|
||||
* @param node reference to the XML_Node object of the parent XML element
|
||||
* @param titleString String name of the title attribute
|
||||
* @param value Value - single bool
|
||||
*
|
||||
* @deprecated never used
|
||||
*/
|
||||
DEPRECATED(void addBool(Cantera::XML_Node& node, const std::string& titleString,
|
||||
const bool value));
|
||||
|
||||
//! This function adds a child node with the name, "integer", with a value
|
||||
//! consisting of a single integer
|
||||
/*!
|
||||
|
|
@ -164,65 +129,6 @@ void addFloat(Cantera::XML_Node& node, const std::string& titleString,
|
|||
const std::string typeString="", const doublereal minval = Cantera::Undef,
|
||||
const doublereal maxval = Cantera::Undef);
|
||||
|
||||
//! This function adds a child node with the name, "intArray", with a value
|
||||
//! consisting of a comma separated list of integers
|
||||
/*!
|
||||
* This function will add a child node to the current XML node, with the
|
||||
* name "intArray". It will have a title attribute, and the body
|
||||
* of the XML node will be filled out with a comma separated list of
|
||||
* integers
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* Code snippet:
|
||||
* @verbatim
|
||||
const XML_Node &node;
|
||||
std::string titleString = "additionalCases";
|
||||
int n = 3;
|
||||
int cases[3] = [3, 6, 10];
|
||||
std::string typeString = "optional";
|
||||
std::string units = "";
|
||||
addIntegerArray(node, titleString, n, &cases[0], typeString, units);
|
||||
@endverbatim
|
||||
*
|
||||
* Creates the following the snippet in the XML file:
|
||||
* @verbatim
|
||||
<parentNode>
|
||||
<intArray title="additionalCases" type="optional">
|
||||
3, 6, 10
|
||||
<\intArray>
|
||||
<\parentNode>
|
||||
@endverbatim
|
||||
*
|
||||
* @param node reference to the XML_Node object of the parent XML element
|
||||
* @param titleString String name of the title attribute
|
||||
* @param n Length of the integer vector.
|
||||
* @param values Pointer to a vector of integers
|
||||
* @param unitsString String name of the Units attribute. This is an optional
|
||||
* parameter. The default is to
|
||||
* have an empty string.
|
||||
* @param typeString String type. This is an optional parameter. The default
|
||||
* is to have an empty string.
|
||||
* @param minval Minimum allowed value of the int. This is an optional
|
||||
* parameter. The default is the
|
||||
* special double, Cantera::Undef, which means to ignore the
|
||||
* entry.
|
||||
* @param maxval Maximum allowed value of the int. This is an optional
|
||||
* parameter. The default is the
|
||||
* special double, Cantera::Undef, which means to ignore the
|
||||
* entry.
|
||||
*
|
||||
* @todo unitsString shouldn't be here, since it's an int. typeString should
|
||||
* be codified as to its usage.
|
||||
*
|
||||
* @deprecated Not currently used.
|
||||
*/
|
||||
DEPRECATED(void addIntegerArray(Cantera::XML_Node& node, const std::string& titleString,
|
||||
const size_t n, const int* const values,
|
||||
const std::string unitsString="", const std::string typeString="",
|
||||
const doublereal minval=Cantera::Undef,
|
||||
const doublereal maxval=Cantera::Undef));
|
||||
|
||||
//! This function adds a child node with the name, "floatArray", with a value
|
||||
//! consisting of a comma separated list of floats
|
||||
/*!
|
||||
|
|
|
|||
|
|
@ -297,17 +297,6 @@ void writelogendl();
|
|||
*/
|
||||
void error(const std::string& msg);
|
||||
|
||||
//! returns 1 for MATLAB, 2 for Python, and 0 for C++ or Fortran.
|
||||
/*!
|
||||
* This routine is part of the interface suite whose behavior changes
|
||||
* with the interface. The interface suite has been moved to the
|
||||
* class logger and inherited classes of logger.
|
||||
*
|
||||
* @ingroup textlogs
|
||||
* @deprecated
|
||||
*/
|
||||
DEPRECATED(int userInterface());
|
||||
|
||||
//! Install a logger.
|
||||
/*!
|
||||
* Called by the language interfaces to install an appropriate logger.
|
||||
|
|
@ -351,7 +340,6 @@ XML_Node* get_XML_File(std::string file, int debug = 0);
|
|||
*/
|
||||
void close_XML_File(std::string file);
|
||||
|
||||
|
||||
#ifdef WITH_HTML_LOGS
|
||||
|
||||
/*!
|
||||
|
|
|
|||
|
|
@ -87,12 +87,6 @@ public:
|
|||
std::cerr << msg << std::endl;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/// Return an integer specifying the application environment.
|
||||
/// @deprecated
|
||||
DEPRECATED(virtual int env()) {
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,12 +77,6 @@ public:
|
|||
*/
|
||||
virtual Kinetics* duplMyselfAsKinetics(const std::vector<thermo_t*> & tpVector) const;
|
||||
|
||||
/**
|
||||
* @deprecated use type() instead
|
||||
*/
|
||||
DEPRECATED(virtual int ID() const) {
|
||||
return cAqueousKinetics;
|
||||
}
|
||||
virtual int type() const {
|
||||
return cAqueousKinetics;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,15 +62,6 @@ public:
|
|||
return dynamic_cast<Kinetics*>(iK);
|
||||
}
|
||||
|
||||
/**
|
||||
* Identifies the subclass of the Kinetics manager type.
|
||||
* These are listed in mix_defs.h.
|
||||
* @deprecated use type() instead.
|
||||
*/
|
||||
DEPRECATED(virtual int ID() const) {
|
||||
return cEdgeKinetics;
|
||||
}
|
||||
|
||||
/**
|
||||
* Identifies the subclass of the Kinetics manager type.
|
||||
* These are listed in mix_defs.h.
|
||||
|
|
|
|||
|
|
@ -32,12 +32,6 @@ public:
|
|||
/// Destructor.
|
||||
virtual ~GRI_30_Kinetics() {}
|
||||
|
||||
/**
|
||||
* @deprecated use type() instead
|
||||
*/
|
||||
DEPRECATED(virtual int ID() const) {
|
||||
return cGRI_30_Kinetics;
|
||||
}
|
||||
virtual int type() const {
|
||||
return cGRI_30_Kinetics;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,16 +92,6 @@ public:
|
|||
*/
|
||||
virtual Kinetics* duplMyselfAsKinetics(const std::vector<thermo_t*> & tpVector) const;
|
||||
|
||||
|
||||
//! Identifies the subclass of the Kinetics manager type.
|
||||
/*!
|
||||
* These are listed in mix_defs.h.
|
||||
* @deprecated use type() instead
|
||||
*/
|
||||
DEPRECATED(virtual int ID() const) {
|
||||
return cGasKinetics;
|
||||
}
|
||||
|
||||
//! Identifies the kinetics manager type.
|
||||
/*!
|
||||
* Each class derived from Kinetics should overload this method to
|
||||
|
|
|
|||
|
|
@ -153,10 +153,6 @@ public:
|
|||
*/
|
||||
virtual Kinetics* duplMyselfAsKinetics(const std::vector<thermo_t*> & tpVector) const;
|
||||
|
||||
//! Return the ID of the kinetics object
|
||||
//! @deprecated use type() instead
|
||||
DEPRECATED(virtual int ID() const);
|
||||
|
||||
//! Return the type of the kinetics object
|
||||
virtual int type() const;
|
||||
|
||||
|
|
@ -167,7 +163,6 @@ public:
|
|||
*/
|
||||
void setElectricPotential(int n, doublereal V);
|
||||
|
||||
|
||||
///
|
||||
/// @name Reaction Rates Of Progress
|
||||
///
|
||||
|
|
|
|||
|
|
@ -190,13 +190,6 @@ public:
|
|||
*/
|
||||
virtual void assignShallowPointers(const std::vector<thermo_t*> & tpVector);
|
||||
|
||||
//! Identifies the subclass of the Kinetics manager type.
|
||||
/*!
|
||||
* These are listed in mix_defs.h.
|
||||
* @deprecated use type() instead
|
||||
*/
|
||||
DEPRECATED(virtual int ID() const);
|
||||
|
||||
//! Identifies the kinetics manager type.
|
||||
/*!
|
||||
* Each class derived from Kinetics should overload this method to
|
||||
|
|
@ -295,7 +288,6 @@ public:
|
|||
return m_rxnphase;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This method returns a reference to the nth ThermoPhase
|
||||
* object defined in this kinetics mechanism. It is typically
|
||||
|
|
@ -313,31 +305,6 @@ public:
|
|||
return *m_thermo[n];
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a reference to the nth ThermoPhase
|
||||
* defined in this kinetics mechanism.
|
||||
* It is typically used so that member functions of the
|
||||
* ThermoPhase may be called. @deprecated This method is redundant.
|
||||
*
|
||||
* @param n Index of the ThermoPhase being sought.
|
||||
*/
|
||||
DEPRECATED(thermo_t& phase(size_t n=0)) {
|
||||
deprecatedMethod("Kinetics","phase","thermo");
|
||||
return *m_thermo[n];
|
||||
}
|
||||
/**
|
||||
* This method returns a reference to the nth ThermoPhase
|
||||
* defined in this kinetics mechanism.
|
||||
* It is typically used so that member functions of the
|
||||
* ThermoPhase may be called. @deprecated This method is redundant.
|
||||
*
|
||||
* @param n Index of the ThermoPhase being sought.
|
||||
*/
|
||||
DEPRECATED(const thermo_t& phase(size_t n=0) const) {
|
||||
deprecatedMethod("Kinetics","phase","thermo");
|
||||
return *m_thermo[n];
|
||||
}
|
||||
|
||||
/**
|
||||
* The total number of species in all phases participating in
|
||||
* the kinetics mechanism. This is useful to dimension arrays
|
||||
|
|
|
|||
|
|
@ -125,75 +125,6 @@ protected:
|
|||
doublereal m_logA, m_b, m_E, m_A;
|
||||
};
|
||||
|
||||
//! @deprecated This class is not used.
|
||||
class ArrheniusSum
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
static int type() {
|
||||
return ARRHENIUS_SUM_REACTION_RATECOEFF_TYPE;
|
||||
}
|
||||
ArrheniusSum() : m_nterms(0) {}
|
||||
|
||||
void addArrheniusTerm(doublereal A, doublereal b, doublereal E) {
|
||||
if (A > 0.0) {
|
||||
m_terms.push_back(Arrhenius(A, b, E));
|
||||
m_sign.push_back(1);
|
||||
} else if (A < 0.0) {
|
||||
m_terms.push_back(Arrhenius(-A, b, E));
|
||||
m_sign.push_back(-1);
|
||||
}
|
||||
m_nterms++;
|
||||
}
|
||||
|
||||
void update_C(const doublereal* c) {}
|
||||
|
||||
/**
|
||||
* Update the value of the logarithm of the rate constant.
|
||||
*
|
||||
*/
|
||||
doublereal update(doublereal logT, doublereal recipT) const {
|
||||
int n;
|
||||
doublereal f, fsum = 0.0;
|
||||
for (n = 0; n < m_nterms; n++) {
|
||||
f = m_terms[n].updateRC(logT, recipT);
|
||||
fsum += m_sign[n]*f;
|
||||
}
|
||||
return log(fsum);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the value the rate constant.
|
||||
*
|
||||
* This function returns the actual value of the rate constant.
|
||||
* It can be safely called for negative values of the pre-exponential
|
||||
* factor.
|
||||
*/
|
||||
doublereal updateRC(doublereal logT, doublereal recipT) const {
|
||||
int n;
|
||||
doublereal f, fsum = 0.0;
|
||||
for (n = 0; n < m_nterms; n++) {
|
||||
f = m_terms[n].updateRC(logT, recipT);
|
||||
fsum += m_sign[n]*f;
|
||||
}
|
||||
return fsum;
|
||||
}
|
||||
|
||||
void writeUpdateRHS(std::ostream& s) const {
|
||||
;
|
||||
}
|
||||
|
||||
static bool alwaysComputeRate() {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected:
|
||||
std::vector<Arrhenius> m_terms;
|
||||
vector_int m_sign;
|
||||
int m_nterms;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* An Arrhenius rate with coverage-dependent terms.
|
||||
|
|
|
|||
|
|
@ -19,86 +19,6 @@
|
|||
|
||||
namespace Cantera
|
||||
{
|
||||
|
||||
//! Invokes the 'updateProperties' method of all objects in the list.
|
||||
/*!
|
||||
* This templated function has one template, InputIter. It should
|
||||
* point to a class such as one that inherits from the virtual
|
||||
* base class, SpeciesThermoInterpType, which has
|
||||
* an updateProperties(T, Cp_R, h_RT, s)R) function
|
||||
*
|
||||
* @param begin Beginning iterator
|
||||
* @param end end iterator
|
||||
* @param T Temperature (Kelvin)
|
||||
* @param cp_R Vector of Dimensionless heat capacities.
|
||||
* (length m_kk).
|
||||
* @param h_RT Vector of Dimensionless enthalpies.
|
||||
* (length m_kk).
|
||||
* @param s_R Vector of Dimensionless entropies.
|
||||
* (length m_kk).
|
||||
*
|
||||
* @ingroup mgrsrefcalc
|
||||
* @deprecated unused
|
||||
*/
|
||||
template<class InputIter>
|
||||
inline void _updateAll(InputIter begin,
|
||||
InputIter end,
|
||||
doublereal T,
|
||||
vector_fp& cp_R,
|
||||
vector_fp& h_RT,
|
||||
vector_fp& s_R)
|
||||
{
|
||||
for (; begin != end; ++begin) {
|
||||
begin->updateProperties(T, cp_R, h_RT, s_R);
|
||||
}
|
||||
}
|
||||
|
||||
//! Iterates through a list of objects which implement a method
|
||||
//! 'minTemp()', and returns the largest 'minTemp' value.
|
||||
/*!
|
||||
* This templated function has one template, InputIter. It should
|
||||
* point to a class such as one that inherits from either
|
||||
* SpeciesThermoInterpType or SpeciesThermo, which have a minTemp() function
|
||||
*
|
||||
* @param begin Beginning iterator
|
||||
* @param end end iterator
|
||||
*
|
||||
* @ingroup mgrsrefcalc
|
||||
* @deprecated unused
|
||||
*/
|
||||
template<class InputIter>
|
||||
doublereal _minTemp(InputIter begin, InputIter end)
|
||||
{
|
||||
doublereal _minT = 0.0;
|
||||
for (; begin != end; ++begin) {
|
||||
_minT = std::max(_minT, begin->minTemp());
|
||||
}
|
||||
return _minT;
|
||||
}
|
||||
|
||||
//! Iterates through a list of objects which implement a method
|
||||
//! 'maxTemp()', and returns the smallest 'maxTemp' value.
|
||||
/*!
|
||||
* This templated function has one template, InputIter. It should
|
||||
* point to a class such as one that inherits from either
|
||||
* SpeciesThermoInterpType or SpeciesThermo which have a minTemp() function
|
||||
*
|
||||
* @param begin Beginning iterator
|
||||
* @param end end iterator
|
||||
*
|
||||
* @ingroup mgrsrefcalc
|
||||
* @deprecated unused
|
||||
*/
|
||||
template<class _InputIter>
|
||||
doublereal _maxTemp(_InputIter begin, _InputIter end)
|
||||
{
|
||||
doublereal _maxT = 1.e10;
|
||||
for (; begin != end; ++begin) {
|
||||
_maxT = std::min(_maxT, begin->maxTemp());
|
||||
}
|
||||
return _maxT;
|
||||
}
|
||||
|
||||
/////////////////////// Exceptions //////////////////////////////
|
||||
|
||||
//! Exception thrown if species reference pressures don't match.
|
||||
|
|
|
|||
|
|
@ -1,70 +0,0 @@
|
|||
/**
|
||||
* @file VPSSMgr_types.h
|
||||
* Contains const definitions for types of calculation managers
|
||||
* that are responsible for calculating the species standard
|
||||
* state thermodynamic managers and
|
||||
* reference-state thermodynamics managers
|
||||
* (see
|
||||
* class \link Cantera::VPSSMgr VPSSMgr\endlink).
|
||||
*/
|
||||
/*
|
||||
* Copyright (2005) Sandia Corporation. Under the terms of
|
||||
* Contract DE-AC04-94AL85000 with Sandia Corporation, the
|
||||
* U.S. Government retains certain rights in this software.
|
||||
*/
|
||||
|
||||
//! @deprecated remove include when UnknownVPSSMgr is removed
|
||||
#include "cantera/base/stringUtils.h"
|
||||
|
||||
#ifndef VPSSMGR_TYPES_H
|
||||
#define VPSSMGR_TYPES_H
|
||||
|
||||
//! Variable pressures SS calculator for ideal gas phases
|
||||
#define VPSSMGR_IDEALGAS 1
|
||||
|
||||
//! Variable pressure SS calculate for phases consisting all
|
||||
//! species having a constant molar volume property
|
||||
/*!
|
||||
* This fits most solids
|
||||
*/
|
||||
#define VPSSMGR_CONSTVOL 2
|
||||
|
||||
//! Variable pressure SS calculate for phases consisting of real water
|
||||
//! as the first species and species having a constant molar volume property
|
||||
#define VPSSMGR_WATER_CONSTVOL 11
|
||||
|
||||
//! Variable pressure SS calculate for phases consisting of real water
|
||||
//! as the first species and species obeying the HKFT standard state
|
||||
#define VPSSMGR_WATER_HKFT 12
|
||||
|
||||
//! Variable pressure SS calculate for phases consisting of completing
|
||||
//! general representations
|
||||
#define VPSSMGR_GENERAL 22
|
||||
|
||||
namespace Cantera
|
||||
{
|
||||
|
||||
//! Error for unknown thermo parameterization
|
||||
class UnknownVPSSMgr : public CanteraError
|
||||
{
|
||||
public:
|
||||
//! Constructor
|
||||
/*!
|
||||
* @param func String function id
|
||||
* @param thermotype Integer specifying the thermo parameterization
|
||||
*
|
||||
* deprecated This class is unused
|
||||
*/
|
||||
DEPRECATED(UnknownVPSSMgr(std::string func, int thermotype)) {
|
||||
CanteraError(func, std::string("\n ### ERROR ### \n") +
|
||||
"Unknown species thermo parameterization ("
|
||||
+ int2str(thermotype) + ")\n\n");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
@ -127,14 +127,24 @@ enum PDSS_enumType {
|
|||
};
|
||||
|
||||
|
||||
//! enum for VPSSMgr types
|
||||
//! enum for VPSSMgr types that are responsible for calculating the species
|
||||
//! standard state and reference-state thermodynamic properties.
|
||||
enum VPSSMgr_enumType {
|
||||
cVPSSMGR_UNDEF = 1000,
|
||||
//! Variable pressures SS calculator for ideal gas phases
|
||||
cVPSSMGR_IDEALGAS,
|
||||
cVPSSMGR_CONSTVOL ,
|
||||
//! Variable pressure SS calculate for phases consisting all species having
|
||||
//! a constant molar volume property. This fits most solids.
|
||||
cVPSSMGR_CONSTVOL,
|
||||
cVPSSMGR_PUREFLUID,
|
||||
//! Variable pressure SS calculate for phases consisting of real water
|
||||
//! as the first species and species having a constant molar volume property
|
||||
cVPSSMGR_WATER_CONSTVOL,
|
||||
//! Variable pressure SS calculate for phases consisting of real water
|
||||
//! as the first species and species obeying the HKFT standard state
|
||||
cVPSSMGR_WATER_HKFT,
|
||||
//! Variable pressure SS calculate for phases consisting of completing
|
||||
//! general representations
|
||||
cVPSSMGR_GENERAL
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -90,26 +90,6 @@ struct UnknownThermoParam {
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
//! holds parameterization-dependent index information
|
||||
/*!
|
||||
* These are all integers.
|
||||
* @deprecated This struct is unused.
|
||||
*/
|
||||
struct ThermoIndexData {
|
||||
DEPRECATED(ThermoIndexData()) {}
|
||||
//! param
|
||||
int param;
|
||||
//! number of coefficients
|
||||
int nCoefficients;
|
||||
//! coefficient for Tmin
|
||||
int Tmin_coeff;
|
||||
//! coefficient for Tmax
|
||||
int Tmax_coeff;
|
||||
//! reference pressure coefficient
|
||||
int Pref_coeff;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -133,12 +133,6 @@ void Application::Messages::setLogger(Logger* _logwriter)
|
|||
logwriter = _logwriter;
|
||||
}
|
||||
|
||||
// Return an integer specifying the application environment.
|
||||
int Application::Messages::getUserEnv()
|
||||
{
|
||||
return logwriter->env() ;
|
||||
}
|
||||
|
||||
// Write an error message and terminate execution
|
||||
void Application::Messages::logerror(const std::string& msg)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -174,10 +174,6 @@ protected:
|
|||
*/
|
||||
void logerror(const std::string& msg) ;
|
||||
|
||||
//! Returns an integer specifying the application environment
|
||||
//! @deprecated
|
||||
DEPRECATED(int getUserEnv()) ;
|
||||
|
||||
//! Install a logger.
|
||||
/*!
|
||||
* Called by the language interfaces to install an appropriate logger.
|
||||
|
|
@ -549,12 +545,6 @@ public:
|
|||
pMessenger->logerror(msg);
|
||||
}
|
||||
|
||||
//! Returns an integer specifying the application environment.
|
||||
//! @deprecated
|
||||
DEPRECATED(int getUserEnv()) {
|
||||
return pMessenger->getUserEnv() ;
|
||||
}
|
||||
|
||||
//! Install a logger - Called by the language interfaces to install an
|
||||
//! appropriate logger.
|
||||
/*!
|
||||
|
|
|
|||
|
|
@ -39,46 +39,7 @@ static doublereal fpValue(std::string val)
|
|||
{
|
||||
return atof(stripws(val).c_str());
|
||||
}
|
||||
//====================================================================================================================
|
||||
// This function adds a child node with the name, "bool", with a value
|
||||
// consisting of a single bool
|
||||
/*
|
||||
* This function will add a child node to the current XML node, with the
|
||||
* name "bool". It will have a title attribute, and the body
|
||||
* of the XML node will be filled out with a single bool
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* Code snippet:
|
||||
* @verbatim
|
||||
const XML_Node &node;
|
||||
std::string titleString = "doSpecialOp";
|
||||
bool value = true;
|
||||
addBool(node, titleString, value);
|
||||
@endverbatim
|
||||
*
|
||||
* Creates the following the snippet in the XML file:
|
||||
* @verbatim
|
||||
<parentNode>
|
||||
<bool title="doSpecialOp" type="optional">
|
||||
true
|
||||
<\integer>
|
||||
<\parentNode>
|
||||
@endverbatim
|
||||
*
|
||||
* @param node reference to the XML_Node object of the parent XML element
|
||||
* @param titleString String name of the title attribute
|
||||
* @param value Value - single bool
|
||||
*
|
||||
* @todo I don't think this is used. Figure out what is used for writing bools,
|
||||
* and codify that.
|
||||
*/
|
||||
void addBool(Cantera::XML_Node& node, const std::string& title, const bool val)
|
||||
{
|
||||
std::string v = (val ? "true" : "false");
|
||||
XML_Node& f = node.addChild("bool", v);
|
||||
f.addAttribute("title", title);
|
||||
}
|
||||
|
||||
//====================================================================================================================
|
||||
// This function adds a child node with the name, "integer", with a value
|
||||
// consisting of a single integer
|
||||
|
|
@ -133,97 +94,7 @@ void addInteger(Cantera::XML_Node& node, const std::string& title, const int val
|
|||
f.addAttribute("units",units);
|
||||
}
|
||||
}
|
||||
//====================================================================================================================
|
||||
// This function adds a child node with the name, "intArray", with a value
|
||||
// consisting of a comma separated list of integers
|
||||
/*
|
||||
* This function will add a child node to the current XML node, with the
|
||||
* name "intArray". It will have a title attribute, and the body
|
||||
* of the XML node will be filled out with a comma separated list of
|
||||
* integers
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* @verbatim
|
||||
const XML_Node &node;
|
||||
std::string titleString = "additionalCases";
|
||||
int n = 3;
|
||||
int cases[3] = [3, 6, 10];
|
||||
std::string typeString = "optional";
|
||||
std::string units = "";
|
||||
addIntegerArray(node, titleString, n, &cases[0], typeString, units);
|
||||
@endverbatim
|
||||
*
|
||||
* Creates the following the snippet in the XML file:
|
||||
* @verbatim
|
||||
<parentNode>
|
||||
<intArray title="additionalCases" type="optional">
|
||||
3, 6, 10
|
||||
<\intArray>
|
||||
<\parentNode>
|
||||
@endverbatim
|
||||
*
|
||||
*
|
||||
* @param node reference to the XML_Node object of the parent XML element
|
||||
* @param titleString String name of the title attribute
|
||||
* @param n Length of the integer vector.
|
||||
* @param values Pointer to a vector of integers
|
||||
* @param unitsString String name of the Units attribute. This is an optional
|
||||
* parameter. The default is to
|
||||
* have an empty string.
|
||||
* @param typeString String type. This is an optional parameter. The default
|
||||
* is to have an empty string.
|
||||
* @param minval Minimum allowed value of the int. This is an optional
|
||||
* parameter. The default is the
|
||||
* special double, Cantera::Undef, which means to ignore the
|
||||
* entry.
|
||||
* @param maxval Maximum allowed value of the int. This is an optional
|
||||
* parameter. The default is the
|
||||
* special double, Cantera::Undef, which means to ignore the
|
||||
* entry.
|
||||
*
|
||||
* @todo I don't think this is used. Figure out what is used for writing integers,
|
||||
* and codify that. unitsString shouldn't be here, since it's an int.
|
||||
* typeString should be codified as to its usage.
|
||||
*/
|
||||
void addIntegerArray(Cantera::XML_Node& node, const std::string& title, const size_t n,
|
||||
const int* const vals, const std::string units, const std::string type,
|
||||
const doublereal minval, const doublereal maxval)
|
||||
{
|
||||
std::string v = "";
|
||||
for (size_t i = 0; i < n; i++) {
|
||||
v += int2str(vals[i],INT_Format);
|
||||
if (i == n-1) {
|
||||
v += "\n";
|
||||
} else if (i > 0 && (i+1) % 3 == 0) {
|
||||
v += ",\n";
|
||||
} else {
|
||||
v += ", ";
|
||||
}
|
||||
}
|
||||
#ifdef CTML_VERSION_1_4
|
||||
XML_Node& f = node.addChild("intArray",v);
|
||||
f.addAttribute("title",title);
|
||||
#else
|
||||
XML_Node& f = node.addChild(title, v);
|
||||
#endif
|
||||
if (type != "") {
|
||||
f.addAttribute("type",type);
|
||||
}
|
||||
f.addAttribute("size", static_cast<double>(n));
|
||||
#ifndef CTML_VERSION_1_4
|
||||
f.addAttribute("vtype", "intArray");
|
||||
#endif
|
||||
if (units != "") {
|
||||
f.addAttribute("units",units);
|
||||
}
|
||||
if (minval != Undef) {
|
||||
f.addAttribute("min",minval);
|
||||
}
|
||||
if (maxval != Undef) {
|
||||
f.addAttribute("max",maxval);
|
||||
}
|
||||
}
|
||||
|
||||
//====================================================================================================================
|
||||
// This function adds a child node with the name, "float", with a value
|
||||
// consisting of a single floating point number
|
||||
|
|
|
|||
|
|
@ -68,11 +68,6 @@ void error(const std::string& msg)
|
|||
app()->logerror(msg);
|
||||
}
|
||||
|
||||
int userInterface()
|
||||
{
|
||||
return app()->getUserEnv();
|
||||
}
|
||||
|
||||
// **************** HTML Logging ****************
|
||||
|
||||
#ifdef WITH_HTML_LOGS
|
||||
|
|
|
|||
|
|
@ -226,13 +226,7 @@ operator=(const InterfaceKinetics& right)
|
|||
|
||||
return *this;
|
||||
}
|
||||
//====================================================================================================================
|
||||
// Return the ID of the kinetics object
|
||||
int InterfaceKinetics::ID() const
|
||||
{
|
||||
return cInterfaceKinetics;
|
||||
}
|
||||
//====================================================================================================================
|
||||
|
||||
int InterfaceKinetics::type() const
|
||||
{
|
||||
return cInterfaceKinetics;
|
||||
|
|
|
|||
|
|
@ -122,12 +122,7 @@ Kinetics* Kinetics::duplMyselfAsKinetics(const std::vector<thermo_t*> & tpVector
|
|||
ko->assignShallowPointers(tpVector);
|
||||
return ko;
|
||||
}
|
||||
//====================================================================================================================
|
||||
int Kinetics::ID() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
//====================================================================================================================
|
||||
|
||||
int Kinetics::type() const
|
||||
{
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -24,8 +24,6 @@
|
|||
#include "cantera/thermo/VPSSMgr_Water_HKFT.h"
|
||||
#include "cantera/thermo/VPSSMgr_General.h"
|
||||
|
||||
#include "cantera/thermo/VPSSMgr_types.h"
|
||||
|
||||
#include "cantera/thermo/SpeciesThermoMgr.h"
|
||||
#include "cantera/thermo/speciesThermoTypes.h"
|
||||
#include "cantera/thermo/SpeciesThermo.h"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue