Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions lib/NonlinearSolveBase/src/termination_conditions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,8 @@ function (cache::NonlinearTerminationModeCache)(
min_obj, max_obj = extrema(cache.objectives_trace)
end
if min_obj < mode.min_max_factor * max_obj
if cache.leastsq
# If least squares, found a local minima thus success
cache.retcode = ReturnCode.StalledSuccess
else
# Not a success if f(x)>0 and residual too high
cache.retcode = ReturnCode.Stalled
end
# Not a success if f(x)>0 and residual too high
cache.retcode = ReturnCode.Stalled
return true
end
end
Expand Down
Loading