Skip to content

Commit

Permalink
Merge pull request #2527 from SciML/linsolvefail
Browse files Browse the repository at this point in the history
Do not allow for accepting steps with internal newton with linsolve fail
  • Loading branch information
ChrisRackauckas authored Nov 15, 2024
2 parents 6ec790a + fd62717 commit 26a5ad6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/OrdinaryDiffEqNonlinearSolve/src/newton.jl
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,10 @@ end
reltol = reltol)
end

if !SciMLBase.successful_retcode(linres.retcode) && linres.retcode != SciMLBase.ReturnCode.Default
return convert(eltype(atmp,),Inf)
end

cache.linsolve = linres.cache

if DiffEqBase.has_stats(integrator)
Expand Down

0 comments on commit 26a5ad6

Please sign in to comment.