From: Daniel Arndt Date: Sat, 11 May 2019 18:58:29 +0000 (-0400) Subject: Modernize step-26 X-Git-Tag: v9.1.0-rc1~61^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F8099%2Fhead;p=dealii.git Modernize step-26 --- diff --git a/examples/step-26/step-26.cc b/examples/step-26/step-26.cc index 57a75fc782..a28bfb02a4 100644 --- a/examples/step-26/step-26.cc +++ b/examples/step-26/step-26.cc @@ -145,7 +145,7 @@ namespace Step26 const unsigned int component) const { (void)component; - Assert(component == 0, ExcIndexRange(component, 0, 1)); + AssertIndexRange(component, 1); Assert(dim == 2, ExcNotImplemented()); const double time = this->get_time(); @@ -351,15 +351,11 @@ namespace Step26 0.4); if (triangulation.n_levels() > max_grid_level) - for (typename Triangulation::active_cell_iterator cell = - triangulation.begin_active(max_grid_level); - cell != triangulation.end(); - ++cell) + for (const auto &cell : + triangulation.active_cell_iterators_on_level(max_grid_level)) cell->clear_refine_flag(); - for (typename Triangulation::active_cell_iterator cell = - triangulation.begin_active(min_grid_level); - cell != triangulation.end_active(min_grid_level); - ++cell) + for (const auto &cell : + triangulation.active_cell_iterators_on_level(min_grid_level)) cell->clear_coarsen_flag(); // These two loops above are slightly different but this is easily // explained. In the first loop, instead of calling