]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Added check whether there actually are any user_constraints
authorJulian Roth <mathmerizing@gmail.com>
Fri, 5 Jun 2020 19:31:55 +0000 (21:31 +0200)
committerJulian Roth <mathmerizing@gmail.com>
Fri, 5 Jun 2020 19:31:55 +0000 (21:31 +0200)
source/multigrid/mg_transfer_prebuilt.cc

index 80d8390171dd46d4fd420273b6f0d88257ab4534..c250fefb37af97c0743c23f84415d0a3b792fee3 100644 (file)
@@ -86,7 +86,10 @@ MGTransferPrebuilt<VectorType>::prolongate(const unsigned int to_level,
          ExcIndexRange(to_level, 1, prolongation_matrices.size() + 1));
 
   VectorType copy_src(src);
-  if (this->mg_constrained_dofs != nullptr)
+  if (this->mg_constrained_dofs != nullptr &&
+      this->mg_constrained_dofs->get_user_constraint_matrix(to_level - 1)
+          .get_local_lines()
+          .size() > 0)
     this->mg_constrained_dofs->get_user_constraint_matrix(to_level - 1)
       .distribute(copy_src);
   prolongation_matrices[to_level - 1]->vmult(dst, copy_src);

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.