Skip to content

Commit

Permalink
undo ReturnCode changes => treat in another issue
Browse files Browse the repository at this point in the history
  • Loading branch information
FHoltorf committed Nov 22, 2023
1 parent 0cc84ab commit 8fba768
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/SimpleNonlinearSolve/src/trustRegion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,15 @@ function SciMLBase.__solve(prob::NonlinearProblem,
shrink_counter += 1
if shrink_counter > max_shrink_times
return SciMLBase.build_solution(prob, alg, x, F;
retcode = ReturnCode.ConvergenceFailure)
retcode = ReturnCode.Success)
end
else
shrink_counter = 0
end
if r > η₁
if isapprox(xₖ₊₁, x, atol = atol, rtol = rtol)
return SciMLBase.build_solution(prob, alg, xₖ₊₁, Fₖ₊₁;
retcode = ReturnCode.ConvergenceFailure)
retcode = ReturnCode.Success)
end
# Take the step.
x = xₖ₊₁
Expand Down

0 comments on commit 8fba768

Please sign in to comment.