Skip to content

Commit

Permalink
[Cython] Add interface to new chemistry state methods
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanwweber committed Aug 12, 2016
1 parent c344b4c commit 108b423
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions interfaces/cython/cantera/_cantera.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -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&)
Expand Down
12 changes: 12 additions & 0 deletions interfaces/cython/cantera/reactor.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 108b423

Please sign in to comment.