From 472dc3bfe4c4325ce169d37ea9efba8925c71b14 Mon Sep 17 00:00:00 2001 From: Julian Roth Date: Sun, 24 May 2020 20:04:02 +0200 Subject: [PATCH] Applied user constraints after prolongation and restriction --- source/multigrid/mg_transfer_prebuilt.cc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/source/multigrid/mg_transfer_prebuilt.cc b/source/multigrid/mg_transfer_prebuilt.cc index 654236c401..99130d4c94 100644 --- a/source/multigrid/mg_transfer_prebuilt.cc +++ b/source/multigrid/mg_transfer_prebuilt.cc @@ -85,15 +85,9 @@ MGTransferPrebuilt::prolongate(const unsigned int to_level, Assert((to_level >= 1) && (to_level <= prolongation_matrices.size()), ExcIndexRange(to_level, 1, prolongation_matrices.size() + 1)); -#ifdef DEBUG - if (this->mg_constrained_dofs != nullptr) - Assert(this->mg_constrained_dofs->get_user_constraint_matrix(to_level - 1) - .get_local_lines() - .size() == 0, - ExcNotImplemented()); -#endif - prolongation_matrices[to_level - 1]->vmult(dst, src); + this->mg_constrained_dofs->get_user_constraint_matrix(to_level).distribute( + dst); } @@ -109,6 +103,8 @@ 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); } -- 2.39.5