mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
[0D] Consolidate zeroD insert methods
This commit is contained in:
parent
8841f11c83
commit
c348fef4a9
@ -68,14 +68,16 @@ public:
|
||||
/**
|
||||
* Insert something into the reactor. The 'something' must belong to a class
|
||||
* that is a subclass of both ThermoPhase and Kinetics.
|
||||
* @deprecated Unused; to be removed after %Cantera 3.1.
|
||||
*/
|
||||
template<class G>
|
||||
void insert(G& contents) {
|
||||
warn_deprecated("Reactor::insert", "Unused; to be removed after Cantera 3.1.");
|
||||
setThermoMgr(contents);
|
||||
setKineticsMgr(contents);
|
||||
}
|
||||
|
||||
void insert(shared_ptr<Solution> sol);
|
||||
using ReactorBase::insert;
|
||||
|
||||
void setKineticsMgr(Kinetics& kin) override;
|
||||
|
||||
|
@ -89,6 +89,9 @@ public:
|
||||
m_vol = vol;
|
||||
}
|
||||
|
||||
//! @deprecated To be removed after %Cantera 3.1. Superseded by setSolution.
|
||||
void insert(shared_ptr<Solution> sol);
|
||||
|
||||
//! Specify the mixture contained in the reactor. Note that a pointer to
|
||||
//! this substance is stored, and as the integration proceeds, the state of
|
||||
//! the substance is modified.
|
||||
|
@ -26,13 +26,14 @@ public:
|
||||
|
||||
void initialize(double t0=0.0) override {}
|
||||
|
||||
//! @deprecated Unused; to be removed after %Cantera 3.1.
|
||||
void insert(ThermoPhase& contents) {
|
||||
warn_deprecated("Reservoir::insert",
|
||||
"Unused; to be removed after Cantera 3.1.");
|
||||
setThermoMgr(contents);
|
||||
}
|
||||
|
||||
void insert(shared_ptr<Solution> sol) {
|
||||
setThermoMgr(*sol->thermo());
|
||||
}
|
||||
using ReactorBase::insert;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -22,11 +22,6 @@ namespace bmt = boost::math::tools;
|
||||
namespace Cantera
|
||||
{
|
||||
|
||||
void Reactor::insert(shared_ptr<Solution> sol) {
|
||||
setThermoMgr(*sol->thermo());
|
||||
setKineticsMgr(*sol->kinetics());
|
||||
}
|
||||
|
||||
void Reactor::setDerivativeSettings(AnyMap& settings)
|
||||
{
|
||||
m_kin->setDerivativeSettings(settings);
|
||||
|
@ -34,6 +34,13 @@ void ReactorBase::setSolution(shared_ptr<Solution> sol) {
|
||||
}
|
||||
}
|
||||
|
||||
void ReactorBase::insert(shared_ptr<Solution> sol)
|
||||
{
|
||||
// warn_deprecated("ReactorBase::insert",
|
||||
// "To be removed after Cantera 3.1. Superseded by 'setSolution'.");
|
||||
setSolution(sol);
|
||||
}
|
||||
|
||||
void ReactorBase::setThermoMgr(ThermoPhase& thermo)
|
||||
{
|
||||
m_thermo = &thermo;
|
||||
|
Loading…
Reference in New Issue
Block a user