From 871511f90dd209ff71e7811d54c5833c7b3245b5 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sun, 13 Aug 2017 14:54:49 -0600 Subject: [PATCH] Exchange active_fe_index information for p::d::Triangulation. --- source/hp/dof_handler.cc | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) 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 { -- 2.39.5