Skip to content

Commit

Permalink
[Python/1D] Fix error in setting tolerances for specific components
Browse files Browse the repository at this point in the history
Keyword arguments other than 'default' and 'Y' could not previously be
specified.
  • Loading branch information
speth committed Mar 27, 2016
1 parent 9f3821d commit c799edf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions interfaces/cython/cantera/onedim.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ cdef class Domain1D:
self.domain.setBounds(n, Y[0], Y[1])

for name,(lower,upper) in kwargs.items():
self.domain.setBounds(self.component_name(name), lower, upper)
self.domain.setBounds(self.component_index(name), lower, upper)

def set_steady_tolerances(self, *, default=None, Y=None, **kwargs):
"""
Expand All @@ -84,7 +84,7 @@ cdef class Domain1D:
self.domain.setSteadyTolerances(Y[0], Y[1], n)

for name,(lower,upper) in kwargs.items():
self.domain.setSteadyTolerances(lower, upper, self.component_name(name))
self.domain.setSteadyTolerances(lower, upper, self.component_index(name))

def set_transient_tolerances(self, *, default=None, Y=None, **kwargs):
"""
Expand All @@ -104,7 +104,7 @@ cdef class Domain1D:
self.domain.setTransientTolerances(Y[0], Y[1], n)

for name,(lower,upper) in kwargs.items():
self.domain.setTransientTolerances(lower, upper, self.component_name(name))
self.domain.setTransientTolerances(lower, upper, self.component_index(name))

def bounds(self, component):
"""
Expand Down

0 comments on commit c799edf

Please sign in to comment.