Skip to content

Commit

Permalink
Merge pull request #43 from gridap/matrix-free
Browse files Browse the repository at this point in the history
Minor bugfix in tolerances
  • Loading branch information
JordiManyer authored Oct 16, 2023
2 parents 3093d2f + d10fe7e commit 9a47661
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit 9a47661

Please sign in to comment.