From: Julian Roth Date: Fri, 5 Jun 2020 19:31:55 +0000 (+0200) Subject: Added check whether there actually are any user_constraints X-Git-Tag: v9.3.0-rc1~1476^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1b371d93a004e359c0b942071670cb3f5a9f6b0;p=dealii.git Added check whether there actually are any user_constraints --- diff --git a/source/multigrid/mg_transfer_prebuilt.cc b/source/multigrid/mg_transfer_prebuilt.cc index 80d8390171..c250fefb37 100644 --- a/source/multigrid/mg_transfer_prebuilt.cc +++ b/source/multigrid/mg_transfer_prebuilt.cc @@ -86,7 +86,10 @@ MGTransferPrebuilt::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);