From 597a7f5b23f35013068c72519caff7f8595d2dad Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Tue, 19 Jul 2022 11:39:42 +0200 Subject: [PATCH] Added a fix. --- source/grid/tria.cc | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/source/grid/tria.cc b/source/grid/tria.cc index b100f7c5f7..2f8fa9c9f6 100644 --- a/source/grid/tria.cc +++ b/source/grid/tria.cc @@ -13979,10 +13979,19 @@ template bool Triangulation::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; } -- 2.39.5