// individual vertices
if (dim == 1)
{
- for (typename DoFHandlerType<dim, spacedim>::active_cell_iterator
- cell = dof.begin_active();
- cell != dof.end();
- ++cell)
+ for (const auto &cell : dof.active_cell_iterators())
for (const unsigned int direction :
GeometryInfo<dim>::face_indices())
if (cell->at_boundary(direction) &&
#ifdef DEBUG
// Assert that there are no hanging nodes at the boundary
int level = -1;
- for (typename DoFHandlerType<dim, spacedim>::active_cell_iterator
- cell = dof.begin_active();
- cell != dof.end();
- ++cell)
+ for (const auto &cell : dof.active_cell_iterators())
for (auto f : GeometryInfo<dim>::face_indices())
{
if (cell->at_boundary(f))
{
case 2:
{
- for (typename DoFHandler<dim>::active_cell_iterator cell =
- dof_handler.begin_active();
- cell != dof_handler.end();
- ++cell)
+ for (const auto &cell : dof_handler.active_cell_iterators())
if (cell->at_boundary() && cell->is_locally_owned())
for (const unsigned int face :
GeometryInfo<dim>::face_indices())
for (unsigned int dof = 0; dof < n_dofs; ++dof)
projected_dofs[dof] = 0;
- for (typename DoFHandler<dim>::active_cell_iterator cell =
- dof_handler.begin_active();
- cell != dof_handler.end();
- ++cell)
+ for (const auto &cell : dof_handler.active_cell_iterators())
if (cell->at_boundary() && cell->is_locally_owned())
for (const unsigned int face :
GeometryInfo<dim>::face_indices())
{
case 2:
{
- for (typename hp::DoFHandler<dim>::active_cell_iterator cell =
- dof_handler.begin_active();
- cell != dof_handler.end();
- ++cell)
+ for (const auto &cell : dof_handler.active_cell_iterators())
if (cell->at_boundary() && cell->is_locally_owned())
for (const unsigned int face :
GeometryInfo<dim>::face_indices())
for (unsigned int dof = 0; dof < n_dofs; ++dof)
projected_dofs[dof] = 0;
- for (typename hp::DoFHandler<dim>::active_cell_iterator cell =
- dof_handler.begin_active();
- cell != dof_handler.end();
- ++cell)
+ for (const auto &cell : dof_handler.active_cell_iterators())
if (cell->at_boundary() && cell->is_locally_owned())
for (const unsigned int face :
GeometryInfo<dim>::face_indices())
std::set<types::boundary_id>::iterator b_id;
std::vector<std::array<types::global_dof_index, dim>> cell_vector_dofs;
- for (typename DoFHandlerType<dim, spacedim>::active_cell_iterator cell =
- dof_handler.begin_active();
- cell != dof_handler.end();
- ++cell)
+ for (const auto &cell : dof_handler.active_cell_iterators())
if (!cell->is_artificial())
for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
if ((b_id = boundary_ids.find(cell->face(face_no)->boundary_id())) !=
update_flags);
// loop over all cells
- for (typename DoFHandlerType::active_cell_iterator cell =
- dof.begin_active();
- cell != dof.end();
- ++cell)
+ for (const auto &cell : dof.active_cell_iterators())
if (cell->is_locally_owned())
{
// initialize for this cell
update_flags);
// loop over all cells
- for (typename DoFHandlerType::active_cell_iterator cell =
- dof.begin_active();
- cell != dof.end();
- ++cell)
+ for (const auto &cell : dof.active_cell_iterators())
if (cell->is_locally_owned())
{
// initialize for this cell
ExcInternalError());
unsigned int owned_index = 0;
- for (typename Triangulation<dim, spacedim>::active_cell_iterator cell =
- tria.begin_active();
- cell != tria.end();
- ++cell)
+ for (const auto &cell : tria.active_cell_iterators())
if (cell->subdomain_id() == tria.locally_owned_subdomain())
{
locally_owned_indicators(owned_index) =
// as a final good measure, delete all flags again from cells that we don't
// locally own
- for (typename Triangulation<dim, spacedim>::active_cell_iterator cell =
- tria.begin_active();
- cell != tria.end();
- ++cell)
+ for (const auto &cell : tria.active_cell_iterators())
if (cell->subdomain_id() != tria.locally_owned_subdomain())
{
cell->clear_refine_flag();
vertex_touch_count.resize(triangulation.n_vertices());
vertex_to_cell.resize(triangulation.n_vertices());
- for (typename Triangulation<dim, spacedim>::active_cell_iterator cell =
- triangulation.begin_active();
- cell != triangulation.end();
- ++cell)
+ for (const auto &cell : triangulation.active_cell_iterators())
for (const unsigned int v : GeometryInfo<dim>::vertex_indices())
{
++vertex_touch_count[cell->vertex_index(v)];
edge_touch_count.resize(triangulation.n_active_lines());
edge_to_cell.resize(triangulation.n_active_lines());
- for (typename Triangulation<dim, spacedim>::active_cell_iterator cell =
- triangulation.begin_active();
- cell != triangulation.end();
- ++cell)
+ for (const auto &cell : triangulation.active_cell_iterators())
for (unsigned int l = 0; l < GeometryInfo<dim>::lines_per_cell; ++l)
{
++edge_touch_count[cell->line(l)->index()];
{
// count how many flags are set and allocate that much memory
unsigned int n_refine_flags = 0, n_coarsen_flags = 0;
- for (typename Triangulation<dim, spacedim>::active_cell_iterator cell =
- triangulation.begin_active();
- cell != triangulation.end();
- ++cell)
+ for (const auto &cell : triangulation.active_cell_iterators())
{
// skip cells that are not local
if (cell->subdomain_id() != my_subdomain)
if (settings & mesh_reconstruction_after_repartitioning)
while (this->begin_active()->level() > 0)
{
- for (typename Triangulation<dim, spacedim>::active_cell_iterator
- cell = this->begin_active();
- cell != this->end();
- ++cell)
+ for (const auto &cell : this->active_cell_iterators())
{
cell->set_coarsen_flag();
}
// see if any flags are still set
mesh_changed = false;
- for (typename Triangulation<dim, spacedim>::active_cell_iterator
- cell = this->begin_active();
- cell != this->end();
- ++cell)
+ for (const auto &cell : this->active_cell_iterators())
if (cell->refine_flag_set() || cell->coarsen_flag_set())
{
mesh_changed = true;
// check if correct number of ghosts is created
unsigned int num_ghosts = 0;
- for (typename Triangulation<dim, spacedim>::active_cell_iterator cell =
- this->begin_active();
- cell != this->end();
- ++cell)
+ for (const auto &cell : this->active_cell_iterators())
{
if (cell->subdomain_id() != this->my_subdomain &&
cell->subdomain_id() != numbers::artificial_subdomain_id)
// count the number of owned, active cells and compare with p4est.
unsigned int n_owned = 0;
- for (typename Triangulation<dim, spacedim>::active_cell_iterator cell =
- this->begin_active();
- cell != this->end();
- ++cell)
+ for (const auto &cell : this->active_cell_iterators())
{
if (cell->subdomain_id() == this->my_subdomain)
++n_owned;
{
// do not allow anisotropic refinement
# ifdef DEBUG
- for (typename Triangulation<dim, spacedim>::active_cell_iterator cell =
- this->begin_active();
- cell != this->end();
- ++cell)
+ for (const auto &cell : this->active_cell_iterators())
if (cell->is_locally_owned() && cell->refine_flag_set())
Assert(cell->refine_flag_set() ==
RefinementPossibilities<dim>::isotropic_refinement,
// now do the work we're supposed to do when we are in charge
// make sure all flags are cleared on cells we don't own, since nothing
// good can come of that if they are still around
- for (typename Triangulation<dim, spacedim>::active_cell_iterator cell =
- this->begin_active();
- cell != this->end();
- ++cell)
+ for (const auto &cell : this->active_cell_iterators())
if (cell->is_ghost() || cell->is_artificial())
{
cell->clear_refine_flag();
// finally copy back from local part of tree to deal.II
// triangulation. before doing so, make sure there are no refine or
// coarsen flags pending
- for (typename Triangulation<dim, spacedim>::active_cell_iterator cell =
- this->begin_active();
- cell != this->end();
- ++cell)
+ for (const auto &cell : this->active_cell_iterators())
{
cell->clear_refine_flag();
cell->clear_coarsen_flag();
Triangulation<dim, spacedim>::repartition()
{
# ifdef DEBUG
- for (typename Triangulation<dim, spacedim>::active_cell_iterator cell =
- this->begin_active();
- cell != this->end();
- ++cell)
+ for (const auto &cell : this->active_cell_iterators())
if (cell->is_locally_owned())
Assert(
!cell->refine_flag_set() && !cell->coarsen_flag_set(),
{
// find ghost owners
- for (typename Triangulation<dim, spacedim>::active_cell_iterator cell =
- this->begin_active();
- cell != this->end();
- ++cell)
+ for (const auto &cell : this->active_cell_iterators())
if (cell->is_ghost())
number_cache.ghost_owners.insert(cell->subdomain_id());
}
if (this->n_levels() > 0)
- for (typename Triangulation<dim, spacedim>::active_cell_iterator cell =
- this->begin_active();
- cell != this->end();
- ++cell)
+ for (const auto &cell : this->active_cell_iterators())
if (cell->subdomain_id() == my_subdomain)
++number_cache.n_locally_owned_active_cells;
dealii::Table<2, std::unique_ptr<DoFIdentities>> line_dof_identities(
dof_handler.fe_collection.size(), dof_handler.fe_collection.size());
- for (typename hp::DoFHandler<dim, spacedim>::active_cell_iterator
- cell = dof_handler.begin_active();
- cell != dof_handler.end();
- ++cell)
+ for (const auto &cell : dof_handler.active_cell_iterators())
for (unsigned int l = 0; l < GeometryInfo<dim>::lines_per_cell; ++l)
if (cell->line(l)->user_flag_set() == false)
{
dealii::Table<2, std::unique_ptr<DoFIdentities>> quad_dof_identities(
dof_handler.fe_collection.size(), dof_handler.fe_collection.size());
- for (typename hp::DoFHandler<dim, spacedim>::active_cell_iterator
- cell = dof_handler.begin_active();
- cell != dof_handler.end();
- ++cell)
+ for (const auto &cell : dof_handler.active_cell_iterators())
for (unsigned int q = 0; q < GeometryInfo<dim>::quads_per_cell; ++q)
if ((cell->quad(q)->user_flag_set() == false) &&
(cell->quad(q)->n_active_fe_indices() == 2))
dealii::Table<2, std::unique_ptr<DoFIdentities>> line_dof_identities(
dof_handler.fe_collection.size(), dof_handler.fe_collection.size());
- for (typename hp::DoFHandler<dim, spacedim>::active_cell_iterator
- cell = dof_handler.begin_active();
- cell != dof_handler.end();
- ++cell)
+ for (const auto &cell : dof_handler.active_cell_iterators())
for (unsigned int l = 0; l < GeometryInfo<dim>::lines_per_cell; ++l)
if ((cell->is_locally_owned()) &&
(cell->line(l)->user_flag_set() == true))
dealii::Table<2, std::unique_ptr<DoFIdentities>> quad_dof_identities(
dof_handler.fe_collection.size(), dof_handler.fe_collection.size());
- for (typename hp::DoFHandler<dim, spacedim>::active_cell_iterator
- cell = dof_handler.begin_active();
- cell != dof_handler.end();
- ++cell)
+ for (const auto &cell : dof_handler.active_cell_iterators())
for (unsigned int q = 0; q < GeometryInfo<dim>::quads_per_cell; ++q)
if ((cell->is_locally_owned()) &&
(cell->quad(q)->user_flag_set() == true) &&
const IndexSet & indices_we_care_about,
hp::DoFHandler<dim, spacedim> & dof_handler)
{
- for (typename hp::DoFHandler<dim, spacedim>::active_cell_iterator
- cell = dof_handler.begin_active();
- cell != dof_handler.end();
- ++cell)
+ for (const auto &cell : dof_handler.active_cell_iterators())
if (!cell->is_artificial())
{
const unsigned int fe_index = cell->active_fe_index();
dof_handler.get_triangulation())
.clear_user_flags_line();
- for (typename hp::DoFHandler<dim, spacedim>::active_cell_iterator
- cell = dof_handler.begin_active();
- cell != dof_handler.end();
- ++cell)
+ for (const auto &cell : dof_handler.active_cell_iterators())
if (!cell->is_artificial())
for (unsigned int l = 0; l < GeometryInfo<dim>::lines_per_cell;
++l)
dof_handler.get_triangulation())
.clear_user_flags_line();
- for (typename hp::DoFHandler<dim, spacedim>::active_cell_iterator
- cell = dof_handler.begin_active();
- cell != dof_handler.end();
- ++cell)
+ for (const auto &cell : dof_handler.active_cell_iterators())
if (!cell->is_artificial())
for (unsigned int l = 0; l < GeometryInfo<dim>::lines_per_cell;
++l)
dof_handler.get_triangulation())
.clear_user_flags_quad();
- for (typename hp::DoFHandler<dim, spacedim>::active_cell_iterator
- cell = dof_handler.begin_active();
- cell != dof_handler.end();
- ++cell)
+ for (const auto &cell : dof_handler.active_cell_iterators())
if (!cell->is_artificial())
for (unsigned int q = 0; q < GeometryInfo<dim>::quads_per_cell;
++q)
// do not support boundaries of dimension dim-2, and so every isolated
// boundary line is also part of a boundary face which we will be
// visiting sooner or later
- for (typename DoFHandlerType::active_cell_iterator cell =
- dof_handler.begin_active();
- cell != dof_handler.end();
- ++cell)
+ for (const auto &cell : dof_handler.active_cell_iterators())
// only work on cells that are either locally owned or at least ghost
// cells
// do not support boundaries of dimension dim-2, and so every isolated
// boundary line is also part of a boundary face which we will be
// visiting sooner or later
- for (typename DoFHandlerType::active_cell_iterator cell =
- dof_handler.begin_active();
- cell != dof_handler.end();
- ++cell)
+ for (const auto &cell : dof_handler.active_cell_iterators())
for (const unsigned int face :
GeometryInfo<DoFHandlerType::dimension>::face_indices())
if (cell->at_boundary(face))
#ifdef DEBUG
// if in debug mode, check whether the coarse grid is indeed coarser
// everywhere than the fine grid
- for (typename dealii::DoFHandler<dim, spacedim>::active_cell_iterator
- cell = coarse_grid.begin_active();
- cell != coarse_grid.end();
- ++cell)
+ for (const auto &cell : coarse_grid.active_cell_iterators())
Assert(cell->level() <= coarse_to_fine_grid_map[cell]->level(),
ExcGridNotCoarser());
#endif
std::vector<types::global_dof_index> local_dof_indices(
fine_fe.dofs_per_cell);
- for (typename dealii::DoFHandler<dim, spacedim>::active_cell_iterator
- cell = fine_grid.begin_active();
- cell != fine_grid.end();
- ++cell)
+ for (const auto &cell : fine_grid.active_cell_iterators())
if (cell->is_locally_owned())
{
cell->get_dof_indices(local_dof_indices);
std::vector<types::global_dof_index> local_dof_indices(
fine_fe.dofs_per_cell);
unsigned int next_free_index = 0;
- for (typename dealii::DoFHandler<dim, spacedim>::active_cell_iterator
- cell = fine_grid.begin_active();
- cell != fine_grid.end();
- ++cell)
+ for (const auto &cell : fine_grid.active_cell_iterators())
if (cell->is_locally_owned())
{
cell->get_dof_indices(local_dof_indices);
intergrid_map.make_mapping(result, triangulation_2);
bool any_cell_flagged = false;
- for (typename Triangulation<dim, spacedim>::active_cell_iterator
- result_cell = result.begin_active();
- result_cell != result.end();
- ++result_cell)
+ for (const auto &result_cell : result.active_cell_iterators())
if (intergrid_map[result_cell]->has_children())
{
any_cell_flagged = true;
// the loop through the cells and copy stuff, excluding
// the ones we are to remove
std::vector<CellData<dim>> cells;
- for (typename Triangulation<dim, spacedim>::active_cell_iterator cell =
- input_triangulation.begin_active();
- cell != input_triangulation.end();
- ++cell)
+ for (const auto &cell : input_triangulation.active_cell_iterators())
if (cells_to_remove.find(cell) == cells_to_remove.end())
{
Assert(static_cast<unsigned int>(cell->level()) ==
Triangulation<1, spacedim> & triangulation)
{
if (boundary_ids.size() > 0)
- for (typename Triangulation<1, spacedim>::active_cell_iterator cell =
- triangulation.begin_active();
- cell != triangulation.end();
- ++cell)
+ for (const auto &cell : triangulation.active_cell_iterators())
for (unsigned int f : GeometryInfo<1>::face_indices())
if (boundary_ids.find(cell->vertex_index(f)) != boundary_ids.end())
{
}
unsigned int marked = 0;
- for (typename Triangulation<dim, spacedim>::active_cell_iterator cell =
- tria.begin_active();
- cell != tria.end();
- ++cell)
+ for (const auto &cell : tria.active_cell_iterators())
if (std::fabs(criteria(cell->active_cell_index())) >= new_threshold)
{
if (max_to_mark != numbers::invalid_unsigned_int &&
ExcDimensionMismatch(criteria.size(), tria.n_active_cells()));
Assert(criteria.is_non_negative(), ExcNegativeCriteria());
- for (typename Triangulation<dim, spacedim>::active_cell_iterator cell =
- tria.begin_active();
- cell != tria.end();
- ++cell)
+ for (const auto &cell : tria.active_cell_iterators())
if (std::fabs(criteria(cell->active_cell_index())) <= threshold)
if (!cell->refine_flag_set())
cell->set_coarsen_flag();
const bool is_parallel_shared =
(dynamic_cast<parallel::shared::Triangulation<dim, spacedim> *>(
&triangulation) != nullptr);
- for (typename Triangulation<dim, spacedim>::active_cell_iterator cell =
- triangulation.begin_active();
- cell != triangulation.end();
- ++cell)
+ for (const auto &cell : triangulation.active_cell_iterators())
if (is_parallel_shared || cell->is_locally_owned())
{
if (dim > 1)
std::vector<bool> vertex_moved(triangulation.n_vertices(), false);
// Next move vertices on locally owned cells
- for (typename Triangulation<dim, spacedim>::active_cell_iterator cell =
- triangulation.begin_active();
- cell != triangulation.end();
- ++cell)
+ for (const auto &cell : triangulation.active_cell_iterators())
if (cell->is_locally_owned())
{
for (const unsigned int vertex_no :
}
// now do the actual move of the vertices
- for (typename Triangulation<dim, spacedim>::active_cell_iterator cell =
- triangulation.begin_active();
- cell != triangulation.end();
- ++cell)
+ for (const auto &cell : triangulation.active_cell_iterators())
for (const unsigned int vertex_no :
GeometryInfo<dim>::vertex_indices())
cell->vertex(vertex_no) =
{
std::vector<std::vector<unsigned int>> vertex_to_cell(
triangulation.n_vertices());
- for (typename Triangulation<dim, spacedim>::active_cell_iterator cell =
- triangulation.begin_active();
- cell != triangulation.end();
- ++cell)
+ for (const auto &cell : triangulation.active_cell_iterators())
{
for (const unsigned int v : GeometryInfo<dim>::vertex_indices())
vertex_to_cell[cell->vertex_index(v)].push_back(
cell_connectivity.reinit(triangulation.n_active_cells(),
triangulation.n_active_cells());
- for (typename Triangulation<dim, spacedim>::active_cell_iterator cell =
- triangulation.begin_active();
- cell != triangulation.end();
- ++cell)
+ for (const auto &cell : triangulation.active_cell_iterators())
{
for (const unsigned int v : GeometryInfo<dim>::vertex_indices())
for (unsigned int n = 0;
Assert(subdomain.size() == triangulation.n_active_cells(),
ExcDimensionMismatch(subdomain.size(),
triangulation.n_active_cells()));
- for (typename Triangulation<dim, spacedim>::active_cell_iterator cell =
- triangulation.begin_active();
- cell != triangulation.end();
- ++cell)
+ for (const auto &cell : triangulation.active_cell_iterators())
subdomain[cell->active_cell_index()] = cell->subdomain_id();
}
const types::subdomain_id subdomain)
{
unsigned int count = 0;
- for (typename Triangulation<dim, spacedim>::active_cell_iterator cell =
- triangulation.begin_active();
- cell != triangulation.end();
- ++cell)
+ for (const auto &cell : triangulation.active_cell_iterators())
if (cell->subdomain_id() == subdomain)
++count;
// we cannot immediately reset their boundary ids. thus, copy first
// and reset later
if (dim >= 3)
- for (typename Triangulation<dim, spacedim>::active_cell_iterator cell =
- tria.begin_active();
- cell != tria.end();
- ++cell)
+ for (const auto &cell : tria.active_cell_iterators())
for (auto f : GeometryInfo<dim>::face_indices())
if (cell->face(f)->at_boundary())
for (unsigned int e = 0; e < GeometryInfo<dim>::lines_per_face; ++e)
}
// now do cells
- for (typename Triangulation<dim, spacedim>::active_cell_iterator cell =
- tria.begin_active();
- cell != tria.end();
- ++cell)
+ for (const auto &cell : tria.active_cell_iterators())
for (auto f : GeometryInfo<dim>::face_indices())
if (cell->face(f)->at_boundary())
{
do
{
refinement_necessary = false;
- for (typename Triangulation<Container::dimension,
- Container::space_dimension>::
- active_cell_iterator active_tria_cell =
- local_triangulation.begin_active();
- active_tria_cell != local_triangulation.end();
- ++active_tria_cell)
+ for (const auto &active_tria_cell :
+ local_triangulation.active_cell_iterators())
{
if (patch_to_global_tria_map_tmp[active_tria_cell]->has_children())
{
std::vector<unsigned int> max_adjacent_cell_level(
triangulation.n_vertices(), 0);
- for (typename Triangulation<dim, spacedim>::active_cell_iterator cell =
- triangulation.begin_active();
- cell != triangulation.end();
- ++cell)
+ for (const auto &cell : triangulation.active_cell_iterators())
for (const unsigned int v : GeometryInfo<dim>::vertex_indices())
{
min_adjacent_cell_level[cell->vertex_index(v)] =
// maps
triangulation.vertex_to_boundary_id_map_1d->clear();
triangulation.vertex_to_manifold_id_map_1d->clear();
- for (typename Triangulation<dim, spacedim>::active_cell_iterator cell =
- triangulation.begin_active();
- cell != triangulation.end();
- ++cell)
+ for (const auto &cell : triangulation.active_cell_iterators())
for (auto f : GeometryInfo<dim>::face_indices())
{
(*triangulation.vertex_to_manifold_id_map_1d)
// this check is very simple to implement here, since we have
// all lines flagged if they shall be refined
#ifdef DEBUG
- for (typename Triangulation<dim, spacedim>::active_cell_iterator cell =
- triangulation.begin_active();
- cell != triangulation.end();
- ++cell)
+ for (const auto &cell : triangulation.active_cell_iterators())
if (!cell->refine_flag_set())
for (unsigned int line = 0;
line < GeometryInfo<dim>::lines_per_cell;
// first
std::vector<bool> locally_used_vertices(
dof_handler.tria->n_vertices(), false);
- for (typename HpDoFHandler<dim, spacedim>::active_cell_iterator cell =
- dof_handler.begin_active();
- cell != dof_handler.end();
- ++cell)
+ for (const auto &cell : dof_handler.active_cell_iterators())
if (!cell->is_artificial())
for (const unsigned int v : GeometryInfo<dim>::vertex_indices())
locally_used_vertices[cell->vertex_index(v)] = true;
dof_handler.fe_collection.size(),
std::vector<bool>(dof_handler.tria->n_vertices(), false));
- for (typename HpDoFHandler<dim, spacedim>::active_cell_iterator cell =
- dof_handler.begin_active();
- cell != dof_handler.end();
- ++cell)
+ for (const auto &cell : dof_handler.active_cell_iterators())
if (!cell->is_artificial())
for (const unsigned int v : GeometryInfo<dim>::vertex_indices())
vertex_fe_association[cell->active_fe_index()]
dof_handler.fe_collection.size(),
std::vector<bool>(dof_handler.tria->n_raw_lines(), false));
- for (typename HpDoFHandler<dim, spacedim>::active_cell_iterator
- cell = dof_handler.begin_active();
- cell != dof_handler.end();
- ++cell)
+ for (const auto &cell : dof_handler.active_cell_iterators())
if (!cell->is_artificial())
for (unsigned int l = 0; l < GeometryInfo<dim>::lines_per_cell;
++l)
// loop over all cells and do something on the cells which we're told to
// work on. note that the error indicator is only a sum over the two
// contributions from the two vertices of each cell.
- for (typename DoFHandlerType::active_cell_iterator cell =
- dof_handler.begin_active();
- cell != dof_handler.end();
- ++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) ||
// and that'll stay or be refined
unsigned int n_cells_to_coarsen = 0;
unsigned int n_cells_to_stay_or_refine = 0;
- for (typename DoFHandlerType::active_cell_iterator act_cell =
- dof_handler->begin_active();
- act_cell != dof_handler->end();
- ++act_cell)
+ for (const auto &act_cell : dof_handler->active_cell_iterators())
{
if (act_cell->coarsen_flag_set())
++n_cells_to_coarsen;