Skip to content

Commit 428ab42

Browse files
Fix incorrect stalledsuccess
1 parent fb17614 commit 428ab42

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

lib/NonlinearSolveBase/src/termination_conditions.jl

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,8 @@ function (cache::NonlinearTerminationModeCache)(
199199
min_obj, max_obj = extrema(cache.objectives_trace)
200200
end
201201
if min_obj < mode.min_max_factor * max_obj
202-
if cache.leastsq
203-
# If least squares, found a local minima thus success
204-
cache.retcode = ReturnCode.StalledSuccess
205-
else
206-
# Not a success if f(x)>0 and residual too high
207-
cache.retcode = ReturnCode.Stalled
208-
end
202+
# Not a success if f(x)>0 and residual too high
203+
cache.retcode = ReturnCode.Stalled
209204
return true
210205
end
211206
end

0 commit comments

Comments
 (0)