File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -673,6 +673,10 @@ def make_stepper(
673673 # create stepper with fixed steps
674674 return super ().make_stepper (state , dt )
675675
676+ if getattr (self .pde , "is_sde" , False ):
677+ # adaptive steppers cannot deal with stochastic PDEs
678+ raise RuntimeError ("Cannot use adaptive stepper with stochastic equation" )
679+
676680 # Support `None` as a default value, so the controller can signal that
677681 # the solver should use a default time step.
678682 if dt is None :
Original file line number Diff line number Diff line change @@ -386,9 +386,6 @@ def _make_adaptive_stepper(
386386 An example for the state from which the grid and other information can
387387 be extracted
388388 """
389- if self .pde .is_sde :
390- raise RuntimeError ("Cannot use adaptive stepper with stochastic equation" )
391-
392389 self .info ["scheme" ] = self .scheme
393390 if self .scheme == "euler" :
394391 return self ._make_adaptive_euler_stepper (state )
You can’t perform that action at this time.
0 commit comments