Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't change the default termination condition #264

Merged
merged 3 commits into from
Oct 27, 2023
Merged
Changes from 1 commit
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
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
Loading