[Cython/1D] Raise an error if the auto solver exceeds the max number of grid points

This commit is contained in:
Bryan W. Weber 2016-11-10 19:29:14 -05:00 committed by Bryan W. Weber
parent 0b9a741597
commit c91bdee2e2

View file

@ -838,6 +838,9 @@ cdef class Sim1D:
for N in nPoints:
for i,D in enumerate(flow_domains):
if N > self.get_max_grid_points(D):
raise CanteraError('Maximum number of grid points exceeded')
if N != len(D.grid):
D.grid = np.linspace(zmin[i], zmax[i], N)