From 4b389babd77ec7b466bfef654badb1925f35ada0 Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Thu, 7 Oct 2021 14:39:39 +0200 Subject: [PATCH] Global coarsening: reset ghost state of internal vectors --- .../mg_transfer_global_coarsening.templates.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h b/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h index 71c38856ef..d0a9fa7164 100644 --- a/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h +++ b/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h @@ -2560,6 +2560,12 @@ MGTwoLevelTransfer>:: } } + // clean up related to update_ghost_values() + if (use_src_inplace == false) + vec_fine_ptr->set_ghost_state(false); // internal vector + else if (fine_element_is_continuous) + vec_fine_ptr->zero_out_ghost_values(); // external vector + this->vec_coarse.compress(VectorOperation::add); dst.copy_locally_owned_data_from(this->vec_coarse); @@ -2669,6 +2675,12 @@ MGTwoLevelTransfer>:: } } + // clean up related to update_ghost_values() + if (use_src_inplace == false) + vec_fine_ptr->set_ghost_state(false); // internal vector + else if (fine_element_is_continuous) + vec_fine_ptr->zero_out_ghost_values(); // external vector + dst.copy_locally_owned_data_from(this->vec_coarse); } -- 2.39.5