Absolute and relative tolerance for linear solvers#280
Merged
haampie merged 18 commits intoJuliaLinearAlgebra:masterfrom Dec 13, 2020
ranocha:hr/abstol_reltol
Merged
Absolute and relative tolerance for linear solvers#280haampie merged 18 commits intoJuliaLinearAlgebra:masterfrom ranocha:hr/abstol_reltol
haampie merged 18 commits intoJuliaLinearAlgebra:masterfrom
ranocha:hr/abstol_reltol
Conversation
This was referenced Dec 7, 2020
Closed
haampie
reviewed
Dec 8, 2020
…instead of RHS) as suggested by @haampie
…sidual instead of RHS)
Member
Author
|
I made all the changes to the iterative solvers for "simple" linear problems. Since the solvers for least-squares problems use a different setup of tolerances, I didn't adapt them. It would be nice to have another round of reviews to improve this PR 🙂 |
mschauer
reviewed
Dec 8, 2020
mschauer
reviewed
Dec 9, 2020
Member
|
Can one express the logic/stopping criteria with |
Member
Author
norm(x-y) <= max(atol, rtol*max(norm(x), norm(y)))Our stopping criterion is norm(residual) <= max(abstol, reltol * initial_residual_norm)Hence, I don't see a possibility to do that. |
Member
|
I see, thanks. |
Member
Author
|
@haampie Can we merge this? The decreased coverage is only caused by the new depwarns. |
Member
|
Hi @ranocha , I haven't had the chance to review yet. Tomorrow I can do that |
haampie
approved these changes
Dec 13, 2020
Member
|
Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds keyword arguments
abstolandreltolto iterative solvers for linear system and deprecates the former keywordtol(which is nowreltol).Since this is my first contribution to IterativeSolvers.jl, I would like to get some feedback on this work to improve this PR. Thanks!
If this approach is acceptable, I will continue to work on the other iterative solvers and adapt them accordingly.
By the way, I noticed that CG doesn't respect the stopping criterion described in the docs, see also #244. I think it would be good to fix this (as described in my comment in
cg.jl).Closes #207 by adding the keyword argument
abstol.Closes #244 by fixing the convergence criterion for CG (
reltolshould be relative to the initial residual instead of the RHSb).