[Cython] Added set_grid_min method to Sim1D

This commit is contained in:
Ray Speth 2013-02-07 23:40:18 +00:00
parent 40a737539a
commit 655af462b0
2 changed files with 12 additions and 0 deletions

View file

@ -448,6 +448,7 @@ cdef extern from "cantera/oneD/Sim1D.h":
void setTimeStepFactor(double)
void setMinTimeStep(double)
void setMaxTimeStep(double)
void setGridMin(int, double) except +
void setFixedTemperature(double)

View file

@ -669,6 +669,17 @@ cdef class Sim1D:
idom = self.domain_index(domain)
self.sim.setRefineCriteria(idom, ratio, slope, curve, prune)
def set_grid_min(self, dz, domain=None):
"""
Set the minimum grid spacing on *domain*. If *domain* is None, then
set the grid spacing for all domains.
"""
if domain is None:
idom = -1
else:
idom = self.domain_index(domain)
self.sim.setGridMin(idom, dz)
def set_max_jac_age(self, ss_age, ts_age):
"""
Set the maximum number of times the Jacobian will be used before it