[Python] Skip undeclared third bodies when adding Reactions

This needs to be the default behavior, since reactions can currently only be
added from the constructor.
This commit is contained in:
Ray Speth 2015-05-05 13:47:50 -04:00
parent 26c0c3f587
commit d8ed6135ea
2 changed files with 2 additions and 0 deletions

View file

@ -339,6 +339,7 @@ cdef extern from "cantera/kinetics/Kinetics.h" namespace "Cantera":
void addPhase(CxxThermoPhase&) except +
void init() except +
void skipUndeclaredThirdBodies(cbool)
void addReaction(shared_ptr[CxxReaction]) except +
void finalize() except +

View file

@ -99,6 +99,7 @@ cdef class _SolutionBase:
for phase in phases:
self.kinetics.addPhase(deref(phase.thermo))
self.kinetics.init()
self.kinetics.skipUndeclaredThirdBodies(True)
for reaction in reactions:
self.kinetics.addReaction(reaction._reaction)
self.kinetics.finalize()