Skip to content

Commit 8d4fdb3

Browse files
Merge pull request #466 from SciML/eest_smoother
Fix eest smoother
2 parents 4034721 + 0aec9b0 commit 8d4fdb3

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

src/perform_step/kencarp.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ end
208208

209209
z₂ = OrdinaryDiffEq.nlsolve!(nlsolver, integrator, cache, repeat_step)
210210
OrdinaryDiffEq.nlsolvefail(nlsolver) && return
211+
OrdinaryDiffEq.isnewton(nlsolver) && OrdinaryDiffEq.set_new_W!(nlsolver, false)
211212

212213
################################## Solve Step 3
213214

@@ -292,7 +293,7 @@ end
292293
if alg.smooth_est # From Shampine
293294
linres = OrdinaryDiffEq.dolinsolve(integrator, nlsolver.cache.linsolve;
294295
b = OrdinaryDiffEq._vec(g1),
295-
u = OrdinaryDiffEq._vec(E₁))
296+
linu = OrdinaryDiffEq._vec(E₁))
296297
else
297298
E₁ .= dz
298299
end

test/adaptive/sde_linearadaptive_tests.jl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,19 @@ for i in 1:2
9292
err24 = sol4.errors[:final]
9393
@test isapprox(err4,err24;atol=1e-4)
9494
end
95+
96+
# https://github.com/SciML/StochasticDiffEq.jl/issues/463
97+
98+
σ = 0.05
99+
function f(du, u, p, t)
100+
@. du = -u
101+
end
102+
103+
function g(du, u, p, t)
104+
@. du = σ
105+
end
106+
107+
u0 = [1.0, 1.0]
108+
prob = SDEProblem(f, g, u0, (0.0, 10.0))
109+
110+
sol = solve(prob, SKenCarp())

0 commit comments

Comments
 (0)