From cabe15e86c5d61dbbf09b805667d7e58a1c32301 Mon Sep 17 00:00:00 2001 From: Julian Roth Date: Fri, 5 Jun 2020 19:36:55 +0200 Subject: [PATCH] Only distributing user constraints before prolongation --- source/multigrid/mg_transfer_prebuilt.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/source/multigrid/mg_transfer_prebuilt.cc b/source/multigrid/mg_transfer_prebuilt.cc index 7295d243b1..80d8390171 100644 --- a/source/multigrid/mg_transfer_prebuilt.cc +++ b/source/multigrid/mg_transfer_prebuilt.cc @@ -85,10 +85,11 @@ MGTransferPrebuilt::prolongate(const unsigned int to_level, Assert((to_level >= 1) && (to_level <= prolongation_matrices.size()), ExcIndexRange(to_level, 1, prolongation_matrices.size() + 1)); - prolongation_matrices[to_level - 1]->vmult(dst, src); + VectorType copy_src(src); if (this->mg_constrained_dofs != nullptr) - this->mg_constrained_dofs->get_user_constraint_matrix(to_level).distribute( - dst); + this->mg_constrained_dofs->get_user_constraint_matrix(to_level - 1) + .distribute(copy_src); + prolongation_matrices[to_level - 1]->vmult(dst, copy_src); } @@ -104,9 +105,6 @@ MGTransferPrebuilt::restrict_and_add(const unsigned int from_level, (void)from_level; prolongation_matrices[from_level - 1]->Tvmult_add(dst, src); - if (this->mg_constrained_dofs != nullptr) - this->mg_constrained_dofs->get_user_constraint_matrix(from_level - 1) - .distribute(dst); } -- 2.39.5