Skip to content

Commit

Permalink
Don't change the default termination condition
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Oct 26, 2023
1 parent 8fe131a commit be9e517
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,8 @@ function _get_tolerance(η, tc_η, ::Type{T}) where {T}
return T(ifelse!== nothing, η, ifelse(tc_η !== nothing, tc_η, fallback_η)))
end

function _init_termination_elements(abstol,
reltol,
termination_condition,
::Type{T}; mode = NLSolveTerminationMode.NLSolveDefault) where {T}
function _init_termination_elements(abstol, reltol, termination_condition,
::Type{T}; mode = NLSolveTerminationMode.AbsNorm) where {T}
if termination_condition !== nothing
abstol !== nothing ?
(abstol != termination_condition.abstol ?
Expand All @@ -234,9 +232,7 @@ function _init_termination_elements(abstol,
else
abstol = _get_tolerance(abstol, nothing, T)
reltol = _get_tolerance(reltol, nothing, T)
termination_condition = NLSolveTerminationCondition(mode;
abstol,
reltol)
termination_condition = NLSolveTerminationCondition(mode; abstol, reltol)
return abstol, reltol, termination_condition
end
end
Expand Down

0 comments on commit be9e517

Please sign in to comment.