[Thermo] Deprecate get/setReferenceComposition and xMol_Ref
This commit is contained in:
parent
5926d2db7c
commit
a956f3904a
2 changed files with 9 additions and 1 deletions
|
|
@ -754,6 +754,7 @@ public:
|
|||
* @param x Mole fraction vector to set the reference composition to.
|
||||
* If this is zero, then the reference mole fraction
|
||||
* is set to the current mole fraction vector.
|
||||
* @deprecated Unused. To be removed after Cantera 2.3.
|
||||
*/
|
||||
virtual void setReferenceComposition(const doublereal* const x);
|
||||
|
||||
|
|
@ -761,6 +762,7 @@ public:
|
|||
/*!
|
||||
* The reference mole fraction is a safe mole fraction.
|
||||
* @param x Mole fraction vector containing the reference composition.
|
||||
* @deprecated Unused. To be removed after Cantera 2.3.
|
||||
*/
|
||||
virtual void getReferenceComposition(doublereal* const x) const;
|
||||
|
||||
|
|
@ -1643,6 +1645,7 @@ protected:
|
|||
* the object to. This contains such a vector.
|
||||
* The algorithm will pick up the mole fraction vector that is applied from
|
||||
* the state XML file in the input file
|
||||
* @deprecated To be removed after Cantera 2.3.
|
||||
*/
|
||||
vector_fp xMol_Ref;
|
||||
|
||||
|
|
|
|||
|
|
@ -658,11 +658,14 @@ void ThermoPhase::initThermoXML(XML_Node& phaseNode, const std::string& id)
|
|||
if (phaseNode.hasChild("state")) {
|
||||
setStateFromXML(phaseNode.child("state"));
|
||||
}
|
||||
setReferenceComposition(0);
|
||||
xMol_Ref.resize(m_kk);
|
||||
getMoleFractions(&xMol_Ref[0]);
|
||||
}
|
||||
|
||||
void ThermoPhase::setReferenceComposition(const doublereal* const x)
|
||||
{
|
||||
warn_deprecated("ThermoPhase::setReferenceComposition",
|
||||
"To be removed after Cantera 2.3.");
|
||||
xMol_Ref.resize(m_kk);
|
||||
if (x) {
|
||||
copy(x, x + m_kk, xMol_Ref.begin());
|
||||
|
|
@ -678,6 +681,8 @@ void ThermoPhase::setReferenceComposition(const doublereal* const x)
|
|||
|
||||
void ThermoPhase::getReferenceComposition(doublereal* const x) const
|
||||
{
|
||||
warn_deprecated("ThermoPhase::getReferenceComposition",
|
||||
"To be removed after Cantera 2.3.");
|
||||
copy(xMol_Ref.begin(), xMol_Ref.end(), x);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue