// non-locally_owned cells. so we have to work around the
// issue a little bit by accessing the underlying data
// structures directly
- for (auto cell : dof_handler.active_cell_iterators())
+ for (const auto &cell : dof_handler.active_cell_iterators())
if (cell->is_ghost())
dof_handler.levels[cell->level()]->set_active_fe_index(
cell->index(),
Assert(*p == i, ExcNewNumbersNotConsecutive(i));
}
else
- for (types::global_dof_index i = 0; i < new_numbers.size(); ++i)
- Assert(new_numbers[i] < n_dofs(),
+ for (const auto new_number : new_numbers)
+ Assert(new_number < n_dofs(),
ExcMessage(
"New DoF index is not less than the total number of dofs."));
#endif
const std::vector<types::subdomain_id> &true_subdomain_ids =
shared_tria->get_true_subdomain_ids_of_cells();
- for (auto &cell : active_cell_iterators())
+ for (const auto &cell : active_cell_iterators())
{
const unsigned int index = cell->active_cell_index();
saved_subdomain_ids[index] = cell->subdomain_id();
// Finally, restore current subdomain_ids.
if (shared_tria != nullptr && shared_tria->with_artificial_cells())
- for (auto &cell : active_cell_iterators())
+ for (const auto &cell : active_cell_iterators())
{
if (cell->is_artificial())
cell->set_subdomain_id(numbers::invalid_subdomain_id);
void
DoFLevel::normalize_active_fe_indices()
{
- for (unsigned int i = 0; i < active_fe_indices.size(); ++i)
- if (is_compressed_entry(active_fe_indices[i]))
- active_fe_indices[i] =
- get_toggled_compression_state(active_fe_indices[i]);
+ for (auto &active_fe_index : active_fe_indices)
+ if (is_compressed_entry(active_fe_index))
+ active_fe_index = get_toggled_compression_state(active_fe_index);
}
{
Assert(codim <= dim, ExcImpossibleInDim(dim));
- for (auto it = fes.cbegin(); it != fes.cend(); ++it)
- AssertIndexRange(*it, finite_elements.size());
+ for (const unsigned int fe_index : fes)
+ {
+ (void)fe_index;
+ AssertIndexRange(fe_index, finite_elements.size());
+ }
// If the set of elements to be dominated contains only a single element X,
// then by definition the dominating set contains this single element X
{
Assert(codim <= dim, ExcImpossibleInDim(dim));
- for (auto it = fes.cbegin(); it != fes.cend(); ++it)
- AssertIndexRange(*it, finite_elements.size());
+ for (const unsigned int fe_index : fes)
+ {
+ (void)fe_index;
+ AssertIndexRange(fe_index, finite_elements.size());
+ }
// If the set of elements to be dominated contains only a single element X,
// then by definition the dominating set contains this single element