From: Wolfgang Bangerth Date: Sun, 13 Aug 2017 20:54:49 +0000 (-0600) Subject: Exchange active_fe_index information for p::d::Triangulation. X-Git-Tag: v9.0.0-rc1~1229^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=871511f90dd209ff71e7811d54c5833c7b3245b5;p=dealii.git Exchange active_fe_index information for p::d::Triangulation. --- diff --git a/source/hp/dof_handler.cc b/source/hp/dof_handler.cc index fef78f22f1..7ffdb9beaa 100644 --- a/source/hp/dof_handler.cc +++ b/source/hp/dof_handler.cc @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -912,7 +913,26 @@ namespace internal else if (const parallel::distributed::Triangulation *tr = dynamic_cast*> (&dof_handler.get_triangulation())) { - Assert (false, ExcNotImplemented()); + // For completely distributed meshes, use the function that is able to move + // data from locally owned cells on one processor to the corresponding + // ghost cells on others. To this end, we need to have functions that can pack + // and unpack the data we want to transport -- namely, the single unsigned int + // active_fe_index objects + auto pack + = [] (const typename dealii::hp::DoFHandler::active_cell_iterator &cell) -> unsigned int + { + return cell->active_fe_index(); + }; + + auto unpack + = [] (const typename dealii::hp::DoFHandler::active_cell_iterator &cell, + const unsigned int &active_fe_index) -> void + { + cell->set_active_fe_index(active_fe_index); + }; + + parallel::GridTools::exchange_cell_data_to_ghosts> + (dof_handler, pack, unpack); } else {