From: Julian Roth Date: Mon, 25 May 2020 14:51:05 +0000 (+0200) Subject: Added nullptr check before applying user constraints to transfer matrices. X-Git-Tag: v9.3.0-rc1~1476^2~4 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b20c525754ab98f7225f31922033edfbb57c742;p=dealii.git Added nullptr check before applying user constraints to transfer matrices. --- diff --git a/doc/news/changes/minor/20200525Roth b/doc/news/changes/minor/20200525Roth new file mode 100644 index 0000000000..cfeef832e7 --- /dev/null +++ b/doc/news/changes/minor/20200525Roth @@ -0,0 +1,4 @@ +New: Applying user constraints +after prolongation and restriction in MGTransferPrebuilt. +
+(Julian Roth, 2020/05/25) diff --git a/source/multigrid/mg_transfer_prebuilt.cc b/source/multigrid/mg_transfer_prebuilt.cc index 99130d4c94..7295d243b1 100644 --- a/source/multigrid/mg_transfer_prebuilt.cc +++ b/source/multigrid/mg_transfer_prebuilt.cc @@ -86,8 +86,9 @@ MGTransferPrebuilt::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::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); }