From d0b22b0ad9209c3d64de091e604c0bc22775f9bf Mon Sep 17 00:00:00 2001 From: Marc Fehling Date: Mon, 31 May 2021 11:59:25 -0600 Subject: [PATCH] Bugfix step-75: Call `get_fe()` only on locally owned cells. --- examples/step-75/step-75.cc | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/examples/step-75/step-75.cc b/examples/step-75/step-75.cc index 1c4f469165..b946d3455a 100644 --- a/examples/step-75/step-75.cc +++ b/examples/step-75/step-75.cc @@ -745,17 +745,20 @@ namespace Step75 auto cell_other = dof_handler_fine.begin_active(); for (auto &cell : dof_handler_coarse.active_cell_iterators()) { - const unsigned int next_degree = - MGTransferGlobalCoarseningTools:: - create_next_polynomial_coarsening_degree( - cell_other->get_fe().degree, mg_data.transfer.p_sequence); - Assert(fe_index_for_degree.find(next_degree) != - fe_index_for_degree.end(), - ExcMessage("Next polynomial degree in sequence " - "does not exist in FECollection.")); - if (cell->is_locally_owned()) - cell->set_active_fe_index(fe_index_for_degree[next_degree]); + { + const unsigned int next_degree = + MGTransferGlobalCoarseningTools:: + create_next_polynomial_coarsening_degree( + cell_other->get_fe().degree, + mg_data.transfer.p_sequence); + Assert(fe_index_for_degree.find(next_degree) != + fe_index_for_degree.end(), + ExcMessage("Next polynomial degree in sequence " + "does not exist in FECollection.")); + + cell->set_active_fe_index(fe_index_for_degree[next_degree]); + } cell_other++; } } -- 2.39.5