]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Move communication of future FE indices into pre-transfer-action.
authorMarc Fehling <mafehling.git@gmail.com>
Tue, 21 May 2024 14:44:50 +0000 (16:44 +0200)
committerMarc Fehling <mafehling.git@gmail.com>
Tue, 21 May 2024 14:44:50 +0000 (16:44 +0200)
Update documentation for dominated_future_fe_on_children.

include/deal.II/dofs/dof_handler.h
source/dofs/dof_handler.cc

index 78ba6c03c7cbf5ab0826e2e446589eb4566d2beb..73473ffbca614e7345446b2da51e43b7d8423cd6 100644 (file)
@@ -1782,7 +1782,7 @@ namespace internal
        * @note This function can only be called on direct parent cells, i.e.,
        * non-active cells whose children are all active.
        *
-       * @note On parallel::shared::Triangulation objects where sibling cells
+       * @note On parallel Triangulation objects where sibling cells
        * can be ghost cells, make sure that future FE indices have been properly
        * communicated with communicate_future_fe_indices() first. Otherwise,
        * results might differ on different processors. There is no check for
index c3d4a2e8ae01e1bcf2acf1ab332a7906185b287a..af18a2aaf9f33ff17de604b0d4bb562b76f25080 100644 (file)
@@ -1658,7 +1658,7 @@ namespace internal
                   "You ask for information on children of this cell which is only "
                   "available for active cells. One of its children is not active."));
 
-              // Ghost siblings might occur on parallel::shared::Triangulation
+              // Ghost siblings might occur on parallel Triangulation
               // objects. The public interface does not allow to access future
               // FE indices on ghost cells. However, we need this information
               // here and thus call the internal function that does not check
@@ -2770,11 +2770,6 @@ void DoFHandler<dim, spacedim>::connect_to_triangulation_signals()
         }));
 
       // refinement signals
-      this->tria_listeners_for_transfer.push_back(
-        this->tria->signals.pre_refinement.connect([this]() {
-          internal::hp::DoFHandlerImplementation::Implementation::
-            communicate_future_fe_indices(*this);
-        }));
       this->tria_listeners_for_transfer.push_back(
         this->tria->signals.pre_refinement.connect(
           [this]() { this->pre_transfer_action(); }));
@@ -2893,6 +2888,9 @@ void DoFHandler<dim, spacedim>::pre_transfer_action()
 
   this->active_fe_index_transfer = std::make_unique<ActiveFEIndexTransfer>();
 
+  internal::hp::DoFHandlerImplementation::Implementation::
+    communicate_future_fe_indices(*this);
+
   dealii::internal::hp::DoFHandlerImplementation::Implementation::
     collect_fe_indices_on_cells_to_be_refined(*this);
 }
@@ -2930,10 +2928,18 @@ void DoFHandler<dim, spacedim>::pre_distributed_transfer_action()
   active_fe_index_transfer->active_fe_indices.resize(
     get_triangulation().n_active_cells(), numbers::invalid_fe_index);
 
+  // Collect future FE indices on locally owned and ghost cells.
+  // The public interface does not allow to access future FE indices
+  // on ghost cells. However, we need this information here and thus
+  // call the internal function that does not check for cell ownership.
+  internal::hp::DoFHandlerImplementation::Implementation::
+    communicate_future_fe_indices(*this);
+
   for (const auto &cell : active_cell_iterators())
-    if (cell->is_locally_owned())
+    if (cell->is_artificial() == false)
       active_fe_index_transfer->active_fe_indices[cell->active_cell_index()] =
-        cell->future_fe_index();
+        dealii::internal::DoFCellAccessorImplementation::Implementation::
+          future_fe_index<dim, spacedim, false>(*cell);
 
   // Create transfer object and attach to it.
   const auto *distributed_tria =

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.