From 1e1398d5789051c2b2bf9c21941ed8881eb3ad63 Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Fri, 23 Aug 2024 22:58:48 +0200 Subject: [PATCH] Convert some GeometryInfos --- source/grid/tria.cc | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/source/grid/tria.cc b/source/grid/tria.cc index 2f6e1a6f80..fc9273c845 100644 --- a/source/grid/tria.cc +++ b/source/grid/tria.cc @@ -16504,14 +16504,12 @@ void Triangulation::fix_coarsen_flags() for (const auto &cell : this->active_cell_iterators()) { if (cell->refine_flag_set()) - for (const unsigned int vertex : - GeometryInfo::vertex_indices()) + for (const unsigned int vertex : cell->vertex_indices()) vertex_level[cell->vertex_index(vertex)] = std::max(vertex_level[cell->vertex_index(vertex)], cell->level() + 1); else if (!cell->coarsen_flag_set()) - for (const unsigned int vertex : - GeometryInfo::vertex_indices()) + for (const unsigned int vertex : cell->vertex_indices()) vertex_level[cell->vertex_index(vertex)] = std::max(vertex_level[cell->vertex_index(vertex)], cell->level()); @@ -16524,8 +16522,7 @@ void Triangulation::fix_coarsen_flags() // to correct this by iterating over the entire // process until we are converged Assert(cell->coarsen_flag_set(), ExcInternalError()); - for (const unsigned int vertex : - GeometryInfo::vertex_indices()) + for (const unsigned int vertex : cell->vertex_indices()) vertex_level[cell->vertex_index(vertex)] = std::max(vertex_level[cell->vertex_index(vertex)], cell->level() - 1); @@ -16546,8 +16543,7 @@ void Triangulation::fix_coarsen_flags() for (active_cell_iterator cell = last_active(); cell != endc; --cell) if (cell->refine_flag_set() == false) { - for (const unsigned int vertex : - GeometryInfo::vertex_indices()) + for (const unsigned int vertex : cell->vertex_indices()) if (vertex_level[cell->vertex_index(vertex)] >= cell->level() + 1) { @@ -16562,8 +16558,7 @@ void Triangulation::fix_coarsen_flags() { cell->set_refine_flag(); - for (const unsigned int v : - GeometryInfo::vertex_indices()) + for (const unsigned int v : cell->vertex_indices()) vertex_level[cell->vertex_index(v)] = std::max(vertex_level[cell->vertex_index(v)], cell->level() + 1); @@ -17090,8 +17085,7 @@ bool Triangulation::prepare_coarsening_and_refinement() // smoothing operation below. bool at_periodic_boundary = false; - for (const unsigned int n : - GeometryInfo::face_indices()) + for (const unsigned int n : cell->face_indices()) { const cell_iterator neighbor = cell->neighbor(n); if (neighbor.state() == IteratorState::valid) @@ -17162,14 +17156,12 @@ bool Triangulation::prepare_coarsening_and_refinement() for (const auto &cell : active_cell_iterators()) { if (cell->refine_flag_set()) - for (const unsigned int vertex : - GeometryInfo::vertex_indices()) + for (const unsigned int vertex : cell->vertex_indices()) vertex_level[cell->vertex_index(vertex)] = std::max(vertex_level[cell->vertex_index(vertex)], cell->level() + 1); else if (!cell->coarsen_flag_set()) - for (const unsigned int vertex : - GeometryInfo::vertex_indices()) + for (const unsigned int vertex : cell->vertex_indices()) vertex_level[cell->vertex_index(vertex)] = std::max(vertex_level[cell->vertex_index(vertex)], cell->level()); @@ -17180,8 +17172,7 @@ bool Triangulation::prepare_coarsening_and_refinement() // always true (the coarsen flag could be removed // again) and so we may make an error here Assert(cell->coarsen_flag_set(), ExcInternalError()); - for (const unsigned int vertex : - GeometryInfo::vertex_indices()) + for (const unsigned int vertex : cell->vertex_indices()) vertex_level[cell->vertex_index(vertex)] = std::max(vertex_level[cell->vertex_index(vertex)], cell->level() - 1); @@ -17201,8 +17192,7 @@ bool Triangulation::prepare_coarsening_and_refinement() for (active_cell_iterator cell = last_active(); cell != end(); --cell) if (cell->refine_flag_set() == false) { - for (const unsigned int vertex : - GeometryInfo::vertex_indices()) + for (const unsigned int vertex : cell->vertex_indices()) if (vertex_level[cell->vertex_index(vertex)] >= cell->level() + 1) { @@ -17217,8 +17207,7 @@ bool Triangulation::prepare_coarsening_and_refinement() { cell->set_refine_flag(); - for (const unsigned int v : - GeometryInfo::vertex_indices()) + for (const unsigned int v : cell->vertex_indices()) vertex_level[cell->vertex_index(v)] = std::max(vertex_level[cell->vertex_index(v)], cell->level() + 1); -- 2.39.5