From: Peter Munch Date: Mon, 14 Mar 2022 20:24:30 +0000 (+0100) Subject: Add asserts to MGTwoLevelTransfer X-Git-Tag: v9.4.0-rc1~369^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a451c19d5928f8dab96779f1d1a72f1f318b6a03;p=dealii.git Add asserts to MGTwoLevelTransfer --- 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 41fb457810..eb4e0e98e7 100644 --- a/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h +++ b/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h @@ -2467,9 +2467,13 @@ MGTwoLevelTransfer>:: const bool use_dst_inplace = this->vec_fine.size() == 0; const auto vec_fine_ptr = use_dst_inplace ? &dst : &this->vec_fine; + Assert(vec_fine_ptr->get_partitioner().get() == partitioner_fine.get(), + ExcInternalError()); const bool use_src_inplace = this->vec_coarse.size() == 0; const auto vec_coarse_ptr = use_src_inplace ? &src : &this->vec_coarse; + Assert(vec_coarse_ptr->get_partitioner().get() == partitioner_coarse.get(), + ExcInternalError()); if (use_src_inplace == false) vec_coarse.copy_locally_owned_data_from(src); @@ -2611,9 +2615,13 @@ MGTwoLevelTransfer>:: const bool use_src_inplace = this->vec_fine.size() == 0; const auto vec_fine_ptr = use_src_inplace ? &src : &this->vec_fine; + Assert(vec_fine_ptr->get_partitioner().get() == partitioner_fine.get(), + ExcInternalError()); const bool use_dst_inplace = this->vec_coarse.size() == 0; const auto vec_coarse_ptr = use_dst_inplace ? &dst : &this->vec_coarse; + Assert(vec_coarse_ptr->get_partitioner().get() == partitioner_coarse.get(), + ExcInternalError()); if (use_src_inplace == false) this->vec_fine.copy_locally_owned_data_from(src); @@ -2765,9 +2773,13 @@ MGTwoLevelTransfer>:: const bool use_src_inplace = this->vec_fine.size() == 0; const auto vec_fine_ptr = use_src_inplace ? &src : &this->vec_fine; + Assert(vec_fine_ptr->get_partitioner().get() == partitioner_fine.get(), + ExcInternalError()); const bool use_dst_inplace = this->vec_coarse.size() == 0; const auto vec_coarse_ptr = use_dst_inplace ? &dst : &this->vec_coarse; + Assert(vec_coarse_ptr->get_partitioner().get() == partitioner_coarse.get(), + ExcInternalError()); if (use_src_inplace == false) this->vec_fine.copy_locally_owned_data_from(src);