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
Cleanup of SolverGMRES and SolverFGMRES implementations #16745
Conversation
I am in favor 👍 |
dece2d4
to
d097676
Compare
I now added two changelog entries, one describing the incompatible choice for the size of the Arnoldi basis and one for the algorithmic change in the |
include/deal.II/lac/solver_gmres.h
Outdated
* temporary vectors, so this value must be greater than or equal to three. | ||
* Maximum number of temporary vectors. Together with #max_basis_size, | ||
* this parameter controls the size of the Arnoldi basis, which for | ||
* historical reasons is #max_n_tmp_vectors-2. SolverGMRES assumes that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The usage of #
is the first I see it. Do we need it? SolverGMRES
does not and still creates a link in Doxygen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied it from somewhere else in this file and then just went with it by routine; thinking about it I will remove it, thanks.
6e77bed
to
63bec6f
Compare
eda1de2
to
711125f
Compare
Any additional comments on this PR? I would like to finalize this one soon, because #16749 sits on top of this branch and things get messy if they diverge too much (there is already some tiny deviation). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I would maybe also be fine with removing max_n_tmp_vectors
already since we can't deprecate it properly anyway.
This PR does three major cleanup steps in the
SolverGMRES
andSolverFGMRES
implementation:SolverFGMRES
also use the Givens rotations for the orthogonalization, rather than the Householder transformation. (This changes a few tests to slightly lower iterations, I checked that the real residual is correct.) This is achieved by making the Givens rotation a free function.inner_iteration
as the name for the inner iteration, rather thandim
(mixed into it) orj
.SolverGMRES::AdditionalData
. We had a todo by Guido for a long time, and I think it is time to make this change now. This also helps the similarity between the classes. Note that this can affect tests, where I opted for changing the parameter where necessary.If this finds approval, I will write a changelog.