Skip to content

Commit 7eefc04

Browse files
oscarddssmithoscardssmith
authored andcommitted
Don't use prev_theta for non-adaptive solves
1 parent 6ece080 commit 7eefc04

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/nlsolve/nlsolve.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ function nlsolve!(nlsolver::NL, integrator::DiffEqBase.DEIntegrator,
8888
break
8989
end
9090
else
91-
if has_prev_θ && !integrator.accept_step
91+
# don't use prev_θ for non-adaptive because we own't know if it actually converged
92+
if !integrator.opts.adaptive || !integrator.accept_step
9293
prev_θ = one(prev_θ)
9394
end
9495
θ = prev_θ

0 commit comments

Comments
 (0)