Skip to content

Commit a660fab

Browse files
authored
Use both sides of tspan when determining dtmin
SciML/OrdinaryDiffEq.jl#1762 but for SDEs.
1 parent b34540b commit a660fab

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/solve.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ function DiffEqBase.__init(
4949
delta=delta_default(alg),
5050
maxiters = adaptive ? 1000000 : typemax(Int),
5151
dtmax=eltype(concrete_prob(_prob).tspan)((concrete_prob(_prob).tspan[end]-concrete_prob(_prob).tspan[1])),
52-
dtmin = typeof(one(eltype(concrete_prob(_prob).tspan))) <: AbstractFloat ? eps(eltype(concrete_prob(_prob).tspan)) :
53-
typeof(one(eltype(concrete_prob(_prob).tspan))) <: Integer ? 0 :
54-
eltype(concrete_prob(_prob).tspan)(1//10^(10)),
52+
dtmin = DiffEqBase.prob2dtmin(prob),
5553
internalnorm = ODE_DEFAULT_NORM,
5654
isoutofdomain = ODE_DEFAULT_ISOUTOFDOMAIN,
5755
unstable_check = ODE_DEFAULT_UNSTABLE_CHECK,

0 commit comments

Comments
 (0)