Assert(this->n_levels() == 1,
ExcMessage("The triangulation is refined!"));
- using FaceVector =
- std::vector<dealii::GridTools::PeriodicFacePair<cell_iterator>>;
- typename FaceVector::const_iterator it, periodic_end;
- it = periodicity_vector.begin();
- periodic_end = periodicity_vector.end();
-
- for (; it < periodic_end; ++it)
+ for (const auto &face_pair : periodicity_vector)
{
- const cell_iterator first_cell = it->cell[0];
- const cell_iterator second_cell = it->cell[1];
- const unsigned int face_left = it->face_idx[0];
- const unsigned int face_right = it->face_idx[1];
+ const cell_iterator first_cell = face_pair.cell[0];
+ const cell_iterator second_cell = face_pair.cell[1];
+ const unsigned int face_left = face_pair.face_idx[0];
+ const unsigned int face_right = face_pair.face_idx[1];
// respective cells of the matching faces in p4est
const unsigned int tree_left =
unsigned int p4est_orientation = 0;
if (dim == 2)
- p4est_orientation = it->orientation[1];
+ p4est_orientation = face_pair.orientation[1];
else
{
const unsigned int face_idx_list[] = {face_left, face_right};
{1, 0, 3, 2},
{1, 3, 0, 2}};
const unsigned int second_dealii_idx_on_face =
- lower_idx == 0 ? left_to_right[it->orientation.to_ulong()]
+ lower_idx == 0 ? left_to_right[face_pair.orientation.to_ulong()]
[first_dealii_idx_on_face] :
- right_to_left[it->orientation.to_ulong()]
+ right_to_left[face_pair.orientation.to_ulong()]
[first_dealii_idx_on_face];
const unsigned int second_dealii_idx_on_cell =
GeometryInfo<dim>::face_to_cell_vertices(