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

Minor bugfix in tolerances #43

Merged
merged 1 commit into from
Oct 16, 2023
Merged
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
8 changes: 4 additions & 4 deletions src/SolverInterfaces/SolverTolerances.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function set_solver_tolerances!(a::SolverTolerances{T};
return a
end

function finished_flag(tols::SolverTolerances,niter,e_r,e_a)
function finished_flag(tols::SolverTolerances,niter,e_a,e_r)
if !finished(tols,niter,e_r,e_a)
@warn "finished_flag() called with unfinished solver!"
end
Expand All @@ -49,11 +49,11 @@ function finished_flag(tols::SolverTolerances,niter,e_r,e_a)
end
end

function finished(tols::SolverTolerances,niter,e_r,e_a)
return (niter >= tols.maxiter) || converged(tols,niter,e_r,e_a)
function finished(tols::SolverTolerances,niter,e_a,e_r)
return (niter >= tols.maxiter) || converged(tols,niter,e_a,e_r)
end

function converged(tols::SolverTolerances,niter,e_r,e_a)
function converged(tols::SolverTolerances,niter,e_a,e_r)
return (e_r < tols.rtol) || (e_a < tols.atol)
end

Expand Down
Loading