Skip to content

Commit

Permalink
[Cython/1D] Raise an error if the auto solver exceeds the max number …
Browse files Browse the repository at this point in the history
…of grid points
  • Loading branch information
bryanwweber committed Nov 11, 2016
1 parent 0b9a741 commit c91bdee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions interfaces/cython/cantera/onedim.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit c91bdee

Please sign in to comment.