]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use active_cell_index() in KellyErrorEstimator::estimate() 10528/head
authorPeter Munch <peterrmuench@gmail.com>
Sat, 13 Jun 2020 18:44:08 +0000 (20:44 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Sat, 13 Jun 2020 18:56:24 +0000 (20:56 +0200)
include/deal.II/numerics/error_estimator.templates.h

index 431d3169a4e7df09b15d78a857410d24bb0d6ecf..6d0695630c5f91dec279b0444bdbf34b90d85060 100644 (file)
@@ -1338,16 +1338,14 @@ KellyErrorEstimator<dim, spacedim>::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<dim>::face_indices())
           {

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.