mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
[equil] Add species lock
This commit is contained in:
parent
46913c88cc
commit
4d3025587f
@ -65,7 +65,7 @@ public:
|
||||
|
||||
//! Destructor. Does nothing. Class MultiPhase does not take "ownership"
|
||||
//! (that is, responsibility for destroying) the phase objects.
|
||||
virtual ~MultiPhase() = default;
|
||||
virtual ~MultiPhase();
|
||||
|
||||
//! Add a vector of phases to the mixture
|
||||
/*!
|
||||
|
@ -20,6 +20,13 @@ using namespace std;
|
||||
namespace Cantera
|
||||
{
|
||||
|
||||
MultiPhase::~MultiPhase()
|
||||
{
|
||||
for (size_t i = 0; i < m_phase.size(); i++) {
|
||||
m_phase[i]->removeSpeciesLock();
|
||||
}
|
||||
}
|
||||
|
||||
void MultiPhase::addPhases(MultiPhase& mix)
|
||||
{
|
||||
for (size_t n = 0; n < mix.nPhases(); n++) {
|
||||
@ -101,6 +108,9 @@ void MultiPhase::addPhase(ThermoPhase* p, double moles)
|
||||
m_Tmin = std::max(p->minTemp(), m_Tmin);
|
||||
m_Tmax = std::min(p->maxTemp(), m_Tmax);
|
||||
}
|
||||
|
||||
// lock species list
|
||||
p->addSpeciesLock();
|
||||
}
|
||||
|
||||
void MultiPhase::init()
|
||||
|
Loading…
Reference in New Issue
Block a user