Skip to content

Commit

Permalink
Added a fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
luca-heltai committed Jul 19, 2022
1 parent 3ab11ed commit aca7b67
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions source/grid/tria.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit aca7b67

Please sign in to comment.