Skip to content

Commit

Permalink
Merge pull request #16745 from kronbichler/gmres_cleanup
Browse files Browse the repository at this point in the history
Cleanup of SolverGMRES and SolverFGMRES implementations
  • Loading branch information
kronbichler committed Mar 15, 2024
2 parents b87bbed + 711125f commit 3ccc91f
Show file tree
Hide file tree
Showing 28 changed files with 432 additions and 413 deletions.
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

0 comments on commit 3ccc91f

Please sign in to comment.