Deprecate class SpeciesThermoFactory
This commit is contained in:
parent
e390beacbe
commit
7d9a6eeefc
4 changed files with 11 additions and 42 deletions
|
|
@ -69,6 +69,7 @@ public:
|
||||||
* otherwise simply returns the pointer to the existing
|
* otherwise simply returns the pointer to the existing
|
||||||
* instance.
|
* instance.
|
||||||
*
|
*
|
||||||
|
* @deprecated To be removed after Cantera 2.2. Use class GeneralSpeciesThermo directly
|
||||||
* @ingroup thermoprops
|
* @ingroup thermoprops
|
||||||
*/
|
*/
|
||||||
class SpeciesThermoFactory : public FactoryBase
|
class SpeciesThermoFactory : public FactoryBase
|
||||||
|
|
@ -162,9 +163,8 @@ public:
|
||||||
* @param spthermo_ptr Species reference state thermo manager
|
* @param spthermo_ptr Species reference state thermo manager
|
||||||
* @param phaseNode_ptr Optional Pointer to the XML phase information for
|
* @param phaseNode_ptr Optional Pointer to the XML phase information for
|
||||||
* the phase in which the species resides
|
* the phase in which the species resides
|
||||||
* @deprecated To be removed after Cantera 2.2. Use the alternate form
|
* @deprecated To be removed after Cantera 2.2. Call
|
||||||
* which omits the unused arguments 'vpss_ptr' and
|
* VPStandardStateTP::createInstallVPSS directly instead.
|
||||||
* 'spthermo_ptr'.
|
|
||||||
*/
|
*/
|
||||||
void installVPThermoForSpecies(size_t k, const XML_Node& speciesNode,
|
void installVPThermoForSpecies(size_t k, const XML_Node& speciesNode,
|
||||||
VPStandardStateTP* vp_ptr,
|
VPStandardStateTP* vp_ptr,
|
||||||
|
|
@ -172,26 +172,6 @@ public:
|
||||||
SpeciesThermo* spthermo_ptr,
|
SpeciesThermo* spthermo_ptr,
|
||||||
const XML_Node* phaseNode_ptr) const;
|
const XML_Node* phaseNode_ptr) const;
|
||||||
|
|
||||||
//! Install a species thermodynamic property parameterization for the
|
|
||||||
//! standard state for one species into a species thermo manager, VPSSMgr
|
|
||||||
/*!
|
|
||||||
* This is a wrapper around the createInstallVPSS() function in the
|
|
||||||
* VPStandardStateTP object.
|
|
||||||
*
|
|
||||||
* This serves to install the species into vpss_ptr, create a PDSS file. We
|
|
||||||
* also read the xml database to extract the constants for these steps.
|
|
||||||
*
|
|
||||||
* @param k species number
|
|
||||||
* @param speciesNode Reference to the XML node specifying the species
|
|
||||||
* standard state information
|
|
||||||
* @param vp_ptr variable pressure ThermoPhase object
|
|
||||||
* @param phaseNode_ptr Optional Pointer to the XML phase information for
|
|
||||||
* the phase in which the species resides
|
|
||||||
*/
|
|
||||||
void installVPThermoForSpecies(size_t k, const XML_Node& speciesNode,
|
|
||||||
VPStandardStateTP* vp_ptr,
|
|
||||||
const XML_Node* phaseNode_ptr) const;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
//! Pointer to the sole instance of this class, which is static
|
//! Pointer to the sole instance of this class, which is static
|
||||||
|
|
|
||||||
|
|
@ -225,7 +225,8 @@ ThermoPhase* newPhase(const std::string& infile, std::string id="");
|
||||||
* @param spfactory species Thermo factory pointer, if
|
* @param spfactory species Thermo factory pointer, if
|
||||||
* available. If not available, one will be
|
* available. If not available, one will be
|
||||||
* created.
|
* created.
|
||||||
*
|
* @deprecated the 'spfactory' argument is unused and will be removed after
|
||||||
|
* Cantera 2.2.
|
||||||
* @ingroup thermoprops
|
* @ingroup thermoprops
|
||||||
*
|
*
|
||||||
* @deprecated: The return value of this function is always 'true'. After
|
* @deprecated: The return value of this function is always 'true'. After
|
||||||
|
|
@ -273,7 +274,8 @@ void installElements(Phase& th, const XML_Node& phaseNode);
|
||||||
* state thermo properties
|
* state thermo properties
|
||||||
* @param factory Pointer to the SpeciesThermoFactory .
|
* @param factory Pointer to the SpeciesThermoFactory .
|
||||||
* (defaults to 0)
|
* (defaults to 0)
|
||||||
*
|
* @deprecated The 'factory' argument is unused and will be removed after
|
||||||
|
* Cantera 2.2.
|
||||||
* @return
|
* @return
|
||||||
* Returns true if everything is ok, false otherwise.
|
* Returns true if everything is ok, false otherwise.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,8 @@ static void getSpeciesThermoTypes(std::vector<XML_Node*> & spDataNodeList,
|
||||||
|
|
||||||
SpeciesThermoFactory* SpeciesThermoFactory::factory()
|
SpeciesThermoFactory* SpeciesThermoFactory::factory()
|
||||||
{
|
{
|
||||||
|
warn_deprecated("class SpeciesThermoFactory",
|
||||||
|
"To be removed after Cantera 2.2.");
|
||||||
ScopedLock lock(species_thermo_mutex);
|
ScopedLock lock(species_thermo_mutex);
|
||||||
if (!s_factory) {
|
if (!s_factory) {
|
||||||
s_factory = new SpeciesThermoFactory;
|
s_factory = new SpeciesThermoFactory;
|
||||||
|
|
@ -615,8 +617,7 @@ void SpeciesThermoFactory::installVPThermoForSpecies(size_t k,
|
||||||
const XML_Node* phaseNode_ptr) const
|
const XML_Node* phaseNode_ptr) const
|
||||||
{
|
{
|
||||||
warn_deprecated("SpeciesThermoFactory::installVPThermoForSpecies",
|
warn_deprecated("SpeciesThermoFactory::installVPThermoForSpecies",
|
||||||
"Use alternate overload without unused VPSSMgr* and "
|
"Call VPStandardStateTP::createInstallPDSS directly.");
|
||||||
"SpeciesThermo* arguments.");
|
|
||||||
// Call the VPStandardStateTP object to install the pressure dependent species
|
// Call the VPStandardStateTP object to install the pressure dependent species
|
||||||
// standard state into the object.
|
// standard state into the object.
|
||||||
//
|
//
|
||||||
|
|
@ -628,15 +629,6 @@ void SpeciesThermoFactory::installVPThermoForSpecies(size_t k,
|
||||||
vp_ptr->createInstallPDSS(k, speciesNode, phaseNode_ptr);
|
vp_ptr->createInstallPDSS(k, speciesNode, phaseNode_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpeciesThermoFactory::installVPThermoForSpecies(size_t k,
|
|
||||||
const XML_Node& speciesNode, VPStandardStateTP* vp_ptr,
|
|
||||||
const XML_Node* phaseNode_ptr) const
|
|
||||||
{
|
|
||||||
// Call the VPStandardStateTP object to install the pressure dependent
|
|
||||||
// species standard state into the object.
|
|
||||||
vp_ptr->createInstallPDSS(k, speciesNode, phaseNode_ptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
SpeciesThermoInterpType* newSpeciesThermoInterpType(const XML_Node& speciesNode)
|
SpeciesThermoInterpType* newSpeciesThermoInterpType(const XML_Node& speciesNode)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -374,11 +374,6 @@ bool importPhase(XML_Node& phase, ThermoPhase* th,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if no species thermo factory was supplied, use the default one.
|
|
||||||
if (!spfactory) {
|
|
||||||
spfactory = SpeciesThermoFactory::factory();
|
|
||||||
}
|
|
||||||
|
|
||||||
/***************************************************************
|
/***************************************************************
|
||||||
* Add the elements.
|
* Add the elements.
|
||||||
***************************************************************/
|
***************************************************************/
|
||||||
|
|
@ -626,7 +621,7 @@ bool installSpecies(size_t k, const XML_Node& s, thermo_t& th,
|
||||||
if (vpss_ptr) {
|
if (vpss_ptr) {
|
||||||
th.addUniqueSpecies(s["name"], &ecomp[0], chrg, sz);
|
th.addUniqueSpecies(s["name"], &ecomp[0], chrg, sz);
|
||||||
VPStandardStateTP* vp_ptr = dynamic_cast<VPStandardStateTP*>(&th);
|
VPStandardStateTP* vp_ptr = dynamic_cast<VPStandardStateTP*>(&th);
|
||||||
factory->installVPThermoForSpecies(k, s, vp_ptr, phaseNode_ptr);
|
vp_ptr->createInstallPDSS(k, s, phaseNode_ptr);
|
||||||
} else {
|
} else {
|
||||||
SpeciesThermoInterpType* st = newSpeciesThermoInterpType(s);
|
SpeciesThermoInterpType* st = newSpeciesThermoInterpType(s);
|
||||||
th.addSpecies(Species(s["name"], comp_map, st, chrg, sz));
|
th.addSpecies(Species(s["name"], comp_map, st, chrg, sz));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue