std::vector<types::global_dof_index> local_dof_indices(dofs_per_cell);
- typename DoFHandler<dim>::active_cell_iterator cell =
- dof_handler.begin_active(),
- endc = dof_handler.end();
-
- for (; cell != endc; ++cell)
+ for (const auto &cell : dof_handler.active_cell_iterators())
{
cell_matrix = 0;
std::vector<types::global_dof_index> local_dof_indices(dofs_per_cell);
- typename DoFHandler<dim>::active_cell_iterator cell =
- dof_handler.begin_active(),
- endc = dof_handler.end();
-
- for (; cell != endc; ++cell)
+ for (const auto &cell : dof_handler.active_cell_iterators())
{
cell_rhs = 0;
cell_list =
GridTools::get_finest_common_cells(dof_handler, g_prime.dof_handler);
- typename std::list<std::pair<typename DoFHandler<dim>::cell_iterator,
- typename DoFHandler<dim>::cell_iterator>>::
- const_iterator cell_iter = cell_list.begin();
-
- for (; cell_iter != cell_list.end(); ++cell_iter)
+ for (const auto &cell_pair : cell_list)
{
FullMatrix<double> unit_matrix(fe.dofs_per_cell);
for (unsigned int i = 0; i < unit_matrix.m(); ++i)
unit_matrix(i, i) = 1;
assemble_cross_group_rhs_recursive(g_prime,
- cell_iter->first,
- cell_iter->second,
+ cell_pair.first,
+ cell_pair.second,
unit_matrix);
}
}
double fission_source = 0;
- typename DoFHandler<dim>::active_cell_iterator cell =
- dof_handler.begin_active(),
- endc = dof_handler.end();
- for (; cell != endc; ++cell)
+ for (const auto &cell : dof_handler.active_cell_iterators())
{
fe_values.reinit(cell);
const double refine_threshold,
const double coarsen_threshold)
{
- typename Triangulation<dim>::active_cell_iterator cell = triangulation
- .begin_active(),
- endc =
- triangulation.end();
-
- for (; cell != endc; ++cell)
+ for (const auto &cell : triangulation.active_cell_iterators())
if (error_indicators(cell->active_cell_index()) > refine_threshold)
cell->set_refine_flag();
else if (error_indicators(cell->active_cell_index()) < coarsen_threshold)
// add a few checks to see that the locations we compute are within the
// bounds of the arrays in which we have to look up materials.) At the end
// of the loop, we set material identifiers accordingly:
- for (typename Triangulation<dim>::active_cell_iterator cell =
- coarse_grid.begin_active();
- cell != coarse_grid.end();
- ++cell)
+ for (auto &cell : coarse_grid.active_cell_iterators())
{
const Point<dim> cell_center = cell->center();