Skip to content

Commit be9e517

Browse files
committed
Don't change the default termination condition
1 parent 8fe131a commit be9e517

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/utils.jl

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,8 @@ function _get_tolerance(η, tc_η, ::Type{T}) where {T}
215215
return T(ifelse!== nothing, η, ifelse(tc_η !== nothing, tc_η, fallback_η)))
216216
end
217217

218-
function _init_termination_elements(abstol,
219-
reltol,
220-
termination_condition,
221-
::Type{T}; mode = NLSolveTerminationMode.NLSolveDefault) where {T}
218+
function _init_termination_elements(abstol, reltol, termination_condition,
219+
::Type{T}; mode = NLSolveTerminationMode.AbsNorm) where {T}
222220
if termination_condition !== nothing
223221
abstol !== nothing ?
224222
(abstol != termination_condition.abstol ?
@@ -234,9 +232,7 @@ function _init_termination_elements(abstol,
234232
else
235233
abstol = _get_tolerance(abstol, nothing, T)
236234
reltol = _get_tolerance(reltol, nothing, T)
237-
termination_condition = NLSolveTerminationCondition(mode;
238-
abstol,
239-
reltol)
235+
termination_condition = NLSolveTerminationCondition(mode; abstol, reltol)
240236
return abstol, reltol, termination_condition
241237
end
242238
end

0 commit comments

Comments
 (0)