]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Applied user constraints after prolongation and restriction
authorJulian Roth <mathmerizing@gmail.com>
Sun, 24 May 2020 18:04:02 +0000 (20:04 +0200)
committerJulian Roth <mathmerizing@gmail.com>
Sun, 24 May 2020 21:58:37 +0000 (23:58 +0200)
source/multigrid/mg_transfer_prebuilt.cc

index 654236c4013c2c3b5996d15173f3dcd00bf5be49..99130d4c94ffa09f918b6cd4eae1f6fc6e001c91 100644 (file)
@@ -85,15 +85,9 @@ MGTransferPrebuilt<VectorType>::prolongate(const unsigned int to_level,
   Assert((to_level >= 1) && (to_level <= prolongation_matrices.size()),
          ExcIndexRange(to_level, 1, prolongation_matrices.size() + 1));
 
-#ifdef DEBUG
-  if (this->mg_constrained_dofs != nullptr)
-    Assert(this->mg_constrained_dofs->get_user_constraint_matrix(to_level - 1)
-               .get_local_lines()
-               .size() == 0,
-           ExcNotImplemented());
-#endif
-
   prolongation_matrices[to_level - 1]->vmult(dst, src);
+  this->mg_constrained_dofs->get_user_constraint_matrix(to_level).distribute(
+    dst);
 }
 
 
@@ -109,6 +103,8 @@ MGTransferPrebuilt<VectorType>::restrict_and_add(const unsigned int from_level,
   (void)from_level;
 
   prolongation_matrices[from_level - 1]->Tvmult_add(dst, src);
+  this->mg_constrained_dofs->get_user_constraint_matrix(from_level - 1)
+    .distribute(dst);
 }
 
 

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.