]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Added nullptr check before applying user constraints to transfer matrices.
authorJulian Roth <mathmerizing@gmail.com>
Mon, 25 May 2020 14:51:05 +0000 (16:51 +0200)
committerJulian Roth <mathmerizing@gmail.com>
Mon, 25 May 2020 14:51:05 +0000 (16:51 +0200)
doc/news/changes/minor/20200525Roth [new file with mode: 0644]
source/multigrid/mg_transfer_prebuilt.cc

diff --git a/doc/news/changes/minor/20200525Roth b/doc/news/changes/minor/20200525Roth
new file mode 100644 (file)
index 0000000..cfeef83
--- /dev/null
@@ -0,0 +1,4 @@
+New: Applying user constraints 
+after prolongation and restriction in MGTransferPrebuilt.
+<br>
+(Julian Roth, 2020/05/25)
index 99130d4c94ffa09f918b6cd4eae1f6fc6e001c91..7295d243b1161d2d3d1a4622472cff23a9ffb0db 100644 (file)
@@ -86,8 +86,9 @@ MGTransferPrebuilt<VectorType>::prolongate(const unsigned int to_level,
          ExcIndexRange(to_level, 1, prolongation_matrices.size() + 1));
 
   prolongation_matrices[to_level - 1]->vmult(dst, src);
-  this->mg_constrained_dofs->get_user_constraint_matrix(to_level).distribute(
-    dst);
+  if (this->mg_constrained_dofs != nullptr)
+    this->mg_constrained_dofs->get_user_constraint_matrix(to_level).distribute(
+      dst);
 }
 
 
@@ -103,8 +104,9 @@ 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);
+  if (this->mg_constrained_dofs != nullptr)
+    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.