From: Wolfgang Bangerth Date: Tue, 12 Sep 2017 18:54:00 +0000 (-0600) Subject: Do not set directly active_fe_indices on ghost cells. X-Git-Tag: v9.0.0-rc1~1093^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98dcf9b9a4a50ccee6048d696fe7c6d2ffd3c72c;p=dealii.git Do not set directly active_fe_indices on ghost cells. --- 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>