]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use better initial guess for Chebyshev eigenvalue estimate with BlockVector 11218/head
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Fri, 20 Nov 2020 17:03:09 +0000 (18:03 +0100)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Fri, 20 Nov 2020 17:03:14 +0000 (18:03 +0100)
include/deal.II/lac/precondition.h

index a67fe34381ec1640a8e5e0cc5426267f058fb858..68fce93ae879826a0425c9b4e57f86a8fa0a5df7 100644 (file)
@@ -47,6 +47,8 @@ namespace LinearAlgebra
   {
     template <typename, typename>
     class Vector;
+    template <typename>
+    class BlockVector;
   } // namespace distributed
 } // namespace LinearAlgebra
 #endif
@@ -2107,6 +2109,15 @@ namespace internal
       vector.add(-mean_value);
     }
 
+    template <typename Number>
+    void
+    set_initial_guess(
+      ::dealii::LinearAlgebra::distributed::BlockVector<Number> &vector)
+    {
+      for (unsigned int block = 0; block < vector.n_blocks(); ++block)
+        set_initial_guess(vector.block(block));
+    }
+
 
 #  ifdef DEAL_II_COMPILER_CUDA_AWARE
     template <typename Number>

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.