From 98dcf9b9a4a50ccee6048d696fe7c6d2ffd3c72c Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 12 Sep 2017 12:54:00 -0600 Subject: [PATCH] Do not set directly active_fe_indices on ghost cells. --- source/hp/dof_handler.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/source/hp/dof_handler.cc b/source/hp/dof_handler.cc index 483a7e07c1..664e4d6c06 100644 --- a/source/hp/dof_handler.cc +++ b/source/hp/dof_handler.cc @@ -927,10 +927,16 @@ namespace internal }; auto unpack - = [] (const typename dealii::hp::DoFHandler::active_cell_iterator &cell, - const unsigned int &active_fe_index) -> void + = [&dof_handler] (const typename dealii::hp::DoFHandler::active_cell_iterator &cell, + const unsigned int &active_fe_index) -> void { - cell->set_active_fe_index(active_fe_index); + // we would like to say + // cell->set_active_fe_index(active_fe_index); + // but this is not allowed on cells that are not + // locally owned, and we are on a ghost cell + dof_handler.levels[cell->level()]-> + set_active_fe_index(cell->index(), + active_fe_index); }; parallel::GridTools::exchange_cell_data_to_ghosts> -- 2.39.5