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.
+precedence. Furthermore, the default algorithm has been changed from
+the modified Gram-Schmidt algorithm to the classical Gram-Schmidt algorithm.
+The latter uses unconditional reorthogonalization delayed by one step,
+following the algorithm described in @cite Bielich2022.
<br>
-(Martin Kronbichler, 2024/04/12)
+(Martin Kronbichler, 2024/03/12)
change might slightly affect iteration counts (often giving slightly better
results).
<br>
-(Martin Kronbichler, 2024/04/12)
+(Martin Kronbichler, 2024/03/12)
--- /dev/null
+New: SolverGMRES and SolverFGMRES can now use an additional orthogonalization
+strategy, controlled by
+LinearAlgebra::OrthogonalizationStrategy::delayed_classical_gram_schmidt. This
+implements the classical Gram-Schmidt method with delayed reorthogonalization,
+a low-synchronization algorithm (performing one global reduction per GMRES
+iteration for deal.II's own vectors) that has excellent stability properties.
+<br>
+(Martin Kronbichler, 2024/03/19)
* to the default residual, and re-orthogonalization only if
* necessary. Also, the batched mode with reduced functionality to track
* information is disabled by default. Finally, the default
- * orthogonalization algorithm is the modified Gram-Schmidt method.
+ * orthogonalization algorithm is the classical Gram-Schmidt method with
+ * delayed reorthogonalization, which combines stability with fast
+ * execution, especially in parallel.
*/
- explicit AdditionalData(
- const unsigned int max_basis_size = 30,
- const bool right_preconditioning = false,
- const bool use_default_residual = true,
- const bool force_re_orthogonalization = false,
- const bool batched_mode = false,
- const LinearAlgebra::OrthogonalizationStrategy
- orthogonalization_strategy =
- LinearAlgebra::OrthogonalizationStrategy::modified_gram_schmidt);
+ explicit AdditionalData(const unsigned int max_basis_size = 30,
+ const bool right_preconditioning = false,
+ const bool use_default_residual = true,
+ const bool force_re_orthogonalization = false,
+ const bool batched_mode = false,
+ const LinearAlgebra::OrthogonalizationStrategy
+ orthogonalization_strategy =
+ LinearAlgebra::OrthogonalizationStrategy::
+ delayed_classical_gram_schmidt);
/**
* Maximum number of temporary vectors. Together with max_basis_size, this
// tests that GMRES builds an orthonormal basis properly for a few difficult
// test matrices. In particular, this test monitors when re-orthogonalization
-// kicks in.
+// kicks in for the modified Gram-Schmidt algorithm.
#include <deal.II/lac/full_matrix.h>
#include <deal.II/lac/precondition.h>
SolverControl control(1000, 1e2 * std::numeric_limits<number>::epsilon());
typename SolverGMRES<Vector<number>>::AdditionalData data;
data.max_basis_size = 80;
+ data.orthogonalization_strategy =
+ LinearAlgebra::OrthogonalizationStrategy::modified_gram_schmidt;
SolverGMRES<Vector<number>> solver(control, data);
auto print_re_orthogonalization = [](int accumulated_iterations) {
SolverControl control(1000, 1e3 * std::numeric_limits<number>::epsilon());
typename SolverGMRES<Vector<number>>::AdditionalData data;
data.max_basis_size = 200;
+ data.orthogonalization_strategy =
+ LinearAlgebra::OrthogonalizationStrategy::modified_gram_schmidt;
SolverGMRES<Vector<number>> solver(control, data);
auto print_re_orthogonalization = [](int accumulated_iterations) {
typename SolverGMRES<Vector<number>>::AdditionalData data;
data.max_basis_size = 80;
data.force_re_orthogonalization = true;
+ data.orthogonalization_strategy =
+ LinearAlgebra::OrthogonalizationStrategy::modified_gram_schmidt;
SolverGMRES<Vector<number>> solver(control, data);
auto print_re_orthogonalization = [](int accumulated_iterations) {
SolverControl control(1000, 1e3 * std::numeric_limits<number>::epsilon());
typename SolverGMRES<Vector<number>>::AdditionalData data;
data.max_basis_size = 200;
+ data.orthogonalization_strategy =
+ LinearAlgebra::OrthogonalizationStrategy::modified_gram_schmidt;
SolverGMRES<Vector<number>> solver(control, data);
auto print_re_orthogonalization = [](int accumulated_iterations) {
typename SolverGMRES<Vector<number>>::AdditionalData data;
data.max_basis_size = 200;
data.force_re_orthogonalization = true;
+ data.orthogonalization_strategy =
+ LinearAlgebra::OrthogonalizationStrategy::modified_gram_schmidt;
SolverGMRES<Vector<number>> solver(control, data);
auto print_re_orthogonalization = [](int accumulated_iterations) {