]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make sure to clear a variable that gets set 14597/head
authorMartin Kronbichler <martin.kronbichler@uni-a.de>
Wed, 21 Dec 2022 11:06:12 +0000 (12:06 +0100)
committerMartin Kronbichler <martin.kronbichler@uni-a.de>
Tue, 28 Mar 2023 14:28:56 +0000 (16:28 +0200)
source/multigrid/mg_level_global_transfer.cc
source/multigrid/mg_transfer_matrix_free.cc

index f0c18c13579e127cbf3e972dc2d55244f401b250..65921693003c99ff7edd401649d2dcf18875a716 100644 (file)
@@ -387,14 +387,20 @@ MGLevelGlobalTransfer<LinearAlgebra::distributed::Vector<Number>>::clear()
 {
   sizes.resize(0);
   copy_indices.clear();
+  solution_copy_indices.clear();
   copy_indices_global_mine.clear();
+  solution_copy_indices_global_mine.clear();
   copy_indices_level_mine.clear();
+  solution_copy_indices_level_mine.clear();
   component_to_block_map.resize(0);
   mg_constrained_dofs = nullptr;
   ghosted_global_vector.reinit(0);
+  solution_ghosted_global_vector.reinit(0);
   ghosted_level_vector.resize(0, 0);
+  solution_ghosted_level_vector.resize(0, 0);
   perform_plain_copy            = false;
   perform_renumbered_plain_copy = false;
+  initialize_dof_vector         = nullptr;
 }
 
 
index a131d8846b39b2b5bee81c5055448411e8ff54ec..18599131802fbfdd540d69155a00e285dd36d5da 100644 (file)
@@ -109,10 +109,9 @@ MGTransferMatrixFree<dim, Number>::build(
            "probably close to where you already call distribute_dofs()."));
   if (external_partitioners.size() > 0)
     {
-      Assert(
-        this->initialize_dof_vector == nullptr,
-        ExcMessage(
-          "A initialize_dof_vector function has already been registered in the constructor!"));
+      Assert(this->initialize_dof_vector == nullptr,
+             ExcMessage("An initialize_dof_vector function has already "
+                        "been registered in the constructor!"));
 
       this->initialize_dof_vector =
         [external_partitioners](

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.