From a1b371d93a004e359c0b942071670cb3f5a9f6b0 Mon Sep 17 00:00:00 2001 From: Julian Roth Date: Fri, 5 Jun 2020 21:31:55 +0200 Subject: [PATCH] Added check whether there actually are any user_constraints --- source/multigrid/mg_transfer_prebuilt.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); -- 2.39.5