]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Do not set directly active_fe_indices on ghost cells.
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 12 Sep 2017 18:54:00 +0000 (12:54 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 12 Sep 2017 18:54:00 +0000 (12:54 -0600)
source/hp/dof_handler.cc

index 483a7e07c1fedd45471a21680e0afd7623123a25..664e4d6c06968cc56f6165fbce0d6328f3ffada2 100644 (file)
@@ -927,10 +927,16 @@ namespace internal
               };
 
               auto unpack
-                = [] (const typename dealii::hp::DoFHandler<dim,spacedim>::active_cell_iterator &cell,
-                      const unsigned int                                                        &active_fe_index) -> void
+                = [&dof_handler] (const typename dealii::hp::DoFHandler<dim,spacedim>::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<unsigned int, dealii::hp::DoFHandler<dim,spacedim>>

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.