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

Cleanup of SolverGMRES and SolverFGMRES implementations #16745

Merged
merged 3 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions doc/news/changes/incompatibilities/20240312Kronbichler
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Changed: SolverGMRES::AdditionalData now controls the size of the Arnoldi
basis through the new member variable
SolverGMRES::AdditionalData::max_basis_size, rather than the number of
temporary vectors (which is the basis size plus 2). As a result, the default
value of the basis size is now 30, compared to 28 used before. The old
variable SolverGMRES::AdditionalData::max_n_tmp_vectors is still available,
but whenever SolverGMRES::AdditionalData::max_basis_size is set to a non-zero
value (including the value set by the default constructor), the latter takes
precedence.
<br>
(Martin Kronbichler, 2024/04/12)
9 changes: 9 additions & 0 deletions doc/news/changes/minor/20240312Kronbichler
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Improved: The implementations of SolverGMRES and SolverFGMRES have been
overhauled and made more similar. In particular, SolverFGMRES now uses the
same internal algorithm to solve the minimization problem in the Arnoldi
basis, employing Givens rotations in analogy to the setting used by
SolverGMRES. Since the Arnoldi process is sensitive to roundoff errors, this
change might slightly affect iteration counts (often giving slightly better
results).
<br>
(Martin Kronbichler, 2024/04/12)
2 changes: 1 addition & 1 deletion examples/step-12/step-12.cc
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ namespace Step12
SolverControl solver_control(1000, 1e-6 * right_hand_side.l2_norm());

SolverGMRES<Vector<double>>::AdditionalData additional_data;
additional_data.max_n_tmp_vectors = 100;
additional_data.max_basis_size = 100;
SolverGMRES<Vector<double>> solver(solver_control, additional_data);

// Here we create the preconditioner,
Expand Down
2 changes: 1 addition & 1 deletion examples/step-22/doc/results.dox
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ $k=100$ temporary vectors:
1e-6*system_rhs.l2_norm());
GrowingVectorMemory<BlockVector<double> > vector_memory;
SolverGMRES<BlockVector<double> >::AdditionalData gmres_data;
gmres_data.max_n_tmp_vectors = 100;
gmres_data.max_basis_size = 100;

SolverGMRES<BlockVector<double> > gmres(solver_control, vector_memory,
gmres_data);
Expand Down