[Cython] Add interface to new chemistry state methods

This commit is contained in:
Bryan W. Weber 2016-08-09 13:24:51 -04:00 committed by Bryan W. Weber
parent c344b4c0f8
commit 108b42361f
No known key found for this signature in database
GPG key ID: DEE60DAAA4195429
2 changed files with 14 additions and 0 deletions

View file

@ -474,6 +474,8 @@ cdef extern from "cantera/zeroD/Reactor.h":
cdef cppclass CxxReactor "Cantera::Reactor" (CxxReactorBase):
CxxReactor()
void setKineticsMgr(CxxKinetics&)
void setChemistry(cbool)
cbool chemistryEnabled()
void setEnergy(int)
cbool energyEnabled()
size_t componentIndex(string&)

View file

@ -201,6 +201,18 @@ cdef class Reactor(ReactorBase):
self.rbase.restoreState()
return self._kinetics
property chemistry_enabled:
"""
*True* when the reactor composition is allowed to change due to
chemical reactions in this reactor. When this is *False*, the
reactor composition is held constant.
"""
def __get__(self):
return self.reactor.chemistryEnabled()
def __set__(self, pybool value):
self.reactor.setChemistry(value)
property energy_enabled:
"""
*True* when the energy equation is being solved for this reactor.