]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Solver(F|MP)GMRES: make order of AdditionalData fields consistent 18290/head
authorMatthias Maier <tamiko@43-1.org>
Mon, 5 May 2025 21:11:48 +0000 (16:11 -0500)
committerMatthias Maier <tamiko@43-1.org>
Tue, 6 May 2025 00:19:04 +0000 (19:19 -0500)
include/deal.II/lac/solver_gmres.h

index 739dd330da92e68c41b0a8c7bfb6fb1324924dc7..1a9144719371f2cc3d70f6d9ed8bb6b782008192 100644 (file)
@@ -710,15 +710,15 @@ public:
     /**
      * Constructor. By default, set the maximum basis size to 30.
      */
-    explicit AdditionalData(const unsigned int max_basis_size         = 30,
-                            const bool use_truncated_mpgmres_strategy = true,
+    explicit AdditionalData(const unsigned int max_basis_size = 30,
                             const LinearAlgebra::OrthogonalizationStrategy
                               orthogonalization_strategy =
                                 LinearAlgebra::OrthogonalizationStrategy::
-                                  delayed_classical_gram_schmidt)
+                                  delayed_classical_gram_schmidt,
+                            const bool use_truncated_mpgmres_strategy = true)
       : max_basis_size(max_basis_size)
-      , use_truncated_mpgmres_strategy(use_truncated_mpgmres_strategy)
       , orthogonalization_strategy(orthogonalization_strategy)
+      , use_truncated_mpgmres_strategy(use_truncated_mpgmres_strategy)
     {}
 
     /**
@@ -726,6 +726,11 @@ public:
      */
     unsigned int max_basis_size;
 
+    /**
+     * Strategy to orthogonalize vectors.
+     */
+    LinearAlgebra::OrthogonalizationStrategy orthogonalization_strategy;
+
     /**
      * If set to true (the default) a "truncated" search space is
      * constructed consisting of the span of independent Krylov space
@@ -736,11 +741,6 @@ public:
      * for details.
      */
     bool use_truncated_mpgmres_strategy;
-
-    /**
-     * Strategy to orthogonalize vectors.
-     */
-    LinearAlgebra::OrthogonalizationStrategy orthogonalization_strategy;
   };
 
   /**
@@ -2363,8 +2363,8 @@ SolverFGMRES<VectorType>::SolverFGMRES(SolverControl            &cn,
       mem,
       typename SolverMPGMRES<VectorType>::AdditionalData{
         data.max_basis_size,
-        true,
-        data.orthogonalization_strategy})
+        data.orthogonalization_strategy,
+        true})
 {}
 
 
@@ -2377,8 +2377,8 @@ SolverFGMRES<VectorType>::SolverFGMRES(SolverControl        &cn,
       cn,
       typename SolverMPGMRES<VectorType>::AdditionalData{
         data.max_basis_size,
-        true,
-        data.orthogonalization_strategy})
+        data.orthogonalization_strategy,
+        true})
 {}
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.