[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:
parent
26c0c3f587
commit
d8ed6135ea
2 changed files with 2 additions and 0 deletions
|
|
@ -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 +
|
||||
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue