]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Update a comment 18060/head
authorMartin Kronbichler <martin.kronbichler@rub.de>
Thu, 30 Jan 2025 09:28:14 +0000 (10:28 +0100)
committerMartin Kronbichler <martin.kronbichler@rub.de>
Thu, 30 Jan 2025 09:28:14 +0000 (10:28 +0100)
include/deal.II/matrix_free/face_setup_internal.h

index 80eacba4a6c9124ad740ef7ad7fcdd056483c57d..ff078748737563acf1c9622175b918466fec83c0 100644 (file)
@@ -1048,14 +1048,15 @@ namespace internal
 
       info.subface_index = GeometryInfo<dim>::max_children_per_cell;
       Assert(neighbor->level() <= cell->level(), ExcInternalError());
-      if (cell->level() > neighbor->level())
+
+      // for dim > 1 and hanging faces we must set a subface index
+      if (dim > 1 && cell->level() > neighbor->level())
         {
           if (cell->has_periodic_neighbor(face_no))
             info.subface_index =
               cell->periodic_neighbor_of_coarser_periodic_neighbor(face_no)
                 .second;
-          // else if must be dim > 1 because dim == 1 adm creates no subfaces
-          else if (dim > 1)
+          else
             info.subface_index =
               cell->neighbor_of_coarser_neighbor(face_no).second;
         }

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.