From: Peter Munch Date: Sat, 13 Jun 2020 18:44:08 +0000 (+0200) Subject: Use active_cell_index() in KellyErrorEstimator::estimate() X-Git-Tag: v9.3.0-rc1~1435^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30a74995052a3cc92dd32398e010422aeb5d1020;p=dealii.git Use active_cell_index() in KellyErrorEstimator::estimate() --- 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()) {