From 30a74995052a3cc92dd32398e010422aeb5d1020 Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Sat, 13 Jun 2020 20:44:08 +0200 Subject: [PATCH] Use active_cell_index() in KellyErrorEstimator::estimate() --- include/deal.II/numerics/error_estimator.templates.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/include/deal.II/numerics/error_estimator.templates.h b/include/deal.II/numerics/error_estimator.templates.h index 431d3169a4..6d0695630c 100644 --- a/include/deal.II/numerics/error_estimator.templates.h +++ b/include/deal.II/numerics/error_estimator.templates.h @@ -1338,16 +1338,14 @@ KellyErrorEstimator::estimate( // now walk over all cells and collect information from the faces. only do // something if this is a cell we care for based on the subdomain id - unsigned int present_cell = 0; - for (typename DoFHandlerType::active_cell_iterator cell = - dof_handler.begin_active(); - cell != dof_handler.end(); - ++cell, ++present_cell) + for (const auto &cell : dof_handler.active_cell_iterators()) if (((subdomain_id == numbers::invalid_subdomain_id) || (cell->subdomain_id() == subdomain_id)) && ((material_id == numbers::invalid_material_id) || (cell->material_id() == material_id))) { + const unsigned int present_cell = cell->active_cell_index(); + // loop over all faces of this cell for (const unsigned int face_no : GeometryInfo::face_indices()) { -- 2.39.5