]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Added a fix.
authorLuca Heltai <luca.heltai@sissa.it>
Tue, 19 Jul 2022 09:39:42 +0000 (11:39 +0200)
committerLuca Heltai <luca.heltai@sissa.it>
Mon, 25 Jul 2022 13:23:09 +0000 (16:23 +0300)
source/grid/tria.cc

index b100f7c5f77495f61fd7aca8baf6ab6758cebb5e..2f8fa9c9f6e125f3696ae8f52e6434c649c8781d 100644 (file)
@@ -13979,10 +13979,19 @@ template <int dim, int spacedim>
 bool
 Triangulation<dim, spacedim>::has_hanging_nodes() const
 {
-  for (unsigned int lvl = 0; lvl < n_global_levels() - 1; ++lvl)
-    if (n_active_cells(lvl) != 0)
-      return true;
-
+  if (anisotropic_refinement == false)
+    {
+      for (unsigned int lvl = 0; lvl < n_global_levels() - 1; ++lvl)
+        if (n_active_cells(lvl) != 0)
+          return true;
+    }
+  else
+    {
+      for (const auto cell : active_cell_iterators())
+        for (const auto i : cell->face_indices())
+          if (cell->face(i)->has_children())
+            return true;
+    }
   return false;
 }
 

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.