Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

Commit f4e393e

Browse files
committed
Incorrect RetCode upon termination due to stalling of iterates or repeated shrinking of TR
1 parent 5a3f00a commit f4e393e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/trustRegion.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,15 @@ function SciMLBase.__solve(prob::NonlinearProblem,
155155
shrink_counter += 1
156156
if shrink_counter > max_shrink_times
157157
return SciMLBase.build_solution(prob, alg, x, F;
158-
retcode = ReturnCode.Success)
158+
retcode = ReturnCode.ConvergenceFailure)
159159
end
160160
else
161161
shrink_counter = 0
162162
end
163163
if r > η₁
164164
if isapprox(xₖ₊₁, x, atol = atol, rtol = rtol)
165165
return SciMLBase.build_solution(prob, alg, xₖ₊₁, Fₖ₊₁;
166-
retcode = ReturnCode.Success)
166+
retcode = ReturnCode.ConvergenceFailure)
167167
end
168168
# Take the step.
169169
x = xₖ₊₁

0 commit comments

Comments
 (0)