From d10fe7eb273890448d9cb6fd6bbb68737358e063 Mon Sep 17 00:00:00 2001 From: JordiManyer Date: Tue, 17 Oct 2023 00:23:18 +1100 Subject: [PATCH] Minor bugfix in tolerances --- src/SolverInterfaces/SolverTolerances.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/SolverInterfaces/SolverTolerances.jl b/src/SolverInterfaces/SolverTolerances.jl index 4e6a4a99..a5d790c6 100644 --- a/src/SolverInterfaces/SolverTolerances.jl +++ b/src/SolverInterfaces/SolverTolerances.jl @@ -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 @@ -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