]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Improve support to FE_Nothing in matrix-free hanging_nodes
authorBruno Turcksin <bruno.turcksin@gmail.com>
Wed, 14 Sep 2022 19:37:10 +0000 (19:37 +0000)
committerBruno Turcksin <bruno.turcksin@gmail.com>
Wed, 14 Sep 2022 19:37:10 +0000 (19:37 +0000)
include/deal.II/matrix_free/hanging_nodes_internal.h

index 86312effc9ff5e9056e6ec662db001f0524bcee0..ba20ae6f3caf1cb652a7e1d6d8eb0a9c0301140a 100644 (file)
@@ -529,6 +529,10 @@ namespace internal
               neighbor->level() == cell->level())
             continue;
 
+          // Ignore if the neighbors are FE_Nothing
+          if (neighbor->get_fe().n_dofs_per_cell() == 0)
+            continue;
+
           face |= 1 << direction;
         }
 
@@ -549,10 +553,16 @@ namespace internal
                 std::find_if(line_to_cells[line_index].begin(),
                              line_to_cells[line_index].end(),
                              [&cell](const auto &edge_neighbor) {
+                               DoFCellAccessor<dim, dim, false> dof_cell(
+                                 &edge_neighbor.first->get_triangulation(),
+                                 edge_neighbor.first->level(),
+                                 edge_neighbor.first->index(),
+                                 &cell->get_dof_handler());
                                return edge_neighbor.first->is_artificial() ==
                                         false &&
                                       edge_neighbor.first->level() <
-                                        cell->level();
+                                        cell->level() &&
+                                      dof_cell.get_fe().n_dofs_per_cell() > 0;
                              });
 
               if (edge_neighbor == line_to_cells[line_index].end())

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.