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

Add documentation for all keyword arguments #682

Merged
merged 8 commits into from
Nov 25, 2022
Merged

Add documentation for all keyword arguments #682

merged 8 commits into from
Nov 25, 2022

Conversation

amontoison
Copy link
Member

src/fgmres.jl Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Nov 14, 2022

Codecov Report

Base: 98.24% // Head: 98.24% // No change to project coverage 👍

Coverage data is based on head (7872bbc) compared to base (2ff1489).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #682   +/-   ##
=======================================
  Coverage   98.24%   98.24%           
=======================================
  Files          37       37           
  Lines        6599     6599           
=======================================
  Hits         6483     6483           
  Misses        116      116           
Impacted Files Coverage Δ
src/bilqr.jl 100.00% <ø> (ø)
src/cgs.jl 100.00% <ø> (ø)
src/gpmr.jl 100.00% <ø> (ø)
src/lnlq.jl 99.51% <ø> (ø)
src/qmr.jl 100.00% <ø> (ø)
src/trilqr.jl 100.00% <ø> (ø)
src/usymlq.jl 100.00% <ø> (ø)
src/usymqr.jl 100.00% <ø> (ø)
src/bicgstab.jl 100.00% <100.00%> (ø)
src/bilq.jl 100.00% <100.00%> (ø)
... and 23 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 14, 2022

Package name latest stable
CaNNOLeS.jl
DCISolver.jl
FletcherPenaltySolver.jl
JSOSolvers.jl
LLSModels.jl
Percival.jl
RipQP.jl

src/minres.jl Outdated
resid_decrease_lim = (rNorm ≤ rNormtol)
# We must check that these stopping conditions work with preconditioners
# before we reuse them as stopping conditions.
# solved_lim = (test2 ≤ ε)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, why is this removed? ratol and rrtol were added to be able to deactivate these criteria by setting atol and rtol to zero.

Copy link
Member Author

@amontoison amontoison Nov 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some clarifications about my Julia comment:

  • I highly suspect that these stopping conditions are wrong when a preconditioner is provided;
  • I need to verify that test1 and test2 are associated to backward errors and add the same tolerances as in LS/LN solvers (btol / axtol);
  • MINRES is the only solver for square systems that uses these stopping conditions and the default tolerances must be tunned a little bit;
  • the 32 other solvers use atol and rtol for stopping conditions based on the residual norm.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I plan to add all stopping conditions in the documentation in the future and check one by one all these undocumented tests.

Copy link
Member

@geoffroyleconte geoffroyleconte Nov 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think @dpo wanted that I keep these criteria in #279, even though the other solvers are based on the residual norm.
If this is OK for him then you can do it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I highly suspect that these stopping conditions are wrong when a preconditioner is provided;

Why would they be wrong? β₁ is the norm of the preconditioned residual. Those stopping tests are very useful when we know the system is consistent.

Copy link
Member Author

@amontoison amontoison Nov 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test1 = rNorm / (ANorm * xNorm)
test2 = root / ANorm
  • test1: rNorm and ANorm are estimates based on the preconditioned linear systems whereas xNorm is always an estimate of the solution of the initial linear system Ax = b. We compute xNorm with xNorm = @knrm2(n, x).
  • test2: I think that we forgot to multiply by ϕbar such that ϕbar * root / ANorm represents ‖Aᴴrₖ₋₁‖ / ‖A‖_F, but test2 could be also related to the backward error and I just don't understand the stopping condition.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll have to look into that. Please open an issue but don't remove stopping tests.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it ok to comment them the time that we find a fix?
It could do more harm than good to keep them broken.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not comment them out because we use them all the time (without a preconditioner). But let's look for a fix.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, It means that test2 is correct without a preconditioner? Can you explain what it represents?
I will rename these variables if I can, you're the only one that can understand them.

We could also use what I suggested more than one year ago: #279 (comment) for test1.

I will check the Matlab code of Mike before our next meeting to see how he handles the preconditioner case.

@amontoison amontoison changed the title Add documentation for all Keyword arguments Add documentation for all keyword arguments Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants