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
|
||||
* instance.
|
||||
*
|
||||
* @deprecated To be removed after Cantera 2.2. Use class GeneralSpeciesThermo directly
|
||||
* @ingroup thermoprops
|
||||
*/
|
||||
class SpeciesThermoFactory : public FactoryBase
|
||||
|
|
@ -162,9 +163,8 @@ public:
|
|||
* @param spthermo_ptr Species reference state thermo manager
|
||||
* @param phaseNode_ptr Optional Pointer to the XML phase information for
|
||||
* the phase in which the species resides
|
||||
* @deprecated To be removed after Cantera 2.2. Use the alternate form
|
||||
* which omits the unused arguments 'vpss_ptr' and
|
||||
* 'spthermo_ptr'.
|
||||
* @deprecated To be removed after Cantera 2.2. Call
|
||||
* VPStandardStateTP::createInstallVPSS directly instead.
|
||||
*/
|
||||
void installVPThermoForSpecies(size_t k, const XML_Node& speciesNode,
|
||||
VPStandardStateTP* vp_ptr,
|
||||
|
|
@ -172,26 +172,6 @@ public:
|
|||
SpeciesThermo* spthermo_ptr,
|
||||
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:
|
||||
|
||||
//! 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
|
||||
* available. If not available, one will be
|
||||
* created.
|
||||
*
|
||||
* @deprecated the 'spfactory' argument is unused and will be removed after
|
||||
* Cantera 2.2.
|
||||
* @ingroup thermoprops
|
||||
*
|
||||
* @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
|
||||
* @param factory Pointer to the SpeciesThermoFactory .
|
||||
* (defaults to 0)
|
||||
*
|
||||
* @deprecated The 'factory' argument is unused and will be removed after
|
||||
* Cantera 2.2.
|
||||
* @return
|
||||
* Returns true if everything is ok, false otherwise.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -101,6 +101,8 @@ static void getSpeciesThermoTypes(std::vector<XML_Node*> & spDataNodeList,
|
|||
|
||||
SpeciesThermoFactory* SpeciesThermoFactory::factory()
|
||||
{
|
||||
warn_deprecated("class SpeciesThermoFactory",
|
||||
"To be removed after Cantera 2.2.");
|
||||
ScopedLock lock(species_thermo_mutex);
|
||||
if (!s_factory) {
|
||||
s_factory = new SpeciesThermoFactory;
|
||||
|
|
@ -615,8 +617,7 @@ void SpeciesThermoFactory::installVPThermoForSpecies(size_t k,
|
|||
const XML_Node* phaseNode_ptr) const
|
||||
{
|
||||
warn_deprecated("SpeciesThermoFactory::installVPThermoForSpecies",
|
||||
"Use alternate overload without unused VPSSMgr* and "
|
||||
"SpeciesThermo* arguments.");
|
||||
"Call VPStandardStateTP::createInstallPDSS directly.");
|
||||
// Call the VPStandardStateTP object to install the pressure dependent species
|
||||
// standard state into the object.
|
||||
//
|
||||
|
|
@ -628,15 +629,6 @@ void SpeciesThermoFactory::installVPThermoForSpecies(size_t k,
|
|||
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)
|
||||
{
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
***************************************************************/
|
||||
|
|
@ -626,7 +621,7 @@ bool installSpecies(size_t k, const XML_Node& s, thermo_t& th,
|
|||
if (vpss_ptr) {
|
||||
th.addUniqueSpecies(s["name"], &ecomp[0], chrg, sz);
|
||||
VPStandardStateTP* vp_ptr = dynamic_cast<VPStandardStateTP*>(&th);
|
||||
factory->installVPThermoForSpecies(k, s, vp_ptr, phaseNode_ptr);
|
||||
vp_ptr->createInstallPDSS(k, s, phaseNode_ptr);
|
||||
} else {
|
||||
SpeciesThermoInterpType* st = newSpeciesThermoInterpType(s);
|
||||
th.addSpecies(Species(s["name"], comp_map, st, chrg, sz));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue