From: Luca Heltai Date: Tue, 19 Jul 2022 09:39:42 +0000 (+0200) Subject: Added a fix. X-Git-Tag: v9.5.0-rc1~1058^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=597a7f5b23f35013068c72519caff7f8595d2dad;p=dealii.git Added a fix. --- 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; }