mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
Rename Kinetics::addPhase to Kinetics::addThermo
This commit is contained in:
parent
4675ea029d
commit
0b0159a30d
@ -130,7 +130,7 @@ public:
|
||||
//! @name Reaction Mechanism Construction
|
||||
//! @{
|
||||
|
||||
//! Add a phase to the kinetics manager object.
|
||||
//! Add a thermo phase to the kinetics manager object.
|
||||
/*!
|
||||
* This must be done before the function init() is called or
|
||||
* before any reactions are input.
|
||||
@ -142,9 +142,9 @@ public:
|
||||
*
|
||||
* @param thermo Reference to the ThermoPhase to be added.
|
||||
*/
|
||||
virtual void addPhase(shared_ptr<ThermoPhase> thermo);
|
||||
virtual void addThermo(shared_ptr<ThermoPhase> thermo);
|
||||
|
||||
//! @see InterfaceKinetics::addPhase(shared_ptr<ThermoPhase>)
|
||||
//! @see InterfaceKinetics::addThermo(shared_ptr<ThermoPhase>)
|
||||
virtual void addPhase(ThermoPhase& thermo);
|
||||
|
||||
virtual void init();
|
||||
|
@ -1104,12 +1104,12 @@ public:
|
||||
* kinetics manager object as the value.
|
||||
*
|
||||
* @param thermo Reference to the ThermoPhase to be added.
|
||||
* @since Changed in Cantera 3.0. Replaces version using reference.
|
||||
* @since New in Cantera 3.0. Replaces addPhase.
|
||||
*/
|
||||
virtual void addPhase(shared_ptr<ThermoPhase> thermo);
|
||||
virtual void addThermo(shared_ptr<ThermoPhase> thermo);
|
||||
|
||||
//! @see Kinetics::addPhase(shared_ptr<ThermoPhase>)
|
||||
//! @deprecated To be removed after Cantera 3.0. Replaced by version using shared
|
||||
//! @see Kinetics::addThermo(shared_ptr<ThermoPhase>)
|
||||
//! @deprecated To be removed after Cantera 3.0. Replaced by addThermo
|
||||
//! pointer.
|
||||
virtual void addPhase(ThermoPhase& thermo);
|
||||
|
||||
|
@ -32,7 +32,7 @@ cdef extern from "cantera/kinetics/Kinetics.h" namespace "Cantera":
|
||||
|
||||
CxxThermoPhase& thermo(int)
|
||||
|
||||
void addPhase(shared_ptr[CxxThermoPhase]) except +translate_exception
|
||||
void addThermo(shared_ptr[CxxThermoPhase]) except +translate_exception
|
||||
void init() except +translate_exception
|
||||
void skipUndeclaredThirdBodies(cbool)
|
||||
void addReaction(shared_ptr[CxxReaction]) except +translate_exception
|
||||
|
@ -241,10 +241,10 @@ cdef class _SolutionBase:
|
||||
if isinstance(self, Kinetics):
|
||||
self.base.setKinetics(newKinetics(stringify(kinetics)))
|
||||
self.kinetics = self.base.kinetics().get()
|
||||
self.kinetics.addPhase(self.base.thermo())
|
||||
self.kinetics.addThermo(self.base.thermo())
|
||||
for phase in adjacent:
|
||||
# adjacent bulk phases for a surface phase
|
||||
self.kinetics.addPhase(phase.base.thermo())
|
||||
self.kinetics.addThermo(phase.base.thermo())
|
||||
self.kinetics.init()
|
||||
self.kinetics.skipUndeclaredThirdBodies(True)
|
||||
for reaction in reactions:
|
||||
|
@ -487,9 +487,9 @@ void InterfaceKinetics::setIOFlag(int ioFlag)
|
||||
}
|
||||
}
|
||||
|
||||
void InterfaceKinetics::addPhase(shared_ptr<ThermoPhase> thermo)
|
||||
void InterfaceKinetics::addThermo(shared_ptr<ThermoPhase> thermo)
|
||||
{
|
||||
Kinetics::addPhase(thermo);
|
||||
Kinetics::addThermo(thermo);
|
||||
m_phaseExists.push_back(true);
|
||||
m_phaseIsStable.push_back(true);
|
||||
}
|
||||
|
@ -571,7 +571,7 @@ Eigen::SparseMatrix<double> Kinetics::netProductionRates_ddX()
|
||||
return m_stoichMatrix * netRatesOfProgress_ddX();
|
||||
}
|
||||
|
||||
void Kinetics::addPhase(shared_ptr<ThermoPhase> thermo)
|
||||
void Kinetics::addThermo(shared_ptr<ThermoPhase> thermo)
|
||||
{
|
||||
// the phase with lowest dimensionality is assumed to be the
|
||||
// phase/interface at which reactions take place
|
||||
@ -593,7 +593,7 @@ void Kinetics::addPhase(shared_ptr<ThermoPhase> thermo)
|
||||
void Kinetics::addPhase(ThermoPhase& thermo)
|
||||
{
|
||||
warn_deprecated("Kinetics::addPhase",
|
||||
"To be removed after Cantera 3.0. Use version with shared pointer instead.");
|
||||
"To be removed after Cantera 3.0. Replaced by addThermo.");
|
||||
|
||||
// the phase with lowest dimensionality is assumed to be the
|
||||
// phase/interface at which reactions take place
|
||||
|
@ -89,7 +89,7 @@ shared_ptr<Kinetics> newKinetics(const vector<shared_ptr<ThermoPhase>>& phases,
|
||||
|
||||
shared_ptr<Kinetics> kin(KineticsFactory::factory()->newKinetics(kinType));
|
||||
for (auto& phase : phases) {
|
||||
kin->addPhase(phase);
|
||||
kin->addThermo(phase);
|
||||
}
|
||||
kin->init();
|
||||
addReactions(*kin, phaseNode, rootNode);
|
||||
|
@ -29,7 +29,7 @@ public:
|
||||
th.push_back(pp_ref);
|
||||
kin_ref = newKinetics(th, "../data/kineticsfromscratch.yaml", "ohmech");
|
||||
|
||||
kin.addPhase(pp);
|
||||
kin.addThermo(pp);
|
||||
kin.init();
|
||||
}
|
||||
|
||||
@ -520,8 +520,8 @@ public:
|
||||
, surf_ref(newThermo("sofc.yaml", "metal_surface"))
|
||||
{
|
||||
kin_ref = newKinetics({surf_ref, gas_ref}, "sofc.yaml", "metal_surface");
|
||||
kin.addPhase(surf);
|
||||
kin.addPhase(gas);
|
||||
kin.addThermo(surf);
|
||||
kin.addThermo(gas);
|
||||
}
|
||||
|
||||
shared_ptr<ThermoPhase> gas;
|
||||
@ -603,7 +603,7 @@ public:
|
||||
vector<shared_ptr<ThermoPhase>> th;
|
||||
th.push_back(pp_ref);
|
||||
kin_ref = newKinetics(th, "../data/kineticsfromscratch.yaml", "ohmech");
|
||||
kin.addPhase(p);
|
||||
kin.addThermo(p);
|
||||
|
||||
std::vector<shared_ptr<Species>> S = getSpecies(
|
||||
AnyMap::fromYamlFile("h2o2.yaml")["species"]);
|
||||
|
Loading…
Reference in New Issue
Block a user