]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Convert explicit loops over faces to range-based loops. 9603/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 3 Mar 2020 00:21:47 +0000 (17:21 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 3 Mar 2020 00:43:44 +0000 (17:43 -0700)
397 files changed:
include/deal.II/fe/fe_tools_extrapolate.templates.h
include/deal.II/fe/fe_tools_interpolate.templates.h
include/deal.II/grid/grid_tools.h
include/deal.II/grid/tria_object.h
include/deal.II/matrix_free/mapping_info.templates.h
include/deal.II/matrix_free/matrix_free.templates.h
include/deal.II/meshworker/loop.h
include/deal.II/meshworker/mesh_loop.h
include/deal.II/numerics/data_out_dof_data.h
include/deal.II/numerics/error_estimator.templates.h
include/deal.II/numerics/vector_tools.templates.h
source/dofs/dof_handler.cc
source/dofs/dof_handler_policy.cc
source/dofs/dof_tools.cc
source/dofs/dof_tools_constraints.cc
source/dofs/dof_tools_sparsity.cc
source/fe/fe_nedelec.cc
source/fe/fe_rannacher_turek.cc
source/fe/mapping_fe_field.cc
source/fe/mapping_manifold.cc
source/fe/mapping_q_generic.cc
source/grid/grid_generator.cc
source/grid/grid_out.cc
source/grid/grid_tools.cc
source/grid/grid_tools_dof_handlers.cc
source/grid/manifold_lib.cc
source/grid/tria.cc
source/grid/tria_accessor.cc
source/grid/tria_description.cc
source/hp/dof_handler.cc
source/multigrid/mg_tools.cc
source/numerics/data_out.cc
source/numerics/data_out_faces.cc
tests/ad_common_tests/step-44-helper_res_lin_01.h
tests/ad_common_tests/step-44-helper_scalar_01.h
tests/ad_common_tests/step-44-helper_var_form_01.h
tests/ad_common_tests/step-44-helper_vector_01.h
tests/adolc/step-44.cc
tests/aniso/mesh_3d_21.cc
tests/base/functions_04.cc
tests/base/functions_singularity.cc
tests/base/geometry_info_1.cc
tests/base/geometry_info_10.cc
tests/base/geometry_info_2.cc
tests/base/geometry_info_3.cc
tests/base/geometry_info_7.cc
tests/base/geometry_info_8.cc
tests/base/geometry_info_9.cc
tests/base/qprojector.cc
tests/bits/cone_03.cc
tests/bits/cone_04.cc
tests/bits/distorted_cells_06.cc
tests/bits/find_cell_6.cc
tests/bits/neighboring_cells_at_two_faces.cc
tests/bits/normals_1.cc
tests/bits/normals_2.cc
tests/bits/normals_3.cc
tests/bits/normals_4.cc
tests/bits/q_point_sum_1.cc
tests/bits/q_point_sum_2.cc
tests/bits/q_point_sum_3.cc
tests/bits/q_point_sum_4.cc
tests/bits/q_points.cc
tests/bits/roy_1.cc
tests/bits/rt_2.cc
tests/bits/static_condensation.cc
tests/bits/step-10-high-order.cc
tests/bits/step-10.cc
tests/bits/step-12.cc
tests/bits/step-14.cc
tests/bits/step-51.cc
tests/bits/step-51p.cc
tests/bits/step-7.cc
tests/bits/volume_1.cc
tests/bits/volume_2.cc
tests/bits/volume_3.cc
tests/bits/volume_4.cc
tests/codim_one/boundary_indicator_01.cc
tests/codim_one/extract_boundary_mesh_03.cc
tests/codim_one/extract_boundary_mesh_04.cc
tests/codim_one/extract_boundary_mesh_11.cc
tests/codim_one/extract_boundary_mesh_13.cc
tests/codim_one/hanging_nodes_02.cc
tests/codim_one/hanging_nodes_03.cc
tests/codim_one/interpolate_boundary_values_01.cc
tests/codim_one/interpolate_boundary_values_01_vector_valued.cc
tests/codim_one/interpolate_boundary_values_02.cc
tests/codim_one/interpolate_boundary_values_02_vector_valued.cc
tests/codim_one/interpolate_boundary_values_03.cc
tests/codim_one/interpolate_boundary_values_1d_closed_ring.cc
tests/cuda/matrix_free_no_index_initialize.cu
tests/data_out/data_out_base.cc
tests/data_out/data_out_curved_cells.cc
tests/dofs/dof_tools_21_b.cc
tests/dofs/dof_tools_21_b_x.cc
tests/dofs/dof_tools_21_b_x_q3.cc
tests/dofs/dof_tools_21_b_y.cc
tests/dofs/dof_tools_21_c.cc
tests/dofs/dof_tools_common.h
tests/dofs/range_based_for_tria_face.cc
tests/fail/circular_01.cc
tests/fail/hp-step-14.cc
tests/fe/abf_01.cc
tests/fe/abf_02.cc
tests/fe/cell_similarity_01.cc
tests/fe/cell_similarity_02.cc
tests/fe/cell_similarity_03.cc
tests/fe/cell_similarity_04.cc
tests/fe/cell_similarity_05.cc
tests/fe/cell_similarity_06.cc
tests/fe/cell_similarity_07.cc
tests/fe/cell_similarity_08.cc
tests/fe/cell_similarity_09.cc
tests/fe/cell_similarity_10.cc
tests/fe/cell_similarity_11.cc
tests/fe/cell_similarity_dgp_monomial_01.cc
tests/fe/cell_similarity_dgp_monomial_02.cc
tests/fe/cell_similarity_dgp_monomial_03.cc
tests/fe/cell_similarity_dgp_monomial_04.cc
tests/fe/cell_similarity_dgp_monomial_05.cc
tests/fe/cell_similarity_dgp_monomial_06.cc
tests/fe/cell_similarity_dgp_monomial_07.cc
tests/fe/cell_similarity_dgp_monomial_08.cc
tests/fe/cell_similarity_dgp_monomial_09.cc
tests/fe/cell_similarity_dgp_monomial_10.cc
tests/fe/cell_similarity_dgp_nonparametric_01.cc
tests/fe/cell_similarity_dgp_nonparametric_02.cc
tests/fe/cell_similarity_dgp_nonparametric_03.cc
tests/fe/cell_similarity_dgp_nonparametric_04.cc
tests/fe/cell_similarity_dgp_nonparametric_05.cc
tests/fe/cell_similarity_dgp_nonparametric_06.cc
tests/fe/cell_similarity_dgp_nonparametric_07.cc
tests/fe/cell_similarity_dgp_nonparametric_08.cc
tests/fe/cell_similarity_dgp_nonparametric_09.cc
tests/fe/cell_similarity_dgp_nonparametric_10.cc
tests/fe/deformed_projection.h
tests/fe/derivatives_face.cc
tests/fe/fe_abf_gradient_divergence_theorem.cc
tests/fe/fe_data_test.cc
tests/fe/fe_dgp_3rd_derivative_divergence_theorem.cc
tests/fe/fe_dgq_3rd_derivative_divergence_theorem.cc
tests/fe/fe_dgq_gradient_divergence_theorem.cc
tests/fe/fe_dgq_hessian_divergence_theorem.cc
tests/fe/fe_enriched_03.cc
tests/fe/fe_enriched_compare_to_fe_system.cc
tests/fe/fe_enriched_compare_to_fe_system_2.cc
tests/fe/fe_enriched_step-36b.cc
tests/fe/fe_face_values_1d.cc
tests/fe/fe_nedelec_gradient_divergence_theorem.cc
tests/fe/fe_nedelec_hessian_divergence_theorem.cc
tests/fe/fe_nedelec_sz_gradient_divergence_theorem.cc
tests/fe/fe_project_3d.cc
tests/fe/fe_q_3rd_derivative_divergence_theorem.cc
tests/fe/fe_q_dg0.cc
tests/fe/fe_q_gradient_divergence_theorem.cc
tests/fe/fe_q_hessian_divergence_theorem.cc
tests/fe/fe_q_hierarchical_3rd_derivative_divergence_theorem.cc
tests/fe/fe_rt_gradient_divergence_theorem.cc
tests/fe/fe_rt_hessian_divergence_theorem.cc
tests/fe/fe_support_points_common.h
tests/fe/fe_system_3rd_derivative_divergence_theorem.cc
tests/fe/fe_values_no_mapping.cc
tests/fe/jacobians_face.cc
tests/fe/jacobians_face_cartesian.cc
tests/fe/jacobians_face_fe_field.cc
tests/fe/nedelec_2.cc
tests/fe/rt_normal_02.cc
tests/fe/rtdiff.cc
tests/fe/rtn_1.cc
tests/fe/shapes.h
tests/feinterface/face_orientation_01.cc
tests/feinterface/fe_interface_values_01.cc
tests/feinterface/fe_interface_values_02.cc
tests/feinterface/fe_interface_values_03.cc
tests/feinterface/fe_interface_values_05.cc
tests/feinterface/fe_interface_values_06.cc
tests/feinterface/fe_interface_values_07.cc
tests/feinterface/fe_interface_values_08.cc
tests/fullydistributed_grids/copy_serial_tria_04.cc
tests/grid/accessor_01.cc
tests/grid/concentric_hyper_shell_01.cc
tests/grid/concentric_hyper_shell_02.cc
tests/grid/extrude_copy_manifold.cc
tests/grid/extrude_orientation_01.cc
tests/grid/extrude_orientation_02.cc
tests/grid/extrude_orientation_03.cc
tests/grid/face_orientations_3d.cc
tests/grid/filtered_iterator_06.cc
tests/grid/grid_generator_10.cc
tests/grid/grid_generator_airfoil_01.cc
tests/grid/grid_generator_half_hyper_shell.cc
tests/grid/grid_generator_hyper_cube_slit_01.cc
tests/grid/grid_generator_plate_with_a_hole.cc
tests/grid/grid_generator_plate_with_a_hole_2.cc
tests/grid/grid_generator_plate_with_a_hole_3.cc
tests/grid/grid_generator_plate_with_a_hole_4.cc
tests/grid/grid_hyper_shell.cc
tests/grid/grid_hyper_shell_05.cc
tests/grid/grid_hyper_shell_06.cc
tests/grid/grid_in_gmsh_01_v4.cc
tests/grid/grid_in_gmsh_01_v41.cc
tests/grid/grid_in_msh_version_4.cc
tests/grid/grid_in_ucd_01.cc
tests/grid/grid_in_ucd_02.cc
tests/grid/grid_in_vtk_3d_04.cc
tests/grid/grid_out_in_vtk_01.cc
tests/grid/grid_parallelepiped_04.cc
tests/grid/grid_tools_05.cc
tests/grid/grid_tools_06.cc
tests/grid/grid_transform.cc
tests/grid/grid_transform_02.cc
tests/grid/grid_transform_03.cc
tests/grid/grid_transform_3d.cc
tests/grid/grid_transform_coefficient.cc
tests/grid/merge_triangulations_02.cc
tests/grid/merge_triangulations_03.cc
tests/grid/merge_triangulations_04.cc
tests/grid/merge_triangulations_07.cc
tests/grid/mesh_3d_10.cc
tests/grid/mesh_3d_11.cc
tests/grid/mesh_3d_13.cc
tests/grid/mesh_3d_14.cc
tests/grid/mesh_3d_15.cc
tests/grid/mesh_3d_16.cc
tests/grid/mesh_3d_17.cc
tests/grid/mesh_3d_20.cc
tests/grid/mesh_3d_21.cc
tests/grid/mesh_3d_4.cc
tests/grid/mesh_3d_5.cc
tests/grid/mesh_3d_6.cc
tests/grid/mesh_3d_7.cc
tests/grid/n_faces_01.cc
tests/grid/normal_vector_01.cc
tests/grid/normal_vector_01_2d.cc
tests/grid/normal_vector_02.cc
tests/grid/normal_vector_02_2d.cc
tests/grid/normal_vector_03.cc
tests/grid/normal_vector_03_2d.cc
tests/grid/normals_at_vertices_01.cc
tests/grid/normals_at_vertices_02.cc
tests/grid/periodicity_01.cc
tests/grid/subcelldata.cc
tests/grid/user_data_01.cc
tests/hp/accessor_0.cc
tests/hp/crash_10.cc
tests/hp/crash_14.cc
tests/hp/hp_constraints_neither_dominate_01.cc
tests/hp/hp_constraints_neither_dominate_02.cc
tests/hp/n_active_fe_indices.cc
tests/hp/step-10.cc
tests/hp/step-12.cc
tests/hp/step-7.cc
tests/integrators/advection_01.cc
tests/integrators/divergence_01.cc
tests/integrators/elasticity_01.cc
tests/integrators/elasticity_02.cc
tests/integrators/grad_div_01.cc
tests/integrators/laplacian_01.cc
tests/integrators/maxwell_curl.cc
tests/lac/constraints_block_01.cc
tests/lac/schur_complement_03.cc
tests/manifold/chart_manifold_02.cc
tests/manifold/chart_manifold_02_embedded.cc
tests/manifold/copy_boundary_to_manifold_id_01.cc
tests/manifold/copy_material_to_manifold_id_01.cc
tests/manifold/flat_manifold_02.cc
tests/manifold/flat_manifold_09.cc
tests/manifold/manifold_id_01.cc
tests/manifold/manifold_id_02.cc
tests/manifold/manifold_id_03.cc
tests/manifold/manifold_id_04.cc
tests/manifold/manifold_id_05.cc
tests/manifold/manifold_id_06.cc
tests/manifold/manifold_id_07.cc
tests/manifold/map_boundary_to_manifold_id_01.cc
tests/manifold/map_boundary_to_manifold_id_02.cc
tests/manifold/set_all_manifold_ids_01.cc
tests/manifold/set_all_manifold_ids_02.cc
tests/manifold/spherical_manifold_09.cc
tests/manifold/spherical_manifold_10.cc
tests/manifold/spherical_manifold_12.cc
tests/manifold/transfinite_manifold_01.cc
tests/manifold/transfinite_manifold_02.cc
tests/manifold/transfinite_manifold_03.cc
tests/manifold/transfinite_manifold_04.cc
tests/manifold/transfinite_manifold_05.cc
tests/manifold/transfinite_manifold_06.cc
tests/manifold/transfinite_manifold_07.cc
tests/manifold/transfinite_manifold_08.cc
tests/manifold/transfinite_manifold_09.cc
tests/manifold/transfinite_manifold_10.cc
tests/manifold/tria_accessor_point_01.cc
tests/manifold/tria_accessor_point_02.cc
tests/manifold/tria_boundary_id_01.cc
tests/mappings/fe_face_values_1d_mapping_cartesian.cc
tests/mappings/fe_face_values_1d_mapping_q2.cc
tests/mappings/mapping.cc
tests/mappings/mapping_c1.cc
tests/mappings/mapping_manifold_05.cc
tests/mappings/mapping_manifold_06.cc
tests/mappings/mapping_manifold_07.cc
tests/mappings/mapping_project_01.cc
tests/matrix_free/assemble_matrix_01.cc
tests/matrix_free/assemble_matrix_02.cc
tests/matrix_free/assemble_matrix_03.cc
tests/matrix_free/compare_faces_by_cells.cc
tests/matrix_free/get_functions_circle.cc
tests/matrix_free/get_functions_gl.cc
tests/matrix_free/get_functions_mappingq.cc
tests/matrix_free/get_functions_notempl.cc
tests/matrix_free/get_functions_q_hierarchical.cc
tests/matrix_free/get_functions_rect.cc
tests/matrix_free/integrate_functions.cc
tests/matrix_free/integrate_functions_multife.cc
tests/matrix_free/inverse_mass_01.cc
tests/matrix_free/inverse_mass_03.cc
tests/matrix_free/inverse_mass_05.cc
tests/matrix_free/inverse_mass_06.cc
tests/matrix_free/matrix_vector_07.cc
tests/matrix_free/matrix_vector_14.cc
tests/matrix_free/matrix_vector_14_notempl.cc
tests/matrix_free/matrix_vector_14b.cc
tests/matrix_free/matrix_vector_15.cc
tests/matrix_free/matrix_vector_16.cc
tests/matrix_free/matrix_vector_17.cc
tests/matrix_free/matrix_vector_curl.cc
tests/matrix_free/matrix_vector_faces_14.cc
tests/matrix_free/matrix_vector_faces_16.cc
tests/matrix_free/matrix_vector_faces_18.cc
tests/matrix_free/matrix_vector_faces_20.cc
tests/matrix_free/matrix_vector_faces_21.cc
tests/matrix_free/matrix_vector_faces_22.cc
tests/matrix_free/matrix_vector_faces_23.cc
tests/matrix_free/matrix_vector_hp.cc
tests/matrix_free/matrix_vector_mg.cc
tests/matrix_free/multigrid_dg_sip_02.cc
tests/matrix_free/no_index_initialize.cc
tests/matrix_free/parallel_multigrid.cc
tests/matrix_free/parallel_multigrid_fullydistributed.cc
tests/matrix_free/parallel_multigrid_mf.cc
tests/matrix_free/quadrature_points.cc
tests/matrix_free/read_cell_data_02.cc
tests/meshworker/scratch_data_03.cc
tests/mpi/distribute_flux_sparsity_pattern.cc
tests/mpi/fe_field_function_02.cc
tests/mpi/hp_constraints_consistent_01.cc
tests/mpi/hp_constraints_consistent_02.cc
tests/mpi/hp_constraints_consistent_03.cc
tests/mpi/mg_05.cc
tests/mpi/mg_06.cc
tests/mpi/mg_ghost_dofs_periodic_01.cc
tests/mpi/mg_ghost_dofs_periodic_03.cc
tests/mpi/mg_ghost_dofs_periodic_04.cc
tests/mpi/mg_ghost_dofs_periodic_05.cc
tests/mpi/mg_ghost_dofs_periodic_06.cc
tests/mpi/mg_ghost_dofs_periodic_07.cc
tests/mpi/p4est_2d_ghost_01.cc
tests/mpi/p4est_2d_ghost_02.cc
tests/mpi/p4est_3d_ghost_01.cc
tests/mpi/periodicity_03.cc
tests/mpi/periodicity_04.cc
tests/mpi/periodicity_05.cc
tests/mpi/periodicity_06.cc
tests/mpi/periodicity_07.cc
tests/mpi/renumber_cuthill_mckee_03.cc
tests/mpi/step-40_cuthill_mckee.cc
tests/mpi/step-40_cuthill_mckee_MPI-subset.cc
tests/multigrid/constrained_dofs_05.cc
tests/multigrid/dof_02.cc
tests/multigrid/mg_output_dirichlet.cc
tests/multigrid/mg_output_neumann.cc
tests/numerics/kelly_crash_02.cc
tests/numerics/no_flux_01.cc
tests/numerics/no_flux_02.cc
tests/numerics/no_flux_05.cc
tests/numerics/no_flux_10.cc
tests/numerics/no_flux_11.cc
tests/numerics/no_flux_hp_01.cc
tests/numerics/no_flux_hp_02.cc
tests/numerics/no_flux_hp_05.cc
tests/numerics/normal_flux_01.cc
tests/numerics/normal_flux_02.cc
tests/numerics/normal_flux_hp_01.cc
tests/numerics/normal_flux_inhom_01.cc
tests/numerics/project_bv_div_conf_03.cc
tests/numerics/tangential_flux_inhom_01.cc
tests/optimization/step-44.h
tests/physics/step-18-rotation_matrix.cc
tests/physics/step-18.cc
tests/physics/step-44-standard_tensors-material_push_forward.cc
tests/physics/step-44-standard_tensors-spatial.cc
tests/physics/step-44.cc
tests/serialization/dof_handler_01.cc
tests/serialization/hp_dof_handler_01.cc
tests/serialization/triangulation_01.cc
tests/serialization/triangulation_02.cc
tests/trilinos/elide_zeros.cc

index 336772f0fed5a26002abdbcb0989b83de623669e..7a970f9747afadee3f9332e0c3460b057e368f4b 100644 (file)
@@ -1425,9 +1425,8 @@ namespace FETools
             if (cell->is_ghost())
               {
                 cell->get_dof_indices(indices);
-                for (unsigned int face = 0;
-                     face < GeometryInfo<dim>::faces_per_cell;
-                     ++face)
+                for (const unsigned int face :
+                     GeometryInfo<dim>::face_indices())
                   if (!cell->at_boundary(face))
                     {
                       const typename DoFHandler<dim, spacedim>::cell_iterator
index c4fcf8c82ffa4aa47dce372f4e838e2aeff09e51..b069a9eb35667be94ad2856feb526e2c6f170b05 100644 (file)
@@ -176,9 +176,7 @@ namespace FETools
              (constraints.n_constraints() == 0));
 
           if (hanging_nodes_not_allowed)
-            for (unsigned int face = 0;
-                 face < GeometryInfo<dim>::faces_per_cell;
-                 ++face)
+            for (const unsigned int face : GeometryInfo<dim>::face_indices())
               Assert(cell1->at_boundary(face) ||
                        cell1->neighbor(face)->level() == cell1->level(),
                      ExcHangingNodesNotAllowed());
@@ -334,9 +332,7 @@ namespace FETools
             (cell->get_fe().dofs_per_vertex != 0) || (fe2.dofs_per_vertex != 0);
 
           if (hanging_nodes_not_allowed)
-            for (unsigned int face = 0;
-                 face < GeometryInfo<dim>::faces_per_cell;
-                 ++face)
+            for (const unsigned int face : GeometryInfo<dim>::face_indices())
               Assert(cell->at_boundary(face) ||
                        cell->neighbor(face)->level() == cell->level(),
                      ExcHangingNodesNotAllowed());
@@ -671,9 +667,7 @@ namespace FETools
           (subdomain_id == numbers::invalid_subdomain_id))
         {
           if (hanging_nodes_not_allowed)
-            for (unsigned int face = 0;
-                 face < GeometryInfo<dim>::faces_per_cell;
-                 ++face)
+            for (const unsigned int face : GeometryInfo<dim>::face_indices())
               Assert(cell->at_boundary(face) ||
                        cell->neighbor(face)->level() == cell->level(),
                      ExcHangingNodesNotAllowed());
index 67a8ed6bb0ccb7d562fe4a6020b5c873c332966f..d891ea3bdd6095ad2590e77318385ba65c4cec8e 100644 (file)
@@ -3243,9 +3243,8 @@ namespace GridTools
     std::vector<typename MeshType::active_cell_iterator> &active_neighbors)
   {
     active_neighbors.clear();
-    for (unsigned int n = 0;
-         n < GeometryInfo<MeshType::dimension>::faces_per_cell;
-         ++n)
+    for (const unsigned int n :
+         GeometryInfo<MeshType::dimension>::face_indices())
       if (!cell->at_boundary(n))
         {
           if (MeshType::dimension == 1)
index 854e3a431a91738bce46636552afd773f8731831..40976bebf04c2199d90f6a47a64a609ae41ff00f 100644 (file)
@@ -117,7 +117,7 @@ namespace internal
     template <int structdim>
     inline TriaObject<structdim>::TriaObject()
     {
-      for (unsigned int i = 0; i < GeometryInfo<structdim>::faces_per_cell; ++i)
+      for (const unsigned int i : GeometryInfo<structdim>::face_indices())
         faces[i] = -1;
     }
 
index 7c02c202c48be35c5cdf1a079bdb31afced07cb3..4074240891f14f2e5b6511bdf6b54549356d23f1 100644 (file)
@@ -1963,9 +1963,7 @@ namespace internal
               cell_type.size() * GeometryInfo<dim>::faces_per_cell);
           std::size_t storage_length = 0;
           for (unsigned int i = 0; i < cell_type.size(); ++i)
-            for (unsigned int face = 0;
-                 face < GeometryInfo<dim>::faces_per_cell;
-                 ++face)
+            for (const unsigned int face : GeometryInfo<dim>::face_indices())
               {
                 if (cell_type[i] <= affine)
                   {
index 3c98ada2a25adeec69bf38d5973b8521a0b2c6b3..7cd7dd18c085a77b777a5481a83dbd53378f31a9 100644 (file)
@@ -1147,9 +1147,7 @@ MatrixFree<dim, Number, VectorizedArrayType>::initialize_indices(
                    cell != dof_handler.end(additional_data.mg_level + 1);
                    ++cell)
                 if (cell->level_subdomain_id() == task_info.my_pid)
-                  for (unsigned int f = 0;
-                       f < GeometryInfo<dim>::faces_per_cell;
-                       ++f)
+                  for (const unsigned int f : GeometryInfo<dim>::face_indices())
                     if ((cell->at_boundary(f) == false ||
                          cell->has_periodic_neighbor(f) == true) &&
                         cell->level() >
index 390a01552d0aa95e230dddb5d648babbe1f34b75..2868c09469210d9969c6ee09096c98247383cfb0 100644 (file)
@@ -245,11 +245,8 @@ namespace MeshWorker
     info.post_cell(dof_info);
 
     if (integrate_interior_face || integrate_boundary)
-      for (unsigned int face_no = 0;
-           face_no <
-           GeometryInfo<
-             ITERATOR::AccessorType::Container::dimension>::faces_per_cell;
-           ++face_no)
+      for (const unsigned int face_no : GeometryInfo<
+             ITERATOR::AccessorType::Container::dimension>::face_indices())
         {
           typename ITERATOR::AccessorType::Container::face_iterator face =
             cell->face(face_no);
index e809d5da806de56fdd79f4c7ce9a5cd8cd5d7998..58f4d1e2f354b9334c74884da963d15373f0f014 100644 (file)
@@ -293,10 +293,9 @@ namespace MeshWorker
         cell_worker(cell, scratch, copy);
 
       if (flags & (work_on_faces | work_on_boundary))
-        for (unsigned int face_no = 0;
-             face_no < GeometryInfo<CellIteratorBaseType::AccessorType::
-                                      Container::dimension>::faces_per_cell;
-             ++face_no)
+        for (const unsigned int face_no :
+             GeometryInfo<CellIteratorBaseType::AccessorType::Container::
+                            dimension>::face_indices())
           {
             if (cell->at_boundary(face_no) &&
                 !cell->has_periodic_neighbor(face_no))
index d7e3af8630e489cad75f2e9ac04ad6fdb6a3d3e5..2164aa86bf3ee3b87ef1f14d641c53d9bb80fe31 100644 (file)
@@ -1195,7 +1195,7 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::merge_patches(
 
   // adjust patch neighbors
   for (unsigned int i = old_n_patches; i < patches.size(); ++i)
-    for (unsigned int n = 0; n < GeometryInfo<patch_dim>::faces_per_cell; ++n)
+    for (const unsigned int n : GeometryInfo<patch_dim>::face_indices())
       if (patches[i].neighbors[n] != Patch::no_neighbor)
         patches[i].neighbors[n] += old_n_patches;
 }
index 78594efeb6c2c7bf7521c334a59855e6a79e694d..815a42eed76587f5986a5640a3a09f7a4dc54998 100644 (file)
@@ -1350,9 +1350,7 @@ KellyErrorEstimator<dim, spacedim>::estimate(
          (cell->material_id() == material_id)))
       {
         // loop over all faces of this cell
-        for (unsigned int face_no = 0;
-             face_no < GeometryInfo<dim>::faces_per_cell;
-             ++face_no)
+        for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
           {
             Assert(face_integrals.find(cell->face(face_no)) !=
                      face_integrals.end(),
index 3520aadf0f00e2b1e43bb2ba705fcae4ae90eb02..ce59c09993fcd5b1968cb5eda48ef8a426740a6a 100644 (file)
@@ -2828,9 +2828,8 @@ namespace VectorTools
                  cell = dof.begin_active();
                cell != dof.end();
                ++cell)
-            for (unsigned int direction = 0;
-                 direction < GeometryInfo<dim>::faces_per_cell;
-                 ++direction)
+            for (const unsigned int direction :
+                 GeometryInfo<dim>::face_indices())
               if (cell->at_boundary(direction) &&
                   (function_map.find(cell->face(direction)->boundary_id()) !=
                    function_map.end()))
@@ -2954,9 +2953,8 @@ namespace VectorTools
             endc = dof.end();
           for (; cell != endc; ++cell)
             if (!cell->is_artificial())
-              for (unsigned int face_no = 0;
-                   face_no < GeometryInfo<dim>::faces_per_cell;
-                   ++face_no)
+              for (const unsigned int face_no :
+                   GeometryInfo<dim>::face_indices())
                 {
                   const FiniteElement<dim, spacedim> &fe = cell->get_fe();
 
@@ -4914,9 +4912,8 @@ namespace VectorTools
           {
             for (; cell != dof_handler.end(); ++cell)
               if (cell->at_boundary() && cell->is_locally_owned())
-                for (unsigned int face = 0;
-                     face < GeometryInfo<dim>::faces_per_cell;
-                     ++face)
+                for (const unsigned int face :
+                     GeometryInfo<dim>::face_indices())
                   if (cell->face(face)->boundary_id() == boundary_component)
                     {
                       // if the FE is a
@@ -4990,9 +4987,7 @@ namespace VectorTools
             const unsigned int    degree = superdegree - 1;
             hp::QCollection<dim>  edge_quadrature_collection;
 
-            for (unsigned int face = 0;
-                 face < GeometryInfo<dim>::faces_per_cell;
-                 ++face)
+            for (const unsigned int face : GeometryInfo<dim>::face_indices())
               for (unsigned int line = 0;
                    line < GeometryInfo<dim>::lines_per_face;
                    ++line)
@@ -5012,9 +5007,8 @@ namespace VectorTools
 
             for (; cell != dof_handler.end(); ++cell)
               if (cell->at_boundary() && cell->is_locally_owned())
-                for (unsigned int face = 0;
-                     face < GeometryInfo<dim>::faces_per_cell;
-                     ++face)
+                for (const unsigned int face :
+                     GeometryInfo<dim>::face_indices())
                   if (cell->face(face)->boundary_id() == boundary_component)
                     {
                       // if the FE is a
@@ -5149,9 +5143,8 @@ namespace VectorTools
           {
             for (; cell != dof_handler.end(); ++cell)
               if (cell->at_boundary() && cell->is_locally_owned())
-                for (unsigned int face = 0;
-                     face < GeometryInfo<dim>::faces_per_cell;
-                     ++face)
+                for (const unsigned int face :
+                     GeometryInfo<dim>::face_indices())
                   if (cell->face(face)->boundary_id() == boundary_component)
                     {
                       // if the FE is a FE_Nothing object there is no work to do
@@ -5220,9 +5213,8 @@ namespace VectorTools
                 const QGauss<dim - 2> reference_edge_quadrature(
                   2 * fe_collection[i].degree);
 
-                for (unsigned int face = 0;
-                     face < GeometryInfo<dim>::faces_per_cell;
-                     ++face)
+                for (const unsigned int face :
+                     GeometryInfo<dim>::face_indices())
                   for (unsigned int line = 0;
                        line < GeometryInfo<dim>::lines_per_face;
                        ++line)
@@ -5243,9 +5235,8 @@ namespace VectorTools
 
             for (; cell != dof_handler.end(); ++cell)
               if (cell->at_boundary() && cell->is_locally_owned())
-                for (unsigned int face = 0;
-                     face < GeometryInfo<dim>::faces_per_cell;
-                     ++face)
+                for (const unsigned int face :
+                     GeometryInfo<dim>::face_indices())
                   if (cell->face(face)->boundary_id() == boundary_component)
                     {
                       // if the FE is a FE_Nothing object there is no work to do
@@ -6115,9 +6106,8 @@ namespace VectorTools
                 {
                   if (cell->at_boundary() && cell->is_locally_owned())
                     {
-                      for (unsigned int face = 0;
-                           face < GeometryInfo<dim>::faces_per_cell;
-                           ++face)
+                      for (const unsigned int face :
+                           GeometryInfo<dim>::face_indices())
                         {
                           if (cell->face(face)->boundary_id() ==
                               boundary_component)
@@ -6212,9 +6202,8 @@ namespace VectorTools
                 {
                   const QGauss<dim - 2> reference_edge_quadrature(
                     2 * fe_collection[i].degree + 1);
-                  for (unsigned int face = 0;
-                       face < GeometryInfo<dim>::faces_per_cell;
-                       ++face)
+                  for (const unsigned int face :
+                       GeometryInfo<dim>::face_indices())
                     {
                       for (unsigned int line = 0;
                            line < GeometryInfo<dim>::lines_per_face;
@@ -6241,9 +6230,8 @@ namespace VectorTools
                 {
                   if (cell->at_boundary() && cell->is_locally_owned())
                     {
-                      for (unsigned int face = 0;
-                           face < GeometryInfo<dim>::faces_per_cell;
-                           ++face)
+                      for (const unsigned int face :
+                           GeometryInfo<dim>::face_indices())
                         {
                           if (cell->face(face)->boundary_id() ==
                               boundary_component)
@@ -6668,9 +6656,8 @@ namespace VectorTools
                  cell != dof_handler.end();
                  ++cell)
               if (cell->at_boundary() && cell->is_locally_owned())
-                for (unsigned int face = 0;
-                     face < GeometryInfo<dim>::faces_per_cell;
-                     ++face)
+                for (const unsigned int face :
+                     GeometryInfo<dim>::face_indices())
                   if (cell->face(face)->boundary_id() == boundary_component)
                     {
                       // if the FE is a
@@ -6741,9 +6728,8 @@ namespace VectorTools
                  cell != dof_handler.end();
                  ++cell)
               if (cell->at_boundary() && cell->is_locally_owned())
-                for (unsigned int face = 0;
-                     face < GeometryInfo<dim>::faces_per_cell;
-                     ++face)
+                for (const unsigned int face :
+                     GeometryInfo<dim>::face_indices())
                   if (cell->face(face)->boundary_id() == boundary_component)
                     {
                       // This is only implemented, if the FE is a
@@ -6847,9 +6833,8 @@ namespace VectorTools
                  cell != dof_handler.end();
                  ++cell)
               if (cell->at_boundary() && cell->is_locally_owned())
-                for (unsigned int face = 0;
-                     face < GeometryInfo<dim>::faces_per_cell;
-                     ++face)
+                for (const unsigned int face :
+                     GeometryInfo<dim>::face_indices())
                   if (cell->face(face)->boundary_id() == boundary_component)
                     {
                       // This is only
@@ -6905,9 +6890,8 @@ namespace VectorTools
                  cell != dof_handler.end();
                  ++cell)
               if (cell->at_boundary() && cell->is_locally_owned())
-                for (unsigned int face = 0;
-                     face < GeometryInfo<dim>::faces_per_cell;
-                     ++face)
+                for (const unsigned int face :
+                     GeometryInfo<dim>::face_indices())
                   if (cell->face(face)->boundary_id() == boundary_component)
                     {
                       // This is only
@@ -7064,9 +7048,7 @@ namespace VectorTools
     std::set<types::boundary_id>::iterator b_id;
     for (; cell != endc; ++cell)
       if (!cell->is_artificial())
-        for (unsigned int face_no = 0;
-             face_no < GeometryInfo<dim>::faces_per_cell;
-             ++face_no)
+        for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
           if ((b_id = boundary_ids.find(cell->face(face_no)->boundary_id())) !=
               boundary_ids.end())
             {
@@ -7664,9 +7646,7 @@ namespace VectorTools
          cell != dof_handler.end();
          ++cell)
       if (!cell->is_artificial())
-        for (unsigned int face_no = 0;
-             face_no < GeometryInfo<dim>::faces_per_cell;
-             ++face_no)
+        for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
           if ((b_id = boundary_ids.find(cell->face(face_no)->boundary_id())) !=
               boundary_ids.end())
             {
index 2145bd5b90cef36fa906e781b64ca8c1a531db5a..b5efafe0bf79c087254234db94a2147bd87f0a47 100644 (file)
@@ -1114,9 +1114,8 @@ DoFHandler<dim, spacedim>::n_boundary_dofs() const
     {
       if (cell->is_locally_owned() && cell->at_boundary())
         {
-          for (unsigned int iface = 0;
-               iface < dealii::GeometryInfo<dim>::faces_per_cell;
-               ++iface)
+          for (const unsigned int iface :
+               dealii::GeometryInfo<dim>::face_indices())
             {
               const auto face = cell->face(iface);
               if (face->at_boundary())
@@ -1172,9 +1171,8 @@ DoFHandler<dim, spacedim>::n_boundary_dofs(
     {
       if (cell->is_locally_owned() && cell->at_boundary())
         {
-          for (unsigned int iface = 0;
-               iface < dealii::GeometryInfo<dim>::faces_per_cell;
-               ++iface)
+          for (const unsigned int iface :
+               dealii::GeometryInfo<dim>::face_indices())
             {
               const auto         face        = cell->face(iface);
               const unsigned int boundary_id = face->boundary_id();
index e62fd07c9244b7d3b8564b0a1f6b00333e8577c3..cde3c40aa844b98e45afbb257f9f3793c2d5df09 100644 (file)
@@ -289,8 +289,7 @@ namespace internal
 
           // for the four sides
           if (dof_handler.get_fe().dofs_per_line > 0)
-            for (unsigned int side = 0; side < GeometryInfo<2>::faces_per_cell;
-                 ++side)
+            for (const unsigned int side : GeometryInfo<2>::face_indices())
               {
                 const typename DoFHandler<2, spacedim>::line_iterator line =
                   cell->line(side);
@@ -2208,8 +2207,7 @@ namespace internal
 
           // for the four sides
           if (cell->get_fe().dofs_per_line > 0)
-            for (unsigned int side = 0; side < GeometryInfo<2>::faces_per_cell;
-                 ++side)
+            for (const unsigned int side : GeometryInfo<2>::face_indices())
               {
                 typename DoFHandler<dim, spacedim>::line_iterator line =
                   cell->line(side);
@@ -3211,9 +3209,8 @@ namespace internal
               for (cell = dof_handler.begin(level); cell != endc; ++cell)
                 if (cell->level_subdomain_id() !=
                     numbers::artificial_subdomain_id)
-                  for (unsigned int line = 0;
-                       line < GeometryInfo<2>::faces_per_cell;
-                       ++line)
+                  for (const unsigned int line :
+                       GeometryInfo<2>::face_indices())
                     cell->face(line)->set_user_flag();
 
               for (typename DoFHandler<2, spacedim>::cell_iterator cell =
index 19c9b83a4f7af10454d594daaaeca7ee4d4bf610..0044ee55204e085994bd70721d31ea6bbfe04d2c 100644 (file)
@@ -705,9 +705,8 @@ namespace DoFTools
       // only work on cells that are either locally owned or at least ghost
       // cells
       if (cell->is_artificial() == false)
-        for (unsigned int face = 0;
-             face < GeometryInfo<DoFHandlerType::dimension>::faces_per_cell;
-             ++face)
+        for (const unsigned int face :
+             GeometryInfo<DoFHandlerType::dimension>::face_indices())
           if (cell->at_boundary(face))
             if (!check_boundary_id ||
                 (boundary_ids.find(cell->face(face)->boundary_id()) !=
@@ -810,9 +809,8 @@ namespace DoFTools
            dof_handler.begin_active();
          cell != dof_handler.end();
          ++cell)
-      for (unsigned int face = 0;
-           face < GeometryInfo<DoFHandlerType::dimension>::faces_per_cell;
-           ++face)
+      for (const unsigned int face :
+           GeometryInfo<DoFHandlerType::dimension>::face_indices())
         if (cell->at_boundary(face))
           if (!check_boundary_id ||
               (boundary_ids.find(cell->face(face)->boundary_id()) !=
@@ -993,9 +991,7 @@ namespace DoFTools
         for (const auto &cell : dof_handler.active_cell_iterators())
           if (!cell->is_artificial())
             {
-              for (unsigned int face = 0;
-                   face < GeometryInfo<dim>::faces_per_cell;
-                   ++face)
+              for (const unsigned int face : GeometryInfo<dim>::face_indices())
                 if (cell->face(face)->has_children())
                   {
                     const typename dealii::DoFHandler<dim,
@@ -2140,9 +2136,8 @@ namespace DoFTools
                                                     dof_handler.begin_active(),
                                                   endc = dof_handler.end();
     for (; cell != endc; ++cell)
-      for (unsigned int f = 0;
-           f < GeometryInfo<DoFHandlerType::dimension>::faces_per_cell;
-           ++f)
+      for (const unsigned int f :
+           GeometryInfo<DoFHandlerType::dimension>::face_indices())
         if (cell->at_boundary(f))
           {
             const unsigned int dofs_per_face = cell->get_fe().dofs_per_face;
@@ -2186,9 +2181,8 @@ namespace DoFTools
                                                     dof_handler.begin_active(),
                                                   endc = dof_handler.end();
     for (; cell != endc; ++cell)
-      for (unsigned int f = 0;
-           f < GeometryInfo<DoFHandlerType::dimension>::faces_per_cell;
-           ++f)
+      for (const unsigned int f :
+           GeometryInfo<DoFHandlerType::dimension>::face_indices())
         if (boundary_ids.find(cell->face(f)->boundary_id()) !=
             boundary_ids.end())
           {
@@ -2580,9 +2574,8 @@ namespace DoFTools
             std::fill(exclude.begin(), exclude.end(), false);
             const unsigned int dpf = fe.dofs_per_face;
 
-            for (unsigned int face = 0;
-                 face < GeometryInfo<DoFHandlerType::dimension>::faces_per_cell;
-                 ++face)
+            for (const unsigned int face :
+                 GeometryInfo<DoFHandlerType::dimension>::face_indices())
               if (cell->at_boundary(face) ||
                   cell->neighbor(face)->level() != cell->level())
                 for (unsigned int i = 0; i < dpf; ++i)
@@ -2655,10 +2648,8 @@ namespace DoFTools
                 // Now remove all degrees of freedom on the domain boundary
                 // from the exclusion list
                 if (boundary_dofs)
-                  for (unsigned int face = 0;
-                       face <
-                       GeometryInfo<DoFHandlerType::dimension>::faces_per_cell;
-                       ++face)
+                  for (const unsigned int face :
+                       GeometryInfo<DoFHandlerType::dimension>::face_indices())
                     if (cell->at_boundary(face))
                       for (unsigned int i = 0; i < dpf; ++i)
                         exclude[fe.face_to_cell_index(i, face)] = false;
index f11ce89b9d493d174ca71bb126737aa4e34a7f69..8f7a4a34aac77642519251eea095da493de9fcc1 100644 (file)
@@ -3444,9 +3444,7 @@ namespace DoFTools
           cell_dofs.resize(fe.dofs_per_cell);
           cell->get_dof_indices(cell_dofs);
 
-          for (unsigned int face_no = 0;
-               face_no < GeometryInfo<dim>::faces_per_cell;
-               ++face_no)
+          for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
             {
               const typename DoFHandlerType<dim, spacedim>::face_iterator face =
                 cell->face(face_no);
index 62c2f5ebf5c07ab4c630e272733512c3ab27d15f..1f13706cc2784c7b9db28694fa66fb00eec2d062 100644 (file)
@@ -399,9 +399,8 @@ namespace DoFTools
     typename DoFHandlerType::active_cell_iterator cell = dof.begin_active(),
                                                   endc = dof.end();
     for (; cell != endc; ++cell)
-      for (unsigned int f = 0;
-           f < GeometryInfo<DoFHandlerType::dimension>::faces_per_cell;
-           ++f)
+      for (const unsigned int f :
+           GeometryInfo<DoFHandlerType::dimension>::face_indices())
         if (cell->at_boundary(f))
           {
             const unsigned int dofs_per_face = cell->get_fe().dofs_per_face;
@@ -494,9 +493,8 @@ namespace DoFTools
     typename DoFHandlerType::active_cell_iterator cell = dof.begin_active(),
                                                   endc = dof.end();
     for (; cell != endc; ++cell)
-      for (unsigned int f = 0;
-           f < GeometryInfo<DoFHandlerType::dimension>::faces_per_cell;
-           ++f)
+      for (const unsigned int f :
+           GeometryInfo<DoFHandlerType::dimension>::face_indices())
         if (boundary_ids.find(cell->face(f)->boundary_id()) !=
             boundary_ids.end())
           {
@@ -578,9 +576,8 @@ namespace DoFTools
                                                   sparsity,
                                                   keep_constrained_dofs);
 
-          for (unsigned int face = 0;
-               face < GeometryInfo<DoFHandlerType::dimension>::faces_per_cell;
-               ++face)
+          for (const unsigned int face :
+               GeometryInfo<DoFHandlerType::dimension>::face_indices())
             {
               typename DoFHandlerType::face_iterator cell_face =
                 cell->face(face);
@@ -817,9 +814,8 @@ namespace DoFTools
                                                       keep_constrained_dofs,
                                                       bool_int_dof_mask);
               // Loop over all interior neighbors
-              for (unsigned int face_n = 0;
-                   face_n < GeometryInfo<dim>::faces_per_cell;
-                   ++face_n)
+              for (const unsigned int face_n :
+                   GeometryInfo<dim>::face_indices())
                 {
                   const typename DoFHandler<dim, spacedim>::face_iterator
                     cell_face = cell->face(face_n);
@@ -1147,9 +1143,7 @@ namespace DoFTools
                 bool_int_and_flux_dof_mask[cell->active_fe_index()]);
 
               // Loop over interior faces
-              for (unsigned int face = 0;
-                   face < GeometryInfo<dim>::faces_per_cell;
-                   ++face)
+              for (const unsigned int face : GeometryInfo<dim>::face_indices())
                 {
                   const typename dealii::hp::DoFHandler<dim,
                                                         spacedim>::face_iterator
index b105aa9f4e880f83a82a6b4a364381e1f0b4cff8..611f20ac4ee2f91253a527efd818e83ba96aad8d 100644 (file)
@@ -3528,9 +3528,7 @@ FE_Nedelec<dim>::convert_generalized_support_point_values_to_dof_values(
                                                 {2, 3, 0, 1},
                                                 {6, 7, 4, 5}};
 
-              for (unsigned int face = 0;
-                   face < GeometryInfo<dim>::faces_per_cell;
-                   ++face)
+              for (const unsigned int face : GeometryInfo<dim>::face_indices())
                 {
                   // Set up the right hand side
                   // for the horizontal shape
index 5f4c7572df996df8d26c72c9f11b46655b27ff1a..24d4a5714bc35a38f7e87ff03828503829778b19 100644 (file)
@@ -123,8 +123,7 @@ FE_RannacherTurek<dim>::convert_generalized_support_point_values_to_dof_values(
 
   std::vector<Vector<double>>::const_iterator value =
     support_point_values.begin();
-  for (unsigned int face = 0; face < dealii::GeometryInfo<dim>::faces_per_cell;
-       ++face)
+  for (const unsigned int face : dealii::GeometryInfo<dim>::face_indices())
     {
       for (unsigned int q = 0; q < q_points_per_face; ++q)
         {
index 7135428678263727558da449ac5029358f930aef..f01bd9cdb69ba3ce66e91ff2d566fd0a4be93b32 100644 (file)
@@ -581,7 +581,7 @@ MappingFEField<dim, spacedim, VectorType, DoFHandlerType>::compute_face_data(
             dim - 1, std::vector<Tensor<1, spacedim>>(n_original_q_points));
 
           // Compute tangentials to the unit cell.
-          for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+          for (const unsigned int i : GeometryInfo<dim>::face_indices())
             {
               data.unit_tangentials[i].resize(n_original_q_points);
               std::fill(data.unit_tangentials[i].begin(),
index fa37729a20a116b146d13426cc668b1f1b3c32db..5a2c5ee830bd535a21db938acc3f9cbabffce992 100644 (file)
@@ -117,7 +117,7 @@ MappingManifold<dim, spacedim>::InternalData::initialize_face(
                      std::vector<Tensor<1, spacedim>>(n_original_q_points));
 
           // Compute tangentials to the unit cell.
-          for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+          for (const unsigned int i : GeometryInfo<dim>::face_indices())
             {
               unit_tangentials[i].resize(n_original_q_points);
               std::fill(unit_tangentials[i].begin(),
index f65cca2a4118ca89bf77e8e6dcd3e8cdef048de9..ed7d7ce4d46d1cd132c3efd9e1c7f7352997668d 100644 (file)
@@ -841,7 +841,7 @@ MappingQGeneric<dim, spacedim>::InternalData::initialize_face(
                      std::vector<Tensor<1, spacedim>>(n_original_q_points));
 
           // Compute tangentials to the unit cell.
-          for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+          for (const unsigned int i : GeometryInfo<dim>::face_indices())
             {
               unit_tangentials[i].resize(n_original_q_points);
               std::fill(unit_tangentials[i].begin(),
index e496d471635067492041d5fc68f2c3d57673dd2b..1474276e919b04a5bbe7181cc9e47c643813c52f 100644 (file)
@@ -2402,9 +2402,7 @@ namespace GridGenerator
                                                           endc = tria.end();
         for (; cell != endc; ++cell)
           {
-            for (unsigned int face = 0;
-                 face < GeometryInfo<dim>::faces_per_cell;
-                 ++face)
+            for (const unsigned int face : GeometryInfo<dim>::face_indices())
               {
                 if (cell->face(face)->at_boundary())
                   cell->face(face)->set_boundary_id(face);
@@ -3372,9 +3370,7 @@ namespace GridGenerator
         // grid around the cylinder to the new TFI manifold id.
         if (cell->manifold_id() == tfi_manifold_id)
           {
-            for (unsigned int face_n = 0;
-                 face_n < GeometryInfo<2>::faces_per_cell;
-                 ++face_n)
+            for (const unsigned int face_n : GeometryInfo<2>::face_indices())
               {
                 const auto &face = cell->face(face_n);
                 if (face->at_boundary() &&
@@ -3398,8 +3394,7 @@ namespace GridGenerator
       std::numeric_limits<double>::epsilon() * 10000;
     if (colorize)
       for (const auto &cell : tria.active_cell_iterators())
-        for (unsigned int face_n = 0; face_n < GeometryInfo<2>::faces_per_cell;
-             ++face_n)
+        for (const unsigned int face_n : GeometryInfo<2>::face_indices())
           {
             const auto face = cell->face(face_n);
             if (face->at_boundary())
@@ -3582,8 +3577,7 @@ namespace GridGenerator
     for (const auto &cell : cylinder_tria.active_cell_iterators())
       {
         cell->set_manifold_id(tfi_manifold_id);
-        for (unsigned int face_n = 0; face_n < GeometryInfo<2>::faces_per_cell;
-             ++face_n)
+        for (const unsigned int face_n : GeometryInfo<2>::face_indices())
           if (!cell->face(face_n)->at_boundary())
             cell->face(face_n)->set_manifold_id(tfi_manifold_id);
       }
@@ -6649,9 +6643,7 @@ namespace GridGenerator
       };
     if (colorize)
       for (const auto &cell : triangulation.active_cell_iterators())
-        for (unsigned int face_n = 0;
-             face_n < GeometryInfo<dim>::faces_per_cell;
-             ++face_n)
+        for (const unsigned int face_n : GeometryInfo<dim>::face_indices())
           {
             auto face = cell->face(face_n);
             if (face->at_boundary())
index c8d9551d7946a7d16ca1eb56fc08f87944138ad2..7df2c15a099c4ed61d0722edc24403f34ae7a3a3 100644 (file)
@@ -4069,9 +4069,8 @@ namespace internal
             // cell is at boundary and we are to treat curved boundaries. so
             // loop over all faces and draw them as small pieces of lines
             {
-              for (unsigned int face_no = 0;
-                   face_no < GeometryInfo<dim>::faces_per_cell;
-                   ++face_no)
+              for (const unsigned int face_no :
+                   GeometryInfo<dim>::face_indices())
                 {
                   const typename dealii::Triangulation<dim,
                                                        spacedim>::face_iterator
@@ -4221,9 +4220,8 @@ namespace internal
             }
           else
             {
-              for (unsigned int face_no = 0;
-                   face_no < GeometryInfo<dim>::faces_per_cell;
-                   ++face_no)
+              for (const unsigned int face_no :
+                   GeometryInfo<dim>::face_indices())
                 {
                   const typename dealii::Triangulation<dim,
                                                        spacedim>::face_iterator
@@ -4541,9 +4539,8 @@ namespace internal
                   // generate the info from
                   // them
                   for (const auto &cell : tria.active_cell_iterators())
-                    for (unsigned int face_no = 0;
-                         face_no < GeometryInfo<dim>::faces_per_cell;
-                         ++face_no)
+                    for (const unsigned int face_no :
+                         GeometryInfo<dim>::face_indices())
                       {
                         const typename dealii::Triangulation<dim, spacedim>::
                           face_iterator face = cell->face(face_no);
index e952a8150201d199b4be3ea136a9abf1204d955d..daa42cc498b9f50f7f372f05b372eef7a58bc263 100644 (file)
@@ -682,9 +682,7 @@ namespace GridTools
         // Save face data
         if (dim > 1)
           {
-            for (unsigned int face_n = 0;
-                 face_n < GeometryInfo<dim>::faces_per_cell;
-                 ++face_n)
+            for (const unsigned int face_n : GeometryInfo<dim>::face_indices())
               face_data.insert_face_data(cell->face(face_n));
           }
         // Save line data
@@ -1482,9 +1480,7 @@ namespace GridTools
           endc = triangulation.end();
         for (; cell != endc; ++cell)
           if (!cell->is_artificial())
-            for (unsigned int face = 0;
-                 face < GeometryInfo<dim>::faces_per_cell;
-                 ++face)
+            for (const unsigned int face : GeometryInfo<dim>::face_indices())
               if (cell->face(face)->has_children() &&
                   !cell->face(face)->at_boundary())
                 {
@@ -3566,8 +3562,7 @@ namespace GridTools
           Iterator::AccessorType::structure_dimension;
 
         double diameter = object->diameter();
-        for (unsigned int f = 0; f < GeometryInfo<structdim>::faces_per_cell;
-             ++f)
+        for (const unsigned int f : GeometryInfo<structdim>::face_indices())
           for (unsigned int e = f + 1;
                e < GeometryInfo<structdim>::faces_per_cell;
                ++e)
index 47584b90e7434e5dc85e84dc89365b8637e66282..46a3ad2b052ee33be0e3ca52b706b3ea89c05a11 100644 (file)
@@ -1403,9 +1403,8 @@ namespace GridTools
 
     std::vector<typename MeshType::active_cell_iterator> patch;
     patch.push_back(cell);
-    for (unsigned int face_number = 0;
-         face_number < GeometryInfo<MeshType::dimension>::faces_per_cell;
-         ++face_number)
+    for (const unsigned int face_number :
+         GeometryInfo<MeshType::dimension>::face_indices())
       if (cell->face(face_number)->at_boundary() == false)
         {
           if (cell->neighbor(face_number)->has_children() == false)
@@ -1816,9 +1815,8 @@ namespace GridTools
             // face (or line).
 
             // Take care of dofs on neighbor faces
-            for (unsigned int f = 0;
-                 f < GeometryInfo<DoFHandlerType::dimension>::faces_per_cell;
-                 ++f)
+            for (const unsigned int f :
+                 GeometryInfo<DoFHandlerType::dimension>::face_indices())
               {
                 if (cell->face(f)->has_children())
                   {
index 1b8657e790f68b251365490e9c8a433d294bdf6b..d7de8a91dc649037f2a7aa630cecff4e20cee7cf 100644 (file)
@@ -1864,8 +1864,7 @@ namespace
           make_array_view(weights.begin(), weights.end());
         const auto points_view = make_array_view(points.begin(), points.end());
 
-        for (unsigned int face = 0; face < GeometryInfo<3>::faces_per_cell;
-             ++face)
+        for (const unsigned int face : GeometryInfo<3>::face_indices())
           {
             const double       my_weight = linear_shapes[face];
             const unsigned int face_even = face - face % 2;
index bb39d652c0b810a663e37761a34f61978d7efc2f..354fb5098559e0c0d4cdcca1af65ef68bc3104fc 100644 (file)
@@ -2020,9 +2020,7 @@ namespace internal
                                                 vertex,
                                                 triangulation.vertices.size()));
 
-            for (unsigned int line = 0;
-                 line < GeometryInfo<dim>::faces_per_cell;
-                 ++line)
+            for (const unsigned int line : GeometryInfo<dim>::face_indices())
               {
                 // given a line vertex number (0,1) on a specific line
                 // we get the cell vertex number (0-4) through the
@@ -2568,9 +2566,7 @@ namespace internal
                                                                          0)]);
               }
 
-            for (unsigned int face = 0;
-                 face < GeometryInfo<dim>::faces_per_cell;
-                 ++face)
+            for (const unsigned int face : GeometryInfo<dim>::face_indices())
               {
                 // set up a list of the lines to be
                 // used for this face. check the
@@ -2794,9 +2790,7 @@ namespace internal
               bool face_orientation[GeometryInfo<dim>::faces_per_cell];
               bool face_flip[GeometryInfo<dim>::faces_per_cell];
               bool face_rotation[GeometryInfo<dim>::faces_per_cell];
-              for (unsigned int face = 0;
-                   face < GeometryInfo<dim>::faces_per_cell;
-                   ++face)
+              for (const unsigned int face : GeometryInfo<dim>::face_indices())
                 {
                   for (unsigned int l = 0;
                        l < GeometryInfo<dim>::lines_per_face;
@@ -2970,9 +2964,7 @@ namespace internal
 
               // set orientation flag for
               // each of the faces
-              for (unsigned int quad = 0;
-                   quad < GeometryInfo<dim>::faces_per_cell;
-                   ++quad)
+              for (const unsigned int quad : GeometryInfo<dim>::face_indices())
                 {
                   cell->set_face_orientation(quad, face_orientation[quad]);
                   cell->set_face_flip(quad, face_flip[quad]);
@@ -3003,9 +2995,7 @@ namespace internal
               // coinciding lines once)
               std::multimap<unsigned int, std::pair<unsigned int, unsigned int>>
                 cell_to_face_lines;
-              for (unsigned int face = 0;
-                   face < GeometryInfo<dim>::faces_per_cell;
-                   ++face)
+              for (const unsigned int face : GeometryInfo<dim>::face_indices())
                 for (unsigned int line = 0;
                      line < GeometryInfo<dim>::lines_per_face;
                      ++line)
@@ -3779,9 +3769,7 @@ namespace internal
         // can delete them. first for quads (and
         // their inner lines).
 
-        for (unsigned int quad_no = 0;
-             quad_no < GeometryInfo<dim>::faces_per_cell;
-             ++quad_no)
+        for (const unsigned int quad_no : GeometryInfo<dim>::face_indices())
           {
             typename Triangulation<dim, spacedim>::quad_iterator quad =
               cell->face(quad_no);
@@ -3976,9 +3964,8 @@ namespace internal
                                      h < triangulation.levels[l]
                                            ->cells.cells.size();
                                      ++h)
-                                  for (unsigned int q = 0;
-                                       q < GeometryInfo<dim>::faces_per_cell;
-                                       ++q)
+                                  for (const unsigned int q :
+                                       GeometryInfo<dim>::face_indices())
                                     {
                                       const int index = triangulation.levels[l]
                                                           ->cells.cells[h]
@@ -4473,9 +4460,7 @@ namespace internal
             // lines 0-7 already exist, create only the four interior
             // lines 8-11
             unsigned int l = 0;
-            for (unsigned int face_no = 0;
-                 face_no < GeometryInfo<dim>::faces_per_cell;
-                 ++face_no)
+            for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
               for (unsigned int c = 0; c < 2; ++c, ++l)
                 new_lines[l] = cell->line(face_no)->child(c);
             Assert(l == 8, ExcInternalError());
@@ -5036,9 +5021,8 @@ namespace internal
                   // refine them is rather difficult for lines so we
                   // only flag them and after visiting all cells, we
                   // decide which lines need refinement;
-                  for (unsigned int line_no = 0;
-                       line_no < GeometryInfo<dim>::faces_per_cell;
-                       ++line_no)
+                  for (const unsigned int line_no :
+                       GeometryInfo<dim>::face_indices())
                     {
                       if (GeometryInfo<dim>::face_refinement_case(
                             cell->refine_flag_set(), line_no) ==
@@ -5396,9 +5380,8 @@ namespace internal
                   // these is difficult so we only flag them and after
                   // visiting all cells, we decide which faces need
                   // which refinement;
-                  for (unsigned int face = 0;
-                       face < GeometryInfo<dim>::faces_per_cell;
-                       ++face)
+                  for (const unsigned int face :
+                       GeometryInfo<dim>::face_indices())
                     {
                       typename Triangulation<dim, spacedim>::face_iterator
                         aface = acell->face(face);
@@ -6088,9 +6071,8 @@ namespace internal
                                    h <
                                    triangulation.levels[l]->cells.cells.size();
                                    ++h)
-                                for (unsigned int q = 0;
-                                     q < GeometryInfo<dim>::faces_per_cell;
-                                     ++q)
+                                for (const unsigned int q :
+                                     GeometryInfo<dim>::face_indices())
                                   {
                                     const int face_index =
                                       triangulation.levels[l]
@@ -6806,9 +6788,8 @@ namespace internal
                       // face_rotation flags. however, the latter two
                       // are set to false by default as this is the
                       // standard value
-                      for (unsigned int f = 0;
-                           f < GeometryInfo<dim>::faces_per_cell;
-                           ++f)
+                      for (const unsigned int f :
+                           GeometryInfo<dim>::face_indices())
                         {
                           new_hexes[i]->set_face_orientation(f, true);
                           new_hexes[i]->set_face_flip(f, false);
@@ -9684,9 +9665,7 @@ namespace internal
                   // face_orientation, face_flip and face_rotation,
                   // which are inherited from the corresponding face
                   // of the mother cube
-                  for (unsigned int f = 0;
-                       f < GeometryInfo<dim>::faces_per_cell;
-                       ++f)
+                  for (const unsigned int f : GeometryInfo<dim>::face_indices())
                     for (unsigned int s = 0;
                          s < std::max(GeometryInfo<dim - 1>::n_children(
                                         GeometryInfo<dim>::face_refinement_case(
@@ -9779,9 +9758,8 @@ namespace internal
               // anisotropic refinement. Therefore, we have a closer
               // look
               const RefinementCase<dim> ref_case = cell->refine_flag_set();
-              for (unsigned int face_no = 0;
-                   face_no < GeometryInfo<dim>::faces_per_cell;
-                   ++face_no)
+              for (const unsigned int face_no :
+                   GeometryInfo<dim>::face_indices())
                 if (cell->face(face_no)->at_boundary())
                   {
                     // this is the critical face at the boundary.
@@ -14038,9 +14016,7 @@ namespace
             // there were any unrefined neighbors at all, see if any
             // of those will have to be refined as well
             if (unrefined_neighbors > 0)
-              for (unsigned int face = 0;
-                   face < GeometryInfo<dim>::faces_per_cell;
-                   ++face)
+              for (const unsigned int face : GeometryInfo<dim>::face_indices())
                 if (!cell->at_boundary(face) &&
                     (face_will_be_refined_by_neighbor(cell, face) == false) &&
                     (cell->neighbor(face)->has_children() == false) &&
@@ -14311,9 +14287,8 @@ Triangulation<dim, spacedim>::prepare_coarsening_and_refinement()
                     // cycle
                     unsigned int unrefined_neighbors = 0, total_neighbors = 0;
 
-                    for (unsigned int n = 0;
-                         n < GeometryInfo<dim>::faces_per_cell;
-                         ++n)
+                    for (const unsigned int n :
+                         GeometryInfo<dim>::face_indices())
                       {
                         const cell_iterator neighbor = cell->neighbor(n);
                         if (neighbor.state() == IteratorState::valid)
index 6176d1bb62523c91507d887eacb1b587d959a5c8..efc1c01a62dc9ddb89a497e2e187b99aa57533cc 100644 (file)
@@ -2232,9 +2232,7 @@ CellAccessor<dim, spacedim>::neighbor_of_neighbor_internal(
     // neighbors and find the number
     // the hard way
     {
-      for (unsigned int face_no = 0;
-           face_no < GeometryInfo<dim>::faces_per_cell;
-           ++face_no)
+      for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
         if (neighbor_cell->face_index(face_no) == this_face_index)
           return face_no;
 
@@ -2325,9 +2323,7 @@ CellAccessor<dim, spacedim>::neighbor_of_coarser_neighbor(
           // we need to loop over all faces
           // and subfaces and find the
           // number the hard way
-          for (unsigned int face_no = 0;
-               face_no < GeometryInfo<2>::faces_per_cell;
-               ++face_no)
+          for (const unsigned int face_no : GeometryInfo<2>::face_indices())
             {
               if (face_no != face_no_guess)
                 {
@@ -2398,9 +2394,7 @@ CellAccessor<dim, spacedim>::neighbor_of_coarser_neighbor(
 
           // if the guess was false, then we need to loop over all faces and
           // subfaces and find the number the hard way
-          for (unsigned int face_no = 0;
-               face_no < GeometryInfo<3>::faces_per_cell;
-               ++face_no)
+          for (const unsigned int face_no : GeometryInfo<3>::face_indices())
             {
               if (face_no == face_no_guess)
                 continue;
index 4f843c349d450280085589786ccc2005cb8a6ceb..5d34c7d9138cc46314d80ed900de6ee6446f6d3d 100644 (file)
@@ -476,9 +476,7 @@ namespace TriangulationDescription
                   cell_info.id = cell->id().template to_binary<dim>();
 
                   // save boundary_ids of each face of this cell
-                  for (unsigned int f = 0;
-                       f < GeometryInfo<dim>::faces_per_cell;
-                       ++f)
+                  for (const unsigned int f : GeometryInfo<dim>::face_indices())
                     {
                       types::boundary_id boundary_ind =
                         cell->face(f)->boundary_id();
index be33ba35e25d59265bd4e750cb8fdfbcefdad9d2..5723a253fa57c905fd0bbc6a08851e33f7df0594 100644 (file)
@@ -447,9 +447,8 @@ namespace internal
 
             for (const auto &cell : dof_handler.active_cell_iterators())
               if (!cell->is_artificial())
-                for (unsigned int face = 0;
-                     face < GeometryInfo<dim>::faces_per_cell;
-                     ++face)
+                for (const unsigned int face :
+                     GeometryInfo<dim>::face_indices())
                   if (cell->face(face)->user_flag_set() == false)
                     {
                       // Ok, face has not been visited. So we need to
@@ -539,9 +538,8 @@ namespace internal
 
             for (const auto &cell : dof_handler.active_cell_iterators())
               if (!cell->is_artificial())
-                for (unsigned int face = 0;
-                     face < GeometryInfo<dim>::faces_per_cell;
-                     ++face)
+                for (const unsigned int face :
+                     GeometryInfo<dim>::face_indices())
                   if (!cell->face(face)->user_flag_set())
                     {
                       // Same decision tree as before
index c1d515835eaa57793c173aab94e6155216c906ac..70a3fa81d84ed9664503d863ebcf5681de03bde4 100644 (file)
@@ -1325,9 +1325,7 @@ namespace MGTools
             const unsigned int        level = cell->level();
             local_dofs.resize(fe.dofs_per_face);
 
-            for (unsigned int face_no = 0;
-                 face_no < GeometryInfo<dim>::faces_per_cell;
-                 ++face_no)
+            for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
               if (cell->at_boundary(face_no) == true)
                 {
                   const typename DoFHandler<dim, spacedim>::face_iterator face =
@@ -1354,9 +1352,7 @@ namespace MGTools
           if (dof.get_triangulation().locally_owned_subdomain() ==
                 numbers::invalid_subdomain_id ||
               cell->level_subdomain_id() != numbers::artificial_subdomain_id)
-            for (unsigned int face_no = 0;
-                 face_no < GeometryInfo<dim>::faces_per_cell;
-                 ++face_no)
+            for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
               {
                 if (cell->at_boundary(face_no) == false)
                   continue;
@@ -1487,9 +1483,7 @@ namespace MGTools
                   cell_dofs_interface.end(),
                   false);
 
-        for (unsigned int face_nr = 0;
-             face_nr < GeometryInfo<dim>::faces_per_cell;
-             ++face_nr)
+        for (const unsigned int face_nr : GeometryInfo<dim>::face_indices())
           {
             const typename DoFHandler<dim, spacedim>::face_iterator face =
               cell->face(face_nr);
@@ -1568,9 +1562,7 @@ namespace MGTools
 
         std::fill(cell_dofs.begin(), cell_dofs.end(), false);
 
-        for (unsigned int face_nr = 0;
-             face_nr < GeometryInfo<dim>::faces_per_cell;
-             ++face_nr)
+        for (const unsigned int face_nr : GeometryInfo<dim>::face_indices())
           {
             const typename DoFHandler<dim, spacedim>::face_iterator face =
               cell->face(face_nr);
index 38f34d08e746cfbf7b9091194293d550db26d853..b33264a4f065a572523cd538d3a6f96def3231ad 100644 (file)
@@ -791,9 +791,8 @@ DataOut<dim, DoFHandlerType>::build_one_patch(
     }
 
 
-  for (unsigned int f = 0;
-       f < GeometryInfo<DoFHandlerType::dimension>::faces_per_cell;
-       ++f)
+  for (const unsigned int f :
+       GeometryInfo<DoFHandlerType::dimension>::face_indices())
     {
       // let's look up whether the neighbor behind that face is noted in the
       // table of cells which we treat. this can only happen if the neighbor
index 376f30926ed4c4098f88d02e420e5d10bb0a2dbc..46e27e839e67e9537056bff63a6e394b4a37398a 100644 (file)
@@ -424,7 +424,7 @@ DataOutFaces<dim, DoFHandlerType>::first_face()
     cell = this->triangulation->begin_active();
   for (; cell != this->triangulation->end(); ++cell)
     if (cell->is_locally_owned())
-      for (unsigned int f = 0; f < GeometryInfo<dimension>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dimension>::face_indices())
         if (!surface_only || cell->face(f)->at_boundary())
           return FaceDescriptor(cell, f);
 
@@ -471,8 +471,7 @@ DataOutFaces<dim, DoFHandlerType>::next_face(const FaceDescriptor &old_face)
       // check all the faces of this active cell. but skip it altogether
       // if it isn't locally owned
       if (active_cell->is_locally_owned())
-        for (unsigned int f = 0; f < GeometryInfo<dimension>::faces_per_cell;
-             ++f)
+        for (const unsigned int f : GeometryInfo<dimension>::face_indices())
           if (!surface_only || active_cell->face(f)->at_boundary())
             {
               face.first  = active_cell;
index 00160721412738e18ded50f459b144df8b398989..6372cbb4b98f7d4fdb7c22ca8ed0091b57e51551 100644 (file)
@@ -834,8 +834,7 @@ namespace Step44
                                                       endc =
                                                         triangulation.end();
     for (; cell != endc; ++cell)
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         {
           if (cell->face(face)->at_boundary() == true &&
               cell->face(face)->center()[1] == 1.0 * parameters.scale)
@@ -1275,8 +1274,7 @@ namespace Step44
                   Assert(i_group <= J_dof, ExcInternalError());
               }
           }
-        for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-             ++face)
+        for (const unsigned int face : GeometryInfo<dim>::face_indices())
           if (cell->face(face)->at_boundary() == true &&
               cell->face(face)->boundary_id() == 6)
             {
index 7117e17973f19b9db218d2dd4860738c850b2706..6bc36540e8b3e402231d037f9e25914eb99d5ad3 100644 (file)
@@ -1237,8 +1237,7 @@ namespace Step44
                                                       endc =
                                                         triangulation.end();
     for (; cell != endc; ++cell)
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         {
           if (cell->face(face)->at_boundary() == true &&
               cell->face(face)->center()[1] == 1.0 * parameters.scale)
@@ -1827,8 +1826,7 @@ namespace Step44
               Assert(i_group <= J_dof, ExcInternalError());
           }
       }
-    for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-         ++face)
+    for (const unsigned int face : GeometryInfo<dim>::face_indices())
       if (cell->face(face)->at_boundary() == true &&
           cell->face(face)->boundary_id() == 6)
         {
index 4921d1f4bed9ca4eac9a9772dbc414fa77fb62df..4988f19ef534385e1d9506c92f4e7384cb2d7423 100644 (file)
@@ -800,8 +800,7 @@ namespace Step44
                                                       endc =
                                                         triangulation.end();
     for (; cell != endc; ++cell)
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         {
           if (cell->face(face)->at_boundary() == true &&
               cell->face(face)->center()[1] == 1.0 * parameters.scale)
@@ -1206,8 +1205,7 @@ namespace Step44
               lqph[q_point]->get_Psi(F, p_tilde[q_point], J_tilde[q_point]) *
               JxW;
           }
-        for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-             ++face)
+        for (const unsigned int face : GeometryInfo<dim>::face_indices())
           if (cell->face(face)->at_boundary() == true &&
               cell->face(face)->boundary_id() == 6)
             {
index d3f34e496d9b0edecebf74ad56b9048402107350..bb416e79b3ff7d4c46d0bb5e41d39af3c0b1332b 100644 (file)
@@ -835,8 +835,7 @@ namespace Step44
                                                       endc =
                                                         triangulation.end();
     for (; cell != endc; ++cell)
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         {
           if (cell->face(face)->at_boundary() == true &&
               cell->face(face)->center()[1] == 1.0 * parameters.scale)
@@ -1295,8 +1294,7 @@ namespace Step44
                   Assert(i_group <= J_dof, ExcInternalError());
               }
           }
-        for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-             ++face)
+        for (const unsigned int face : GeometryInfo<dim>::face_indices())
           if (cell->face(face)->at_boundary() == true &&
               cell->face(face)->boundary_id() == 6)
             {
index 0769b9eac908d2149bc4ab06883d137748ba82ad..a549e37c7708a356e6e342b748fee37c613edce1 100644 (file)
@@ -1072,8 +1072,7 @@ namespace Step44
                                                       endc =
                                                         triangulation.end();
     for (; cell != endc; ++cell)
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         {
           if (cell->face(face)->at_boundary() == true &&
               cell->face(face)->center()[1] == 1.0 * parameters.scale)
@@ -1636,8 +1635,7 @@ namespace Step44
               Assert(i_group <= J_dof, ExcInternalError());
           }
       }
-    for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-         ++face)
+    for (const unsigned int face : GeometryInfo<dim>::face_indices())
       if (cell->face(face)->at_boundary() == true &&
           cell->face(face)->boundary_id() == 6)
         {
index 6f64a66786cd7cd16887c5bceb1d651186a6d39a..21f8402c4bf09ca9926bc21449bd23c8898fb716 100644 (file)
@@ -63,8 +63,7 @@ void check_this(Triangulation<3> &tria)
 
   DoFHandler<3>::active_cell_iterator cell = dof_handler.begin_active();
   for (; cell != dof_handler.end(); ++cell)
-    for (unsigned int face_no = 0; face_no < GeometryInfo<3>::faces_per_cell;
-         ++face_no)
+    for (const unsigned int face_no : GeometryInfo<3>::face_indices())
       if (!cell->at_boundary(face_no) && cell->face(face_no)->has_children())
         for (unsigned int subface_no = 0;
              subface_no < cell->face(face_no)->number_of_children();
index 3400686da318f20a19aec5f2534cf8267cc33616..9b3f796dca992bf4262ccba7ff783ff100e22fb3 100644 (file)
@@ -57,7 +57,7 @@ check_function(const Functions::FlowFunction<dim> &f,
             patches[0].vertices[vertex_number](2) = -1. + 2. * iz;
           ++vertex_number;
         }
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     patches[0].neighbors[i] = numbers::invalid_unsigned_int;
   patches[0].patch_index          = 0;
   patches[0].n_subdivisions       = sub;
index 8e980889b47db862c8336806fc8436fd3d409fe3..ce0740be9a4ae5f03370e4c465ce8ad2adf1af69 100644 (file)
@@ -97,7 +97,7 @@ check_function_derivative(const Functions::FlowFunction<dim> &f,
             patches[0].vertices[vertex_number](2) = -1. + 2. * iz;
           ++vertex_number;
         }
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     patches[0].neighbors[i] = numbers::invalid_unsigned_int;
   patches[0].patch_index          = 0;
   patches[0].n_subdivisions       = sub;
index 06f2607c4466b7af0b25e23bf88014e9732695b8..1960ba2b70a165a8f8dae245bbf4a4f2f13421b9 100644 (file)
@@ -34,7 +34,7 @@ void
 test()
 {
   // Output normal directions for each face
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     {
       deallog << "Face " << f << ": n = ( ";
       for (unsigned int d = 0; d < dim; ++d)
index 01e586cc36fb6d6073a0191da0cd1a00821bf21b..a12456896d2b980b73ba6a18aba596296834f759 100644 (file)
@@ -24,7 +24,7 @@ template <int dim>
 void
 test()
 {
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     {
       const Tensor<1, dim> unit_normal_vector =
         GeometryInfo<dim>::unit_normal_vector[i];
index 2a2be27682318d4d3cc82d3de23c6176495e730d..23c6f5c6299e32e5629cfc43ae7bff4a7ae1b497 100644 (file)
@@ -48,12 +48,12 @@ test()
   deallog << "quads_per_face    " << GeometryInfo<dim>::quads_per_face
           << std::endl;
 
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     deallog << "face normal" << f << ' '
             << (GeometryInfo<dim>::unit_normal_orientation[f] > 0. ? '+' : '-')
             << "x" << GeometryInfo<dim>::unit_normal_direction[f] << std::endl;
 
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     {
       deallog << "face_children" << f << "[true ]";
       for (unsigned int v = 0; v < GeometryInfo<dim>::max_children_per_face;
@@ -71,7 +71,7 @@ test()
       deallog << std::endl;
     }
 
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     {
       deallog << "face_vertices" << f << "[true ]";
       for (unsigned int v = 0; v < GeometryInfo<dim>::vertices_per_face; ++v)
@@ -83,7 +83,7 @@ test()
       deallog << std::endl;
     }
 
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     {
       deallog << "face_lines" << f << "[true ]";
       for (unsigned int v = 1; v <= GeometryInfo<dim>::lines_per_face; ++v)
index e955744fc5d48a8a19ab5134c0275fde17d9c487..06d6d7a2dd7aa14dd31aaec78911e6a7f1da69aa 100644 (file)
@@ -29,7 +29,7 @@ test()
 {
   deallog << "Checking in " << dim << "d" << std::endl;
 
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     for (unsigned int v = 0; v < GeometryInfo<dim>::vertices_per_face; ++v)
       {
         deallog << "Face " << f << ", vertex=" << v << ": ";
@@ -38,7 +38,7 @@ test()
       }
 
   if (dim == 3)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       for (unsigned int v = 0; v < GeometryInfo<dim>::vertices_per_face; ++v)
         {
           deallog << "Face " << f << ", vertex=" << v
index b061869042e2ab52b8169024940d2af3807ca1d0..f83e7a1483e913bfd0748af5163185e4a38e6777 100644 (file)
@@ -38,7 +38,7 @@ test()
     for (unsigned int v = 0; v < GeometryInfo<dim>::vertices_per_cell; ++v)
       vertices[v] = GeometryInfo<dim>::unit_cell_vertex(v);
 
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       {
         Point<dim> face_vertices[GeometryInfo<dim>::vertices_per_face];
         for (unsigned int v = 0; v < GeometryInfo<dim>::vertices_per_face; ++v)
@@ -67,7 +67,7 @@ test()
         vertices[v][0] /= 10;
       }
 
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       {
         Point<dim> face_vertices[GeometryInfo<dim>::vertices_per_face];
         for (unsigned int v = 0; v < GeometryInfo<dim>::vertices_per_face; ++v)
@@ -117,7 +117,7 @@ test()
           }
       }
 
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       {
         Point<dim> face_vertices[GeometryInfo<dim>::vertices_per_face];
         for (unsigned int v = 0; v < GeometryInfo<dim>::vertices_per_face; ++v)
@@ -156,7 +156,7 @@ test()
       vertices[v] = GeometryInfo<dim>::unit_cell_vertex(v);
     vertices[1] /= 10;
 
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       {
         Point<dim> face_vertices[GeometryInfo<dim>::vertices_per_face];
         for (unsigned int v = 0; v < GeometryInfo<dim>::vertices_per_face; ++v)
@@ -179,7 +179,7 @@ test()
       vertices[v] = GeometryInfo<dim>::unit_cell_vertex(v);
     std::swap(vertices[0], vertices[1]);
 
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       {
         Point<dim> face_vertices[GeometryInfo<dim>::vertices_per_face];
         for (unsigned int v = 0; v < GeometryInfo<dim>::vertices_per_face; ++v)
index e87e608a163024e02b892ccda2136b952e8fa9c3..6fc0ffe5df1f32f837eff51eaaa2b09b7dcded23 100644 (file)
@@ -33,7 +33,7 @@ test_vertices()
 {
   deallog << dim << "D:" << std::endl;
 
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     {
       deallog << "face " << i << ":" << std::endl;
 
@@ -66,7 +66,7 @@ test_lines()
 {
   deallog << dim << "D:" << std::endl;
 
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     {
       deallog << "face " << i << ":" << std::endl;
 
index 221c3fef47145bbac198151fde8eb52651cfb9cd..468d0f17fe14209fa691a7cd8abd2b6598ab4c02 100644 (file)
@@ -30,7 +30,7 @@ template <int dim>
 void
 test()
 {
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     {
       const Tensor<1, dim> unit_normal_vector =
         GeometryInfo<dim>::unit_normal_vector[i];
index 15c3c547e374fa234a9118a1c3878169da7444da..8b54cdd28fea83ff1b33c617d715e7ee88c37a01 100644 (file)
@@ -56,7 +56,7 @@ void check_face(Quadrature<1> &q1)
   deallog << "Checking dim " << dim << " 1d-points " << q1.size() << std::endl;
 
   Quadrature<dim - 1> subquadrature(q1);
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     {
       deallog << "Face " << f << std::endl;
 
@@ -66,7 +66,7 @@ void check_face(Quadrature<1> &q1)
         deallog << quadrature.point(k) << std::endl;
     }
 
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     for (unsigned int s = 0; s < GeometryInfo<dim>::max_children_per_face; ++s)
       {
         deallog << "Face " << f << " subface " << s << std::endl;
@@ -91,7 +91,7 @@ void check_faces(Quadrature<1> &q1)
 
   Quadrature<dim> faces = QProjector<dim>::project_to_all_faces(subquadrature);
 
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     {
       deallog << "Face " << f << " orientation false" << std::endl;
 
index 9babb3616c9bdc9008a0d7d6822125dbcb7b6d62..6824c7c43df6150f5c34e07cad595462c76c7a6a 100644 (file)
@@ -57,8 +57,7 @@ check<2>()
 
   const typename Triangulation<dim>::active_cell_iterator cell =
     triangulation.begin_active();
-  for (unsigned int face_no = 0; face_no < GeometryInfo<dim>::faces_per_cell;
-       ++face_no)
+  for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
     {
       const typename Triangulation<dim>::face_iterator face =
         cell->face(face_no);
@@ -88,8 +87,7 @@ check<3>()
 
   const typename Triangulation<dim>::active_cell_iterator cell =
     triangulation.begin_active();
-  for (unsigned int face_no = 0; face_no < GeometryInfo<dim>::faces_per_cell;
-       ++face_no)
+  for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
     {
       const typename Triangulation<dim>::face_iterator face =
         cell->face(face_no);
index 0ad891bcc4aec95597dd68b277c9979d6db15b28..52f400ef25d51352e9d7fda5adc8340907dd92c1 100644 (file)
@@ -40,8 +40,7 @@ check()
   triangulation.refine_global(2);
 
   for (const auto &cell : triangulation.active_cell_iterators())
-    for (unsigned int face_no = 0; face_no < GeometryInfo<dim>::faces_per_cell;
-         ++face_no)
+    for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
       {
         const auto face = cell->face(face_no);
         if (face->boundary_id() == 0)
index c76fd0dad158246bf2aee45f4fc32c2c224943c4..2c80a7b41ecb5a71c02af01944a76c8e4506aefe 100644 (file)
@@ -83,7 +83,7 @@ check()
   GridGenerator::subdivided_hyper_rectangle(coarse_grid, sub, p1, p2, true);
 
   // set bottom middle edge to use MyManifold
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     for (unsigned int e = 0; e < GeometryInfo<dim - 1>::faces_per_cell; ++e)
       if (coarse_grid.begin_active()->face(f)->line(e)->center()[0] == 0)
         if (coarse_grid.begin_active()->face(f)->line(e)->center()[1] == 0.5)
index 7c21b41d606d04ce634c4455cb55e5ee5e39dd69..7d9971d3648a2cda1bdd88b8c8d59ee3ae5a679d 100644 (file)
@@ -91,7 +91,7 @@ check1()
       for (Triangulation<3>::active_cell_iterator cell = tria.begin_active();
            cell != tria.end();
            ++cell)
-        for (unsigned int f = 0; f < GeometryInfo<3>::faces_per_cell; ++f)
+        for (const unsigned int f : GeometryInfo<3>::face_indices())
           {
             if (cell->face(f)->at_boundary() && (Testing::rand() % 5) == 1)
               cell->set_refine_flag();
index 5f7912ead8a3b9ce4c884f8b1b929ab80843d72b..81705d7300dd7fac727f8e81a7195e53c91c66bb 100644 (file)
@@ -84,7 +84,7 @@ void
 check_neighbors(const Triangulation<2> &tria)
 {
   Triangulation<2>::cell_iterator cell = tria.begin();
-  for (unsigned int f = 0; f < GeometryInfo<2>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<2>::face_indices())
     if (cell->neighbor(f).state() == IteratorState::valid)
       {
         const unsigned int neighbor_neighbor = cell->neighbor_of_neighbor(f);
index 8c09162537e097c2574bc32f5525fc5948281979..1fa1cc48464b57ff6a53bf78a92006edac4d9795 100644 (file)
@@ -63,7 +63,7 @@ check(const Triangulation<dim> &tria)
       // and make sure that the
       // result of the integration is
       // close to zero
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           fe_face_values.reinit(cell, f);
           for (unsigned int q = 0; q < q_face.size(); ++q)
@@ -75,7 +75,7 @@ check(const Triangulation<dim> &tria)
 
       // now same for subface
       // integration
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         for (unsigned int sf = 0; sf < GeometryInfo<dim>::max_children_per_face;
              ++sf)
           {
index 304bf6200a2bc8b99b9f848cd40b71007770d9d8..477d9efbd17d8675cd3b61f8d21b90fd2793118f 100644 (file)
@@ -72,7 +72,7 @@ check(const Triangulation<dim> &tria, const unsigned int order)
       // and make sure that the
       // result of the integration is
       // close to zero
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           fe_face_values.reinit(cell, f);
           for (unsigned int q = 0; q < q_face.size(); ++q)
@@ -84,7 +84,7 @@ check(const Triangulation<dim> &tria, const unsigned int order)
 
       // now same for subface
       // integration
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         for (unsigned int sf = 0; sf < GeometryInfo<dim>::max_children_per_face;
              ++sf)
           {
index c255d23b7ce9608f9148566a61e4aaa34defe3ef..efbfe9aaf8863faef71309ccc406dcff188f4a36 100644 (file)
@@ -69,7 +69,7 @@ check(const Triangulation<dim> &tria)
       // and make sure that the
       // result of the integration is
       // close to zero
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           fe_face_values.reinit(cell, f);
           for (unsigned int q = 0; q < q_face.size(); ++q)
@@ -81,7 +81,7 @@ check(const Triangulation<dim> &tria)
 
       // now same for subface
       // integration
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         for (unsigned int sf = 0; sf < GeometryInfo<dim>::max_children_per_face;
              ++sf)
           {
index afccff2a68bb2f1c10fa0d3eae3256c0d114a94a..ffa22cdb6b0d2b121de31f29292aeba223680ddb 100644 (file)
@@ -69,7 +69,7 @@ check(const Triangulation<dim> &tria)
       // and make sure that the
       // result of the integration is
       // close to zero
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           fe_face_values.reinit(cell, f);
           for (unsigned int q = 0; q < q_face.size(); ++q)
@@ -81,7 +81,7 @@ check(const Triangulation<dim> &tria)
 
       // now same for subface
       // integration
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         for (unsigned int sf = 0; sf < GeometryInfo<dim>::max_children_per_face;
              ++sf)
           {
index 8b4c407640311cfc2c5679a634ec6a579423afc5..bf63dafc228e0c09cb60538484387a434d7f7521 100644 (file)
@@ -59,7 +59,7 @@ check(const Triangulation<dim> &tria)
       // and make sure that the
       // result of the integration is
       // close to zero
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (cell->at_boundary(f))
           {
             fe_face_values.reinit(cell, f);
@@ -69,7 +69,7 @@ check(const Triangulation<dim> &tria)
 
       // now same for subface
       // integration
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (cell->at_boundary(f))
           for (unsigned int sf = 0;
                sf < GeometryInfo<dim>::max_children_per_face;
index 4712958d5ffc07dcc3c416b05c2ce406f9bf18c1..6ff25b5a8fb5315cace3455d22d5d085ed435596 100644 (file)
@@ -66,7 +66,7 @@ check(const Triangulation<dim> &tria, const unsigned int order)
       // and make sure that the
       // result of the integration is
       // close to zero
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (cell->at_boundary(f))
           {
             fe_face_values.reinit(cell, f);
@@ -76,7 +76,7 @@ check(const Triangulation<dim> &tria, const unsigned int order)
 
       // now same for subface
       // integration
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (cell->at_boundary(f))
           for (unsigned int sf = 0;
                sf < GeometryInfo<dim>::max_children_per_face;
index 6304c9d834749d1a9653f322a769ba2ab0a2b283..e5be29e0cdb7ecc44a784f4f7bd56395ca38e44a 100644 (file)
@@ -66,7 +66,7 @@ check(const Triangulation<dim> &tria)
       // and make sure that the
       // result of the integration is
       // close to zero
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (cell->at_boundary(f))
           {
             fe_face_values.reinit(cell, f);
@@ -76,7 +76,7 @@ check(const Triangulation<dim> &tria)
 
       // now same for subface
       // integration
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (cell->at_boundary(f))
           for (unsigned int sf = 0;
                sf < GeometryInfo<dim>::max_children_per_face;
index aef4843e19829fcd85b3323b9105c24fe24b0109..9085e757cc5263dcd944aed3c21f7142e8d3d18b 100644 (file)
@@ -66,7 +66,7 @@ check(const Triangulation<dim> &tria)
       // and make sure that the
       // result of the integration is
       // close to zero
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (cell->at_boundary(f))
           {
             fe_face_values.reinit(cell, f);
@@ -76,7 +76,7 @@ check(const Triangulation<dim> &tria)
 
       // now same for subface
       // integration
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (cell->at_boundary(f))
           for (unsigned int sf = 0;
                sf < GeometryInfo<dim>::max_children_per_face;
index efd9e24fb0f40dea41bae4af97105bc8330d0f60..cbde6939f2e8d73cca4269d44abe73b17fb08998 100644 (file)
@@ -92,7 +92,7 @@ void check(Triangulation<3> &tria)
   for (DoFHandler<3>::cell_iterator cell = dof_handler.begin();
        cell != dof_handler.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<3>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<3>::face_indices())
       if (!cell->at_boundary(f))
         {
           const unsigned int nn = cell->neighbor_of_neighbor(f);
index b0bf2431aa8af5cb0f5e69051751da17337b3ed5..e6a7c4932443cafaf857fa29fddbc165cf07fdab 100644 (file)
@@ -33,7 +33,7 @@ template <int dim>
 void
 check(const FiniteElement<dim> &fe)
 {
-  for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell; face++)
+  for (const unsigned int face : GeometryInfo<dim>::face_indices())
     for (unsigned int i = 0; i < fe.dofs_per_cell; i++)
       if (fe.has_support_on_face(i, face))
         deallog << "Basis function " << i << " has support on face " << face
index 51f7849588ad3854c826f6471e5b65f8e3ab641a..a3ea090955e144d3a702c6fa563b36e1c5d6914a 100644 (file)
@@ -79,7 +79,7 @@ void evaluate_normal(DoFHandler<2> &dof_handler, Vector<double> &solution)
 
   for (; cell != endc; ++cell)
     {
-      for (unsigned int f = 0; f < GeometryInfo<2>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<2>::face_indices())
         {
           if (!cell->face(f)->at_boundary())
             {
index 96dabf410e91032b75b247a53761ee10a6a12b4d..236c743045e0e6d7a641f53999702102bd182846 100644 (file)
@@ -392,8 +392,7 @@ HelmholtzProblem<dim>::assemble_system(const bool do_reconstruct)
                             rhs_values[q_point] * fe_values.JxW(q_point));
         }
 
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         if (cell->face(face)->at_boundary() &&
             (cell->face(face)->boundary_id() == 1))
           {
@@ -637,9 +636,7 @@ HelmholtzProblem<dim>::run()
                                                        triangulation.begin(),
                                                      endc = triangulation.end();
           for (; cell != endc; ++cell)
-            for (unsigned int face = 0;
-                 face < GeometryInfo<dim>::faces_per_cell;
-                 ++face)
+            for (const unsigned int face : GeometryInfo<dim>::face_indices())
               if ((cell->face(face)->center()(0) == -1) ||
                   (cell->face(face)->center()(1) == -1))
                 cell->face(face)->set_boundary_id(1);
index fe80f2139d4134e47545b05129fbe38226d1dc63..6f129110eb47c425d5a43011b7176d2a86700a82 100644 (file)
@@ -156,9 +156,7 @@ compute_pi_by_perimeter()
                                                      endc = dof_handler.end();
       long double perimeter                               = 0;
       for (; cell != endc; ++cell)
-        for (unsigned int face_no = 0;
-             face_no < GeometryInfo<dim>::faces_per_cell;
-             ++face_no)
+        for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
           if (cell->face(face_no)->at_boundary())
             {
               x_fe_face_values.reinit(cell, face_no);
index fa753910d2ee38015f88717050b4bde1fe27f002..1cbe40f7bf403b5d09fb15bed298a19920d39cce 100644 (file)
@@ -193,9 +193,7 @@ compute_pi_by_perimeter()
             endc                = dof_handler.end();
           long double perimeter = 0;
           for (; cell != endc; ++cell)
-            for (unsigned int face_no = 0;
-                 face_no < GeometryInfo<dim>::faces_per_cell;
-                 ++face_no)
+            for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
               if (cell->face(face_no)->at_boundary())
                 {
                   x_fe_face_values.reinit(cell, face_no);
index 0dc5f18f169d7e909b9a3c03d2d8e5bd08d7c2ce..48133a0738e4fdd2c3b0ea7bf6cc9378c0bd197c 100644 (file)
@@ -462,9 +462,7 @@ DGMethod<dim>::assemble_system1()
 
       cell->get_dof_indices(dofs);
 
-      for (unsigned int face_no = 0;
-           face_no < GeometryInfo<dim>::faces_per_cell;
-           ++face_no)
+      for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
         {
           typename DoFHandler<dim>::face_iterator face = cell->face(face_no);
 
@@ -637,9 +635,7 @@ DGMethod<dim>::assemble_system2()
 
       cell->get_dof_indices(dofs);
 
-      for (unsigned int face_no = 0;
-           face_no < GeometryInfo<dim>::faces_per_cell;
-           ++face_no)
+      for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
         {
           typename DoFHandler<dim>::face_iterator face = cell->face(face_no);
 
index 05e64d10042d97942b97aef280b33e4619ca46b6..0fb7762c856f8db3afc3138a9acb594e33d91433 100644 (file)
@@ -1638,9 +1638,7 @@ namespace LaplaceSolver
     for (active_cell_iterator cell = dual_solver.dof_handler.begin_active();
          cell != dual_solver.dof_handler.end();
          ++cell)
-      for (unsigned int face_no = 0;
-           face_no < GeometryInfo<dim>::faces_per_cell;
-           ++face_no)
+      for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
         face_integrals[cell->face(face_no)] = -1e20;
 
     error_indicators.reinit(
@@ -1661,9 +1659,7 @@ namespace LaplaceSolver
     for (active_cell_iterator cell = dual_solver.dof_handler.begin_active();
          cell != dual_solver.dof_handler.end();
          ++cell, ++present_cell)
-      for (unsigned int face_no = 0;
-           face_no < GeometryInfo<dim>::faces_per_cell;
-           ++face_no)
+      for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
         {
           Assert(face_integrals.find(cell->face(face_no)) !=
                    face_integrals.end(),
@@ -1717,9 +1713,7 @@ namespace LaplaceSolver
                             cell_data,
                             error_indicators);
 
-        for (unsigned int face_no = 0;
-             face_no < GeometryInfo<dim>::faces_per_cell;
-             ++face_no)
+        for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
           {
             if (cell->face(face_no)->at_boundary())
               {
index 7e4361d5bfbf4b8572291c49dde47fd069121ad5..8a18ddbdf3669761e5ebd6b8240df48395d642bf 100644 (file)
@@ -443,8 +443,7 @@ namespace Step51
       , fe_local_support_on_face(GeometryInfo<dim>::faces_per_cell)
       , fe_support_on_face(GeometryInfo<dim>::faces_per_cell)
     {
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         for (unsigned int i = 0; i < fe_local.dofs_per_cell; ++i)
           {
             if (fe_local.has_support_on_face(i, face))
@@ -453,8 +452,7 @@ namespace Step51
               }
           }
 
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
           {
             if (fe.has_support_on_face(i, face))
@@ -635,8 +633,7 @@ namespace Step51
           }
       }
 
-    for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-         ++face)
+    for (const unsigned int face : GeometryInfo<dim>::face_indices())
       {
         scratch.fe_face_values_local.reinit(loc_cell, face);
         scratch.fe_face_values.reinit(cell, face);
@@ -976,8 +973,7 @@ namespace Step51
     typename Triangulation<dim>::cell_iterator cell = triangulation.begin(),
                                                endc = triangulation.end();
     for (; cell != endc; ++cell)
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         if (cell->face(face)->at_boundary())
           for (unsigned int d = 0; d < dim; ++d)
             if ((std::fabs(cell->face(face)->center()(d) - (1)) < 1e-12))
index 4968479f39370b68c876c757f559d13d898d956f..84f365aabe21c5ff8d9b0de956fdff4175ae8627 100644 (file)
@@ -443,8 +443,7 @@ namespace Step51
       , fe_local_support_on_face(GeometryInfo<dim>::faces_per_cell)
       , fe_support_on_face(GeometryInfo<dim>::faces_per_cell)
     {
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         for (unsigned int i = 0; i < fe_local.dofs_per_cell; ++i)
           {
             if (fe_local.has_support_on_face(i, face))
@@ -453,8 +452,7 @@ namespace Step51
               }
           }
 
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
           {
             if (fe.has_support_on_face(i, face))
@@ -635,8 +633,7 @@ namespace Step51
           }
       }
 
-    for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-         ++face)
+    for (const unsigned int face : GeometryInfo<dim>::face_indices())
       {
         scratch.fe_face_values_local.reinit(loc_cell, face);
         scratch.fe_face_values.reinit(cell, face);
@@ -974,8 +971,7 @@ namespace Step51
     typename Triangulation<dim>::cell_iterator cell = triangulation.begin(),
                                                endc = triangulation.end();
     for (; cell != endc; ++cell)
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         if (cell->face(face)->at_boundary())
           for (unsigned int d = 0; d < dim; ++d)
             if ((std::fabs(cell->face(face)->center()(d) - (1)) < 1e-12))
index 87c0e2f35b89b0acfbd47d8d807215974a461312..84c26eb9cc758e5550a57466d0d90fdb9cb54e43 100644 (file)
@@ -330,8 +330,7 @@ HelmholtzProblem<dim>::assemble_system()
                             rhs_values[q_point] * fe_values.JxW(q_point));
           }
 
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         if (cell->face(face)->at_boundary() &&
             (cell->face(face)->boundary_id() == 1))
           {
@@ -502,9 +501,7 @@ HelmholtzProblem<dim>::run()
                                                        triangulation.begin(),
                                                      endc = triangulation.end();
           for (; cell != endc; ++cell)
-            for (unsigned int face = 0;
-                 face < GeometryInfo<dim>::faces_per_cell;
-                 ++face)
+            for (const unsigned int face : GeometryInfo<dim>::face_indices())
               if ((cell->face(face)->center()(0) == -1) ||
                   (cell->face(face)->center()(1) == -1))
                 cell->face(face)->set_boundary_id(1);
index f354b557ec19d696f1ccfb15a9a10c22571736e0..eaa8c041f8164f4be0e2e64493031c047a32da50 100644 (file)
@@ -66,7 +66,7 @@ check(const Triangulation<dim> &tria)
       // and make sure that the
       // result of the integration is
       // close to zero
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (cell->at_boundary(f))
           {
             fe_face_values.reinit(cell, f);
@@ -78,7 +78,7 @@ check(const Triangulation<dim> &tria)
 
       // now same for subface
       // integration
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (cell->at_boundary(f))
           for (unsigned int sf = 0;
                sf < GeometryInfo<dim>::max_children_per_face;
index c4425a10499046a0c9a1e5f5ad772b27b717c976..a01437d28aa12b1ec838f19abaaa913be8b9b6b9 100644 (file)
@@ -77,7 +77,7 @@ check(const Triangulation<dim> &tria, const unsigned int order)
       // and make sure that the
       // result of the integration is
       // close to zero
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (cell->at_boundary(f))
           {
             fe_face_values.reinit(cell, f);
@@ -89,7 +89,7 @@ check(const Triangulation<dim> &tria, const unsigned int order)
 
       // now same for subface
       // integration
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (cell->at_boundary(f))
           for (unsigned int sf = 0;
                sf < GeometryInfo<dim>::max_children_per_face;
index ad3c4e620d5c77784ff49732ecb1d62a9f182918..57157cf2f6f995d258058c3f925ef4beefc72689 100644 (file)
@@ -74,7 +74,7 @@ check(const Triangulation<dim> &tria)
       // and make sure that the
       // result of the integration is
       // close to zero
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (cell->at_boundary(f))
           {
             fe_face_values.reinit(cell, f);
@@ -86,7 +86,7 @@ check(const Triangulation<dim> &tria)
 
       // now same for subface
       // integration
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (cell->at_boundary(f))
           for (unsigned int sf = 0;
                sf < GeometryInfo<dim>::max_children_per_face;
index 3ee17d2eb0aed8a62b2de60044dc04fa7df26ec4..fab6c201701f152076014b603946206288afdf43 100644 (file)
@@ -74,7 +74,7 @@ check(const Triangulation<dim> &tria)
       // and make sure that the
       // result of the integration is
       // close to zero
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (cell->at_boundary(f))
           {
             fe_face_values.reinit(cell, f);
@@ -86,7 +86,7 @@ check(const Triangulation<dim> &tria)
 
       // now same for subface
       // integration
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (cell->at_boundary(f))
           for (unsigned int sf = 0;
                sf < GeometryInfo<dim>::max_children_per_face;
index 1117ca981141b8da48074da95abd4fc150af8790..bca547fc5f6b8d14de69dc69c71ababc8c35ff5a 100644 (file)
@@ -74,7 +74,7 @@ main()
          ++cell)
       {
         bool done = false;
-        for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+        for (const unsigned int f : GeometryInfo<dim>::face_indices())
           if (cell->at_boundary(f))
             {
               cell->face(f)->set_boundary_id(1);
index dc880466b5f6336683f74209ea24787a27c28db3..df962367008a981ffd5087ed1d52d85b0a5aea52 100644 (file)
@@ -111,7 +111,7 @@ main()
            volume_mesh.begin_active();
          cell != volume_mesh.end();
          ++cell)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (cell->at_boundary(f))
           cell->face(f)->set_all_boundary_ids(1);
     GridTools::copy_boundary_to_manifold_id(volume_mesh);
index 15bbfa66278ca3527404fea4e1c57f3c8905cb23..ad70237760e58b14649c8f60b8379cc6685132e9 100644 (file)
@@ -111,7 +111,7 @@ main()
            volume_mesh.begin_active();
          cell != volume_mesh.end();
          ++cell)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (cell->at_boundary(f) && (cell->center()[dim - 1] > 0))
           cell->face(f)->set_all_boundary_ids(1);
 
index 6153dad6ba3a7d269166973a4e177db593790076..912cb660103515683bced955d6636804f6f12557 100644 (file)
@@ -44,7 +44,7 @@ test()
          triangulation.begin_active();
        cell != triangulation.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->face(f)->at_boundary())
         {
           if (cell->face(f)->boundary_id() == 0)
index da676012738668bd936e3d7ef015e06bb81798c9..202fb511593f866cfc2a1af8c3b1200ae55014fd 100644 (file)
@@ -44,7 +44,7 @@ test()
          triangulation.begin_active();
        cell != triangulation.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->face(f)->at_boundary())
         {
           if (cell->face(f)->boundary_id() == 0)
index d5c010aeccede15284a942f67152d98b56ce7015..0790f420854581c6cb771c59b9e6c5bf2d864bbd 100644 (file)
@@ -68,8 +68,7 @@ main()
       deallog << "Cell = " << cell << std::endl;
       deallog << "  direction_flag = " << cell->direction_flag() << std::endl;
 
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         {
           deallog << "  face = " << face
                   << "  (neighbor = " << cell->neighbor(face) << ")"
index f29e9bd849931393f83aa631c63a1f8ff5e9bc54..285fab86e888f16052c50c1641e9a7621833fbde 100644 (file)
@@ -60,8 +60,7 @@ main()
       deallog << "Cell = " << cell << std::endl;
       deallog << "  direction_flag = " << cell->direction_flag() << std::endl;
 
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         {
           deallog << "  face = " << face
                   << "  (neighbor = " << cell->neighbor(face) << ")"
index 15434e5a4506bfb34633736d047f43282fc71b5c..9383a52ca1274ed6d047291e4d599ff72c931624 100644 (file)
@@ -64,7 +64,7 @@ test(std::string filename)
          dof_handler.begin_active();
        cell != dof_handler.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         for (unsigned int v = 0; v < GeometryInfo<dim>::vertices_per_face; ++v)
           for (unsigned int i = 0; i < fe.dofs_per_vertex; ++i)
index 1ae2e3866bd5be9350998673e7babe914258021a..e2c11478ddb7cde6c5374b82e7bb39f4bb238ccc 100644 (file)
@@ -81,7 +81,7 @@ test(std::string filename)
          dof_handler.begin_active();
        cell != dof_handler.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         for (unsigned int v = 0; v < GeometryInfo<dim>::vertices_per_face; ++v)
           for (unsigned int i = 0; i < fe.dofs_per_vertex; ++i)
index 1cb816ae239ed2b82643337d168d827a1d19a352..b049046f15763a9a0687bfd192917e1c9ed5fbe9 100644 (file)
@@ -68,7 +68,7 @@ test()
              dof_handler.begin_active();
            cell != dof_handler.end();
            ++cell)
-        for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+        for (const unsigned int f : GeometryInfo<dim>::face_indices())
           if (cell->at_boundary(f) &&
               (cell->face(f)->boundary_id() == boundary_id))
             for (unsigned int v = 0; v < GeometryInfo<dim>::vertices_per_face;
index 31943172bd33af477bc2df2c24cdd54a078236e3..68a2ef8974d689a15b86bc0f76a3779b2215a2b5 100644 (file)
@@ -86,7 +86,7 @@ test()
              dof_handler.begin_active();
            cell != dof_handler.end();
            ++cell)
-        for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+        for (const unsigned int f : GeometryInfo<dim>::face_indices())
           if (cell->at_boundary(f) &&
               (cell->face(f)->boundary_id() == boundary_id))
             for (unsigned int v = 0; v < GeometryInfo<dim>::vertices_per_face;
index fcf4a7e64231176f0b48989a8fdd59e0ea90d06b..50813d65c6464cc66eab18b0d6dc77d467cc0d22 100644 (file)
@@ -75,7 +75,7 @@ test()
              dof_handler.begin_active();
            cell != dof_handler.end();
            ++cell)
-        for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+        for (const unsigned int f : GeometryInfo<dim>::face_indices())
           if (cell->at_boundary(f) &&
               (cell->face(f)->boundary_id() == boundary_id))
             for (unsigned int v = 0; v < GeometryInfo<dim>::vertices_per_face;
index 55404ff9ba1813c6e028fbcaa2804acb9e86fef2..c5fabb74ab8e9506f772734ed939bf09013c8714 100644 (file)
@@ -84,7 +84,7 @@ test()
              dof_handler.begin_active();
            cell != dof_handler.end();
            ++cell)
-        for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+        for (const unsigned int f : GeometryInfo<dim>::face_indices())
           if (cell->at_boundary(f) &&
               (cell->face(f)->boundary_id() == boundary_id))
             for (unsigned int v = 0; v < GeometryInfo<dim>::vertices_per_face;
index a66a64fbd9ccb87ba2ba47b60aaa6cd88c6f3fbd..2720c9cf109d4209380c8d2594d832b5d01c6067 100644 (file)
@@ -118,7 +118,7 @@ test()
   Triangulation<dim>           tria;
   GridGenerator::hyper_ball(tria);
   for (const auto &cell : tria.active_cell_iterators())
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_manifold_ids(0);
   tria.set_manifold(0, manifold);
index 24d34012d1570238cc1d58f84ca45288901f4af7..1677e5040b0538c50c4a2bd60d5918152f3ecf3e 100644 (file)
@@ -167,7 +167,7 @@ create_patches(std::vector<DataOutBase::Patch<dim, spacedim>> &patches)
           p.vertices[i](j) =
             PatchInfo<dim>::vertices[i][j] + PatchInfo<dim>::offsets[c][j];
 
-      for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+      for (const unsigned int i : GeometryInfo<dim>::face_indices())
         p.neighbors[i] = (unsigned int)PatchInfo<dim>::neighbors[c][i];
 
       unsigned int ndata = 1;
index 95d2be5c464fc5dcc9bb11d8f45b8bbd8c8e8cd2..3508caa7f1e3c8b1cad7ba9f6aa04e4d4efefa89 100644 (file)
@@ -171,9 +171,7 @@ curved_grid(std::ofstream &out)
         }
 
       if (cell->at_boundary())
-        for (unsigned int face_no = 0;
-             face_no < GeometryInfo<2>::faces_per_cell;
-             ++face_no)
+        for (const unsigned int face_no : GeometryInfo<2>::face_indices())
           {
             face = cell->face(face_no);
             // insert a modifiued value for
index 2880131c48bd5986787e71f6dd98b71663b9ad80..448eee1764aa8413abb29e4c97bc0fa1b7908e20 100644 (file)
@@ -98,7 +98,7 @@ void generate_grid(Triangulation<2> &triangulation, int orientation)
   Triangulation<2>::face_iterator face_2;
 
   // Look for the two outermost faces:
-  for (unsigned int j = 0; j < GeometryInfo<2>::faces_per_cell; ++j)
+  for (const unsigned int j : GeometryInfo<2>::face_indices())
     {
       if (cell_1->face(j)->center()(1) > 2.9)
         face_1 = cell_1->face(j);
@@ -168,7 +168,7 @@ void generate_grid(Triangulation<3> &triangulation, int orientation)
   Triangulation<3>::face_iterator face_2;
 
   // Look for the two outermost faces:
-  for (unsigned int j = 0; j < GeometryInfo<3>::faces_per_cell; ++j)
+  for (const unsigned int j : GeometryInfo<3>::face_indices())
     {
       if (cell_1->face(j)->center()(2) > 2.9)
         face_1 = cell_1->face(j);
@@ -218,7 +218,7 @@ print_matching(DoFHandler<dim> &dof_handler,
        cell != dof_handler.end(0);
        ++cell)
     {
-      for (unsigned int j = 0; j < GeometryInfo<dim>::faces_per_cell; ++j)
+      for (const unsigned int j : GeometryInfo<dim>::face_indices())
         {
           if (cell->face(j)->center()(dim == 2 ? 1 : 2) > 2.9)
             face_1 = cell->face(j);
index d9fb6686f871d0743f94275d9381f3af1c611227..bf76667d60e0311786dc511584ab49f0b7b09d1c 100644 (file)
@@ -98,7 +98,7 @@ void generate_grid(Triangulation<2> &triangulation)
   Triangulation<2>::face_iterator face_2;
 
   // Look for the two outermost faces:
-  for (unsigned int j = 0; j < GeometryInfo<2>::faces_per_cell; ++j)
+  for (const unsigned int j : GeometryInfo<2>::face_indices())
     {
       if (cell_1->face(j)->center()(1) > 2.9)
         face_1 = cell_1->face(j);
index 28eb3990b9539f0978198ed334bd9d82b0e3ec2c..466d949142d3c3d8cafaaa02582e54501f3fe48f 100644 (file)
@@ -132,7 +132,7 @@ void generate_grid(Triangulation<2> &triangulation)
   Triangulation<2>::face_iterator face_2;
 
   // Look for the two outermost faces:
-  for (unsigned int j = 0; j < GeometryInfo<2>::faces_per_cell; ++j)
+  for (const unsigned int j : GeometryInfo<2>::face_indices())
     {
       if (cell_1->face(j)->center()(1) > 2.9)
         face_1 = cell_1->face(j);
index 993e33785c32c31302c02e818eafc4dd356c9042..2a434aed4022b748dddecd52aaef44eb3e9f6da3 100644 (file)
@@ -97,7 +97,7 @@ void generate_grid(Triangulation<2> &triangulation)
   Triangulation<2>::face_iterator face_2;
 
   // Look for the two outermost faces:
-  for (unsigned int j = 0; j < GeometryInfo<2>::faces_per_cell; ++j)
+  for (const unsigned int j : GeometryInfo<2>::face_indices())
     {
       if (cell_1->face(j)->center()(1) > 2.9)
         face_1 = cell_1->face(j);
index fa31e7d7cfc91e5ff23ac670a4dfe4daa70ed6c8..d0464f1556cc044a6970c5256a8ba46d5bc45fac 100644 (file)
@@ -101,7 +101,7 @@ void generate_grid(Triangulation<2> &triangulation, int orientation)
   Triangulation<2>::face_iterator face_2;
 
   // Look for the two outermost faces:
-  for (unsigned int j = 0; j < GeometryInfo<2>::faces_per_cell; ++j)
+  for (const unsigned int j : GeometryInfo<2>::face_indices())
     {
       if (cell_1->face(j)->center()(1) > 2.9)
         face_1 = cell_1->face(j);
@@ -172,7 +172,7 @@ void generate_grid(Triangulation<3> &triangulation, int orientation)
   Triangulation<3>::face_iterator face_2;
 
   // Look for the two outermost faces:
-  for (unsigned int j = 0; j < GeometryInfo<3>::faces_per_cell; ++j)
+  for (const unsigned int j : GeometryInfo<3>::face_indices())
     {
       if (cell_1->face(j)->center()(2) > 2.9)
         face_1 = cell_1->face(j);
@@ -223,7 +223,7 @@ print_matching(DoFHandler<dim> &dof_handler,
        cell != dof_handler.end(0);
        ++cell)
     {
-      for (unsigned int j = 0; j < GeometryInfo<dim>::faces_per_cell; ++j)
+      for (const unsigned int j : GeometryInfo<dim>::face_indices())
         {
           if (cell->face(j)->center()(dim == 2 ? 1 : 2) > 2.9)
             face_1 = cell->face(j);
index e6ed100604d4b5c4576154d3f9a99972b8bd5dde..76c36204e78a106722db0ea8e164ae461730d8a8 100644 (file)
@@ -72,7 +72,7 @@ template <int dim>
 void
 set_boundary_ids(Triangulation<dim> &tria)
 {
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     tria.begin_active()->face(f)->set_boundary_id(f);
 }
 
index 6ce8a7e44b2e790a0a5860c7adf3daa9840a9aae..0dd9ac1e0f9c31be29114095dc3ffe0fdf0feb1e 100644 (file)
@@ -39,8 +39,7 @@ check()
     face->set_manifold_id(42);
 
   for (const auto &cell : tr.active_cell_iterators())
-    for (unsigned int face_n = 0; face_n < GeometryInfo<dim>::faces_per_cell;
-         ++face_n)
+    for (const unsigned int face_n : GeometryInfo<dim>::face_indices())
       Assert(cell->face(face_n)->manifold_id() == 42, ExcInternalError());
 
   deallog << "OK" << std::endl;
index e6f6a53f3d12702d8a37bf7843d0252827da1f44..b94070c6a4add00c00e095c3727c6bc5f351b695 100644 (file)
@@ -795,7 +795,7 @@ LaplaceProblem<3>::create_coarse_grid()
          triangulation.begin_active();
        cell != triangulation.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if ((cell->face(f)->center()[2] != -4) &&
           (cell->face(f)->center()[2] != 7) && (cell->face(f)->at_boundary()))
         cell->face(f)->set_boundary_id(1);
index 88b9ee351d9a9a3fa8781795d36dc4e33b1a2ce3..a06360d9eaf8f07c9cee0c24d64bca4c8af9523c 100644 (file)
@@ -1659,9 +1659,7 @@ namespace LaplaceSolver
     for (active_cell_iterator cell = dual_solver.dof_handler.begin_active();
          cell != dual_solver.dof_handler.end();
          ++cell)
-      for (unsigned int face_no = 0;
-           face_no < GeometryInfo<dim>::faces_per_cell;
-           ++face_no)
+      for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
         face_integrals[cell->face(face_no)] = -1e20;
 
     error_indicators.reinit(
@@ -1684,9 +1682,7 @@ namespace LaplaceSolver
     for (active_cell_iterator cell = dual_solver.dof_handler.begin_active();
          cell != dual_solver.dof_handler.end();
          ++cell, ++present_cell)
-      for (unsigned int face_no = 0;
-           face_no < GeometryInfo<dim>::faces_per_cell;
-           ++face_no)
+      for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
         {
           Assert(face_integrals.find(cell->face(face_no)) !=
                    face_integrals.end(),
@@ -1738,9 +1734,7 @@ namespace LaplaceSolver
                             cell_data,
                             error_indicators);
 
-        for (unsigned int face_no = 0;
-             face_no < GeometryInfo<dim>::faces_per_cell;
-             ++face_no)
+        for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
           {
             if (cell->face(face_no)->at_boundary())
               {
index 2b788cf734b564d875a967f7d57bb2b1d3ead0e2..7dd6cd0df94bdd16bf77b1f8895e65a7a8848fe7 100644 (file)
@@ -475,7 +475,7 @@ project(const Mapping<dim> &             mapping,
                                                      endc = dof.end();
       std::vector<types::global_dof_index> face_dof_indices(fe.dofs_per_face);
       for (; cell != endc; ++cell)
-        for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+        for (const unsigned int f : GeometryInfo<dim>::face_indices())
           if (cell->face(f)->at_boundary())
             {
               cell->face(f)->get_dof_indices(face_dof_indices);
index ccbee14a3d94500cc7aa5c8856843e36b68efd59..b25ee669382fe802172a474a299d2fccedc5fb77 100644 (file)
@@ -456,7 +456,7 @@ project(const Mapping<dim> &             mapping,
                                                      endc = dof.end();
       std::vector<types::global_dof_index> face_dof_indices(fe.dofs_per_face);
       for (; cell != endc; ++cell)
-        for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+        for (const unsigned int f : GeometryInfo<dim>::face_indices())
           if (cell->face(f)->at_boundary())
             {
               cell->face(f)->get_dof_indices(face_dof_indices);
index 38be8c9e7ed156911ab9e0cb861c683d0703a939..af4928ac26d3be41a2afa14caef4e964a6b639e3 100644 (file)
@@ -157,7 +157,7 @@ test()
   tr.set_manifold(1, boundary);
 
   // set boundary id on cell 1
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (tr.begin_active()->at_boundary(f))
       tr.begin_active()->face(f)->set_boundary_id(1);
 
index 95d5b3f5fe14241988e68c9d2efb521334a5b1e8..4e448f68170588300cf15ab8f6e4f8c919f1db5e 100644 (file)
@@ -157,7 +157,7 @@ test()
   tr.set_manifold(1, boundary);
 
   // set boundary id on cell 1
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (tr.begin_active()->at_boundary(f))
       tr.begin_active()->face(f)->set_boundary_id(1);
 
index 9f764cb6216e7852b6e5b4fcf7006d8d22015a5f..e19157091b9347eb70f09bb472e0fea69203fbe5 100644 (file)
@@ -157,7 +157,7 @@ test()
   tr.set_manifold(1, boundary);
 
   // set boundary id on cell 1
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (tr.begin_active()->at_boundary(f))
       tr.begin_active()->face(f)->set_boundary_id(1);
 
index b9b7e2066d714b418b16f9fbbc52e110cbe53176..0262349aa9237219407ddd80f99aabc7d2dc77c2 100644 (file)
@@ -157,7 +157,7 @@ test()
   tr.set_manifold(1, boundary);
 
   // set boundary id on cell 1
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (tr.begin_active()->at_boundary(f))
       tr.begin_active()->face(f)->set_boundary_id(1);
 
index b6589fa60fd45a10a01314bd9ef1f3c4e3f913f1..68d7cb3a9d0bdd3439af77aef48506e5a985e454 100644 (file)
@@ -158,7 +158,7 @@ test()
   tr.set_manifold(1, boundary);
 
   // set boundary id on cell 1
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (tr.begin_active()->at_boundary(f))
       tr.begin_active()->face(f)->set_manifold_id(1);
 
index 41b801efe1c304fc1c178aea89211189eb00a335..937310f3fc969b78d86aebb6bf74e367dc87435d 100644 (file)
@@ -157,7 +157,7 @@ test()
   tr.set_manifold(1, boundary);
 
   // set boundary id on cell 1
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (tr.begin_active()->at_boundary(f))
       tr.begin_active()->face(f)->set_manifold_id(1);
 
index 28f4b9fc6d6b7f7bae99ca00c1bbf0f9bfab6f53..c6c8da6ffb17533b3ab8944b1e6b220d269da01c 100644 (file)
@@ -157,7 +157,7 @@ test()
   tr.set_manifold(1, boundary);
 
   // set boundary id on cell 1
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (tr.begin_active()->at_boundary(f))
       tr.begin_active()->face(f)->set_manifold_id(1);
 
index b78b53cda8246c04d4f0c1180ceedbfcce1e1987..f62a5b179eaf0c7e1608335bc466a666f0d8e18c 100644 (file)
@@ -159,7 +159,7 @@ test()
   tr.set_manifold(1, boundary);
 
   // set boundary id on cell 1
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (tr.begin_active()->at_boundary(f))
       tr.begin_active()->face(f)->set_manifold_id(1);
 
index 9ef8f758e645d60857222c36a9fae31cb872c0b0..29478c398b85a095f3105e238802789076305d49 100644 (file)
@@ -157,7 +157,7 @@ test()
   tr.set_manifold(1, boundary);
 
   // set boundary id on cell 1
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (tr.begin_active()->at_boundary(f))
       tr.begin_active()->face(f)->set_boundary_id(1);
 
index 7e6531d8cbf0b82c6d494faf434bdd7a59ea1d40..db5e55c393a6f4942bd90f85724c0a23de1f8f50 100644 (file)
@@ -157,7 +157,7 @@ test()
   tr.set_manifold(1, boundary);
 
   // set boundary id on cell 1
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (tr.begin_active()->at_boundary(f))
       tr.begin_active()->face(f)->set_boundary_id(1);
 
index 32f58e843f16c62d62688a4d582c8accc071263e..59af03ce22c2b42fe1388cb102cccc8e97817298 100644 (file)
@@ -114,7 +114,7 @@ test()
 
   for (Triangulation<dim>::cell_iterator cell = tr.begin(); cell != tr.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->face(f)->at_boundary() &&
           std::abs(cell->face(f)->center()[0] + 1.) < 1e-12 &&
           std::abs(cell->face(f)->center()[1]) < 1e-12)
index 1498eb86b2fd5791e40d28bdefe2fb3917e2846b..14139bc8a1ea2a3c81b66a96c3939cd06b6792f2 100644 (file)
@@ -157,7 +157,7 @@ test()
   tr.set_manifold(1, boundary);
 
   // set boundary id on cell 1
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (tr.begin_active()->at_boundary(f))
       tr.begin_active()->face(f)->set_boundary_id(1);
 
index 23b12151f37463892097d2399cc0c56ae2f76e4a..65dd55c6d736f6ae24570071f2772f71a126c9ca 100644 (file)
@@ -157,7 +157,7 @@ test()
   tr.set_manifold(1, boundary);
 
   // set boundary id on cell 1
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (tr.begin_active()->at_boundary(f))
       tr.begin_active()->face(f)->set_boundary_id(1);
 
index 1a20355c0f27c09683d80e86b5296481352fa81f..5dc51412ae10c461b47f4fea91c20c63b264d6ad 100644 (file)
@@ -157,7 +157,7 @@ test()
   tr.set_manifold(1, boundary);
 
   // set boundary id on cell 1
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (tr.begin_active()->at_boundary(f))
       tr.begin_active()->face(f)->set_boundary_id(1);
 
index cf863e6c2057447019d04b164fc1594c234545ba..087bca51cd3c4749fdf85cdf9e64613c15e408a6 100644 (file)
@@ -157,7 +157,7 @@ test()
   tr.set_manifold(1, boundary);
 
   // set boundary id on cell 1
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (tr.begin_active()->at_boundary(f))
       tr.begin_active()->face(f)->set_boundary_id(1);
 
index f637975e8d0d1a8bfc1a66cdc502114a94fdf2c6..e4849ebb716bf4fa9ded5aee58cfce7b08519ab1 100644 (file)
@@ -157,7 +157,7 @@ test()
   tr.set_manifold(1, boundary);
 
   // set boundary id on cell 1
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (tr.begin_active()->at_boundary(f))
       tr.begin_active()->face(f)->set_manifold_id(1);
 
index 36bc7f7b147020123785e6355a16f0ba3d45fc2c..4e7d43fd110480875db4822384bd6ab802312724 100644 (file)
@@ -157,7 +157,7 @@ test()
   tr.set_manifold(1, boundary);
 
   // set boundary id on cell 1
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (tr.begin_active()->at_boundary(f))
       tr.begin_active()->face(f)->set_manifold_id(1);
 
index a5e4907098d23ac98abdb64ac1360dca223cf494..53646ab363a353240c5f1093a97cd6943a140df8 100644 (file)
@@ -157,7 +157,7 @@ test()
   tr.set_manifold(1, boundary);
 
   // set boundary id on cell 1
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (tr.begin_active()->at_boundary(f))
       tr.begin_active()->face(f)->set_manifold_id(1);
 
index 93ef484675cfaa273ec367c3f787241880d6a5f3..f924d269bc332527763fa5136723e839bd2f339a 100644 (file)
@@ -157,7 +157,7 @@ test()
   tr.set_manifold(1, boundary);
 
   // set boundary id on cell 1
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (tr.begin_active()->at_boundary(f))
       tr.begin_active()->face(f)->set_manifold_id(1);
 
index 054c6a40897ac11839acbe2ba109fa309ccd3050..88ba52eeebc7bf379ff1a1ec4650425c50c7ffc8 100644 (file)
@@ -157,7 +157,7 @@ test()
   tr.set_manifold(1, boundary);
 
   // set boundary id on cell 1
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (tr.begin_active()->at_boundary(f))
       tr.begin_active()->face(f)->set_boundary_id(1);
 
index 7647443cdd8aae19b29a4a02535db58ee4f2381a..977afacc5f243c91488dd08016843e3fff45267f 100644 (file)
@@ -157,7 +157,7 @@ test()
   tr.set_manifold(1, boundary);
 
   // set boundary id on cell 1
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (tr.begin_active()->at_boundary(f))
       tr.begin_active()->face(f)->set_boundary_id(1);
 
index ee39d1b6b813342f314c8a3cb1a0404ba9d83e33..63c83b93689e1e47c05c50f568d229fb4c2adb05 100644 (file)
@@ -157,7 +157,7 @@ test()
   tr.set_manifold(1, boundary);
 
   // set boundary id on cell 1
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (tr.begin_active()->at_boundary(f))
       tr.begin_active()->face(f)->set_boundary_id(1);
 
index a0134814d9644075d42039e3d7fac015f61abfe9..05883c73cce9bfb864de6c44f973f282b1419e9a 100644 (file)
@@ -157,7 +157,7 @@ test()
   tr.set_manifold(1, boundary);
 
   // set boundary id on cell 1
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (tr.begin_active()->at_boundary(f))
       tr.begin_active()->face(f)->set_boundary_id(1);
 
index 6500977516f68f64c35405f0f61dc19ee659711e..24d6ba3534704142b4c5f6c57187df198a52b5c6 100644 (file)
@@ -157,7 +157,7 @@ test()
   tr.set_manifold(1, boundary);
 
   // set boundary id on cell 1
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (tr.begin_active()->at_boundary(f))
       tr.begin_active()->face(f)->set_boundary_id(1);
 
index 64b0a9ac8671569a127a460965519f59feb86a6a..c5f2312084c2239a0ddefa27a93f787d5661c6de 100644 (file)
@@ -157,7 +157,7 @@ test()
   tr.set_manifold(1, boundary);
 
   // set boundary id on cell 1
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (tr.begin_active()->at_boundary(f))
       tr.begin_active()->face(f)->set_boundary_id(1);
 
index 1c1c46c0fa7b6496733011cb2d85a7c683f10bad..ef3c258cbcf98e64ce2ed1de1e2590e40cf9e345 100644 (file)
@@ -157,7 +157,7 @@ test()
   tr.set_manifold(1, boundary);
 
   // set boundary id on cell 1
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (tr.begin_active()->at_boundary(f))
       tr.begin_active()->face(f)->set_manifold_id(1);
 
index 2fd67e6ae01015e2e6a73410bbb7da1f322af419..f34f64e9398f3fd37031b563049c12eae0addafb 100644 (file)
@@ -157,7 +157,7 @@ test()
   tr.set_manifold(1, boundary);
 
   // set boundary id on cell 1
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (tr.begin_active()->at_boundary(f))
       tr.begin_active()->face(f)->set_manifold_id(1);
 
index e9fe3f666595e1e3f380327abbfa40051f1ee095..9f3ddc06e41843aca6f176701ae01498e31a7272 100644 (file)
@@ -157,7 +157,7 @@ test()
   tr.set_manifold(1, boundary);
 
   // set boundary id on cell 1
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (tr.begin_active()->at_boundary(f))
       tr.begin_active()->face(f)->set_manifold_id(1);
 
index c43ec01ae5f62c8face6738d07e685f0e3d7700d..9120ef7e85a072a1a062b3ec142496c4dd773063 100644 (file)
@@ -157,7 +157,7 @@ test()
   tr.set_manifold(1, boundary);
 
   // set boundary id on cell 1
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (tr.begin_active()->at_boundary(f))
       tr.begin_active()->face(f)->set_manifold_id(1);
 
index 1d1b3071c09a8a8ada1268d797aa77b616de7461..7a944233d724e985508a9f7c33bb0afbc6e24771 100644 (file)
@@ -157,7 +157,7 @@ test()
   tr.set_manifold(1, boundary);
 
   // set boundary id on cell 1
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (tr.begin_active()->at_boundary(f))
       tr.begin_active()->face(f)->set_boundary_id(1);
 
index 23ef34ee0fbdfedc9a747345cfa0dab43e3bd289..9975ac8667d0b9efbbe497a2e0ff0827af91defa 100644 (file)
@@ -157,7 +157,7 @@ test()
   tr.set_manifold(1, boundary);
 
   // set boundary id on cell 1
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (tr.begin_active()->at_boundary(f))
       tr.begin_active()->face(f)->set_boundary_id(1);
 
index 735a464ae8b0f76ee5d118593302a9663ae5f9dd..81f67dfb35dfda94b768b3fb91301a99348cff37 100644 (file)
@@ -530,7 +530,7 @@ project(const Mapping<dim> &             mapping,
                                                      endc = dof.end();
       std::vector<types::global_dof_index> face_dof_indices(fe.dofs_per_face);
       for (; cell != endc; ++cell)
-        for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+        for (const unsigned int f : GeometryInfo<dim>::face_indices())
           if (cell->face(f)->at_boundary())
             {
               cell->face(f)->get_dof_indices(face_dof_indices);
@@ -665,7 +665,7 @@ void plot_shapes(DoFHandler<2> &dof_handler)
   std::vector<types::global_dof_index> face_dof_indices(
     dof_handler.get_fe().dofs_per_face);
   for (; cell != endc; ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<2>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<2>::face_indices())
       {
         cell->face(f)->get_dof_indices(face_dof_indices);
         for (unsigned int i = 0; i < dof_handler.get_fe().dofs_per_face; ++i)
index 5b5494dc89d251974dbf620a643a3caf7de6b7c0..4491eaec2f6010019c3e931e50f9623125b03e6b 100644 (file)
@@ -56,7 +56,7 @@ plot_derivatives(Mapping<dim> &      mapping,
                        finel,
                        q,
                        UpdateFlags(update_gradients | update_hessians));
-  for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell; ++face)
+  for (const unsigned int face : GeometryInfo<dim>::face_indices())
     {
       fe.reinit(c, face);
 
index b42f9a0d68de4089b6266b8acf84b7989bdc765e..d2be402e2cb975a1dfd693b159b2bb02489d4be7 100644 (file)
@@ -111,9 +111,7 @@ test(const Triangulation<dim> &tr,
                 }
 
               Tensor<1, dim> boundary_integral;
-              for (unsigned int face = 0;
-                   face < GeometryInfo<dim>::faces_per_cell;
-                   ++face)
+              for (const unsigned int face : GeometryInfo<dim>::face_indices())
                 {
                   fe_face_values.reinit(cell, face);
                   for (unsigned int q = 0;
index 3cab8e58949f1c81b5262ebb2ba1e61044f1994f..fcdac4dbdc7e1f6c593796904ef9e2cddd8f7f43 100644 (file)
@@ -263,7 +263,7 @@ test_fe_datas()
       for (unsigned int i = 0; i < fe_data->dofs_per_face; ++i)
         deallog << ' ' << fe_data->face_to_cell_index(i, 0);
       deallog << std::endl;
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           deallog << "face_to_cell_index:";
           for (unsigned int i = 0; i < fe_data->dofs_per_face; ++i)
@@ -271,7 +271,7 @@ test_fe_datas()
           deallog << std::endl;
         }
 
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           deallog << "support on face " << f << ':';
           for (unsigned int s = 0; s < fe_data->dofs_per_cell; ++s)
index 5b6faa996711ae8519b97449ab963e84f6f60cd5..cc3c71a24c40b0e9ee9cd24bee29c5e0ba4ab5c1 100644 (file)
@@ -113,9 +113,7 @@ test(const Triangulation<dim> &tr,
                 }
 
               Tensor<3, dim> boundary_integral;
-              for (unsigned int face = 0;
-                   face < GeometryInfo<dim>::faces_per_cell;
-                   ++face)
+              for (const unsigned int face : GeometryInfo<dim>::face_indices())
                 {
                   fe_face_values.reinit(cell, face);
                   for (unsigned int q = 0;
index 711ec0f415b1ffe6c4a744348dbf7b819d0bd3c5..962c09a18e3ff5829541ee557ca5635011f23f1b 100644 (file)
@@ -112,9 +112,7 @@ test(const Triangulation<dim> &tr,
                 }
 
               Tensor<3, dim> boundary_integral;
-              for (unsigned int face = 0;
-                   face < GeometryInfo<dim>::faces_per_cell;
-                   ++face)
+              for (const unsigned int face : GeometryInfo<dim>::face_indices())
                 {
                   fe_face_values.reinit(cell, face);
                   for (unsigned int q = 0;
index 21b8be5e4e6a7156295e3fd315486f51475ecce9..6301b544cfba17892e7b1fe6f818fa0c59afe943 100644 (file)
@@ -110,9 +110,7 @@ test(const Triangulation<dim> &tr,
                 }
 
               Tensor<1, dim> boundary_integral;
-              for (unsigned int face = 0;
-                   face < GeometryInfo<dim>::faces_per_cell;
-                   ++face)
+              for (const unsigned int face : GeometryInfo<dim>::face_indices())
                 {
                   fe_face_values.reinit(cell, face);
                   for (unsigned int q = 0;
index e83c015e84d96847cd67564baebcb818a44536d6..9c4d12f3971cb1803cdd40c8c9025bd4446d0f24 100644 (file)
@@ -110,9 +110,7 @@ test(const Triangulation<dim> &tr,
                 }
 
               Tensor<2, dim> boundary_integral;
-              for (unsigned int face = 0;
-                   face < GeometryInfo<dim>::faces_per_cell;
-                   ++face)
+              for (const unsigned int face : GeometryInfo<dim>::face_indices())
                 {
                   fe_face_values.reinit(cell, face);
                   for (unsigned int q = 0;
index d3866ab5a40e506c544a92ebce098d12a3c25c3e..163db066bf4e840cbaa2b700da225807a80b0170 100644 (file)
@@ -97,8 +97,7 @@ test2()
                                                    dof_handler.begin_active(),
                                                  endc = dof_handler.end();
   for (; cell != endc; ++cell)
-    for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-         ++face)
+    for (const unsigned int face : GeometryInfo<dim>::face_indices())
       {
         fe_face_values.reinit(cell, face);
         const unsigned int                     n_q_points = quadrature.size();
index b762f0cc6982428ed7dc6e0eba801325e71b6bf0..bfabcdc57f6364446ea884aec2f5831e815add16 100644 (file)
@@ -244,8 +244,7 @@ test(const FiniteElement<dim> & fe1,
             fe_values_system.shape_grad_component(i, q_point, 1),
             fe_values_system.shape_hessian_component(i, q_point, 1));
 
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         {
           fe_face_values_enriched.reinit(cell_enriched, face);
           fe_face_values_system.reinit(cell_system, face);
index d9adfba7ab1efbfcd9660f154088817f2e002428..6a1ad52851ad3f8f65eb89db626b8221d2bf35bc 100644 (file)
@@ -331,8 +331,7 @@ test(const FiniteElement<dim> & fe_base,
             fe_values_system.shape_grad_component(i, q_point, 3),
             fe_values_system.shape_hessian_component(i, q_point, 3));
 
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         {
           fe_face_values_enriched.reinit(cell_enriched, face);
           fe_face_values_system.reinit(cell_system, face);
index a37e6d797c2f036dfe5b5faab1bbad58ec774bca..42cdefc1a2f616be91d093ba6931d24286c7dfe3 100644 (file)
@@ -390,7 +390,7 @@ namespace Step36
          cell != dof_handler.end();
          ++cell)
       if (cell_is_pou(cell))
-        for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+        for (const unsigned int f : GeometryInfo<dim>::face_indices())
           if (!cell->at_boundary(f))
             {
               bool face_is_on_interface = false;
index 04732081e24b9106b3dc173216a5bdb485bad442..eabd3afbd227bea259c801f5bb670f57acaaff2a 100644 (file)
@@ -65,8 +65,7 @@ plot_faces(Mapping<dim> &                           mapping,
                                           update_gradients | update_hessians |
                                           update_normal_vectors));
 
-  for (unsigned int face_nr = 0; face_nr < GeometryInfo<dim>::faces_per_cell;
-       ++face_nr)
+  for (const unsigned int face_nr : GeometryInfo<dim>::face_indices())
     {
       deallog << "Face=" << face_nr << std::endl;
       fe_values.reinit(cell, face_nr);
@@ -108,8 +107,7 @@ plot_subfaces(Mapping<dim> &                           mapping,
     q,
     UpdateFlags(update_quadrature_points | update_JxW_values | update_values |
                 update_gradients | update_hessians | update_normal_vectors));
-  for (unsigned int face_nr = 0; face_nr < GeometryInfo<dim>::faces_per_cell;
-       ++face_nr)
+  for (const unsigned int face_nr : GeometryInfo<dim>::face_indices())
     for (unsigned int sub_nr = 0;
          sub_nr < GeometryInfo<dim>::max_children_per_face;
          ++sub_nr)
index a393a5f54caeb7b95371cd55e3cecf77bb51d8dd..51e2f55d86661f954e26cba7c5d09c5d011368d4 100644 (file)
@@ -110,9 +110,7 @@ test(const Triangulation<dim> &tr,
                 }
 
               Tensor<1, dim> boundary_integral;
-              for (unsigned int face = 0;
-                   face < GeometryInfo<dim>::faces_per_cell;
-                   ++face)
+              for (const unsigned int face : GeometryInfo<dim>::face_indices())
                 {
                   fe_face_values.reinit(cell, face);
                   for (unsigned int q = 0;
index 9fc681e1e1395c5da9ac0bb131111a4d276de866..eeacf5645ac2ad944635bb755158aacb9c7b9671 100644 (file)
@@ -110,9 +110,7 @@ test(const Triangulation<dim> &tr,
                 }
 
               Tensor<2, dim> boundary_integral;
-              for (unsigned int face = 0;
-                   face < GeometryInfo<dim>::faces_per_cell;
-                   ++face)
+              for (const unsigned int face : GeometryInfo<dim>::face_indices())
                 {
                   fe_face_values.reinit(cell, face);
                   for (unsigned int q = 0;
index 848e21286d027ee38a744d4bac4ffda41c34e441..f5cd41d371567516f4a7d21151606fec57e61420 100644 (file)
@@ -109,9 +109,7 @@ test(const Triangulation<dim> &tr,
                 }
 
               Tensor<1, dim> boundary_integral;
-              for (unsigned int face = 0;
-                   face < GeometryInfo<dim>::faces_per_cell;
-                   ++face)
+              for (const unsigned int face : GeometryInfo<dim>::face_indices())
                 {
                   fe_face_values.reinit(cell, face);
                   for (unsigned int q = 0;
index 9f603b775a9ff505c74e7db48aa91d4718f034ba..7d11f916be23c3514d41d9012b06f3545fa490db 100644 (file)
@@ -333,8 +333,7 @@ test(const FiniteElement<dim> &fe,
                 }
             }
 
-          for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-               ++face)
+          for (const unsigned int face : GeometryInfo<dim>::face_indices())
             {
               fe_face_values.reinit(cell, face);
               const std::vector<double> &face_JxW_values =
index a936e76613223248a7f447ea740ffb7104c8663f..646d21e89c37dad5f63a5d690f4387dcfcab79e6 100644 (file)
@@ -112,9 +112,7 @@ test(const Triangulation<dim> &tr,
                 }
 
               Tensor<3, dim> boundary_integral;
-              for (unsigned int face = 0;
-                   face < GeometryInfo<dim>::faces_per_cell;
-                   ++face)
+              for (const unsigned int face : GeometryInfo<dim>::face_indices())
                 {
                   fe_face_values.reinit(cell, face);
                   for (unsigned int q = 0;
index 34e67283fd787d1f313dfb51d46b6763960a422f..259496587b8d65fd426658b27070a11ea6856dd3 100644 (file)
@@ -590,9 +590,7 @@ namespace Step22
           for (unsigned int j = i + 1; j < dofs_per_cell; ++j)
             local_matrix(i, j) = local_matrix(j, i);
 
-        for (unsigned int face_no = 0;
-             face_no < GeometryInfo<dim>::faces_per_cell;
-             ++face_no)
+        for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
           {
             typename DoFHandler<dim>::face_iterator face = cell->face(face_no);
             if (face->at_boundary() == false)
index 7cf67b9801c52590112af261abd733ad1f4bff8e..69160aec392300ec73c58e36c82fa375e11c0d83 100644 (file)
@@ -110,9 +110,7 @@ test(const Triangulation<dim> &tr,
                 }
 
               Tensor<1, dim> boundary_integral;
-              for (unsigned int face = 0;
-                   face < GeometryInfo<dim>::faces_per_cell;
-                   ++face)
+              for (const unsigned int face : GeometryInfo<dim>::face_indices())
                 {
                   fe_face_values.reinit(cell, face);
                   for (unsigned int q = 0;
index 68ed2b002acb04ca23f69b417d8975dcd85be10d..38cd5177d08d061e0d2d7cec13478452db8f708e 100644 (file)
@@ -110,9 +110,7 @@ test(const Triangulation<dim> &tr,
                 }
 
               Tensor<2, dim> boundary_integral;
-              for (unsigned int face = 0;
-                   face < GeometryInfo<dim>::faces_per_cell;
-                   ++face)
+              for (const unsigned int face : GeometryInfo<dim>::face_indices())
                 {
                   fe_face_values.reinit(cell, face);
                   for (unsigned int q = 0;
index f439f16733e0572d9332ad46a1a13c1ba8bb4c22..a4f870f275ec68ad85acc927eb93c96e8ffe8ba4 100644 (file)
@@ -113,9 +113,7 @@ test(const Triangulation<dim> &tr,
                 }
 
               Tensor<3, dim> boundary_integral;
-              for (unsigned int face = 0;
-                   face < GeometryInfo<dim>::faces_per_cell;
-                   ++face)
+              for (const unsigned int face : GeometryInfo<dim>::face_indices())
                 {
                   fe_face_values.reinit(cell, face);
                   for (unsigned int q = 0;
index 991300ca2f47237c4f9d7e5db315c6a55862926f..859be1200fb315d66c9e1c961b3233bab74c0fd1 100644 (file)
@@ -110,9 +110,7 @@ test(const Triangulation<dim> &tr,
                 }
 
               Tensor<1, dim> boundary_integral;
-              for (unsigned int face = 0;
-                   face < GeometryInfo<dim>::faces_per_cell;
-                   ++face)
+              for (const unsigned int face : GeometryInfo<dim>::face_indices())
                 {
                   fe_face_values.reinit(cell, face);
                   for (unsigned int q = 0;
index 868108c43227eb526bcb6aed1ae48e3b095d92cf..a20a58bea1694189c99bd0940168483707bc99f3 100644 (file)
@@ -104,9 +104,7 @@ test(const Triangulation<dim> &tr,
                 }
 
               Tensor<2, dim> boundary_integral;
-              for (unsigned int face = 0;
-                   face < GeometryInfo<dim>::faces_per_cell;
-                   ++face)
+              for (const unsigned int face : GeometryInfo<dim>::face_indices())
                 {
                   fe_face_values.reinit(cell, face);
                   for (unsigned int q = 0;
index 7cf7974ef42bf13ef2434b383230f8ce8b9296f9..f049d3fa7e9de1572081d021d2764760ad5a3ece 100644 (file)
@@ -69,7 +69,7 @@ check_support(const FiniteElement<dim> &finel, const char *name)
 
   Quadrature<dim - 1> q(face_points, dummy_weights);
 
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     {
       std::vector<Point<dim>> q_points(q.get_points().size());
       QProjector<dim>::project_to_face(q, i, q_points);
@@ -96,7 +96,7 @@ check_support(const FiniteElement<dim> &finel, const char *name)
 
   Quadrature<dim - 1> qg(face_g_points, dummy_g_weights);
 
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     {
       std::vector<Point<dim>> q_points(qg.get_points().size());
       QProjector<dim>::project_to_face(qg, i, q_points);
index e73074878a61f5502e1c513aebb596557bb1e7b5..0053293879df0d991192071cc8bc91740ef09213 100644 (file)
@@ -112,9 +112,7 @@ test(const Triangulation<dim> &tr,
                 }
 
               Tensor<3, dim> boundary_integral;
-              for (unsigned int face = 0;
-                   face < GeometryInfo<dim>::faces_per_cell;
-                   ++face)
+              for (const unsigned int face : GeometryInfo<dim>::face_indices())
                 {
                   fe_face_values.reinit(cell, face);
                   for (unsigned int q = 0;
index 7f75e572f9902fefb42c3520851f44cbdda94a85..9b2bb4c6d25b283737876fe7abae35f8055b8569 100644 (file)
@@ -110,7 +110,7 @@ test()
         fe_val_m.get_function_values(interpolant, values_m);
         Assert(values[0] == values_m[0], ExcInternalError())
 
-          for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+          for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           fe_f_val.reinit(cell, f);
           fe_f_val_m.reinit(cell, f);
index df1a94f7eda55c41e1c805613e90de1fd6e20abf..14b7accdd170e7e8f2bdd11d16df280710d43f68 100644 (file)
@@ -59,7 +59,7 @@ test()
                                                         tria.begin_active(),
                                                       endc = tria.end();
     for (; cell != endc; ++cell)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           fe_val.reinit(cell, f);
 
@@ -97,7 +97,7 @@ test()
                                                         tria.begin_active(),
                                                       endc = tria.end();
     for (; cell != endc; ++cell)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           fe_val.reinit(cell, f);
 
@@ -135,7 +135,7 @@ test()
                                                         tria.begin_active(),
                                                       endc = tria.end();
     for (; cell != endc; ++cell)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           fe_val.reinit(cell, f);
 
@@ -178,7 +178,7 @@ test()
                                                         tria.begin_active(),
                                                       endc = tria.end();
     for (; cell != endc; ++cell)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           fe_val.reinit(cell, f);
 
@@ -224,7 +224,7 @@ test()
                                                         tria.begin_active(),
                                                       endc = tria.end();
     for (; cell != endc; ++cell)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           fe_val.reinit(cell, f);
 
@@ -270,7 +270,7 @@ test()
                                                         tria.begin_active(),
                                                       endc = tria.end();
     for (; cell != endc; ++cell)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           fe_val.reinit(cell, f);
 
@@ -320,7 +320,7 @@ test()
                                                         tria.begin_active(),
                                                       endc = tria.end();
     for (; cell != endc; ++cell)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           fe_val.reinit(cell, f);
 
@@ -369,7 +369,7 @@ test()
                                                         tria.begin_active(),
                                                       endc = tria.end();
     for (; cell != endc; ++cell)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           fe_val.reinit(cell, f);
 
index 5e28e3a5568d9ab5abedc7578e04a10b40faaa4d..89519bb408e9cd1798626552aaca3db0773e9a68 100644 (file)
@@ -57,7 +57,7 @@ test()
                                                         tria.begin_active(),
                                                       endc = tria.end();
     for (; cell != endc; ++cell)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           fe_val.reinit(cell, f);
 
@@ -95,7 +95,7 @@ test()
                                                         tria.begin_active(),
                                                       endc = tria.end();
     for (; cell != endc; ++cell)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           fe_val.reinit(cell, f);
 
@@ -133,7 +133,7 @@ test()
                                                         tria.begin_active(),
                                                       endc = tria.end();
     for (; cell != endc; ++cell)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           fe_val.reinit(cell, f);
 
@@ -176,7 +176,7 @@ test()
                                                         tria.begin_active(),
                                                       endc = tria.end();
     for (; cell != endc; ++cell)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           fe_val.reinit(cell, f);
 
@@ -222,7 +222,7 @@ test()
                                                         tria.begin_active(),
                                                       endc = tria.end();
     for (; cell != endc; ++cell)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           fe_val.reinit(cell, f);
 
@@ -268,7 +268,7 @@ test()
                                                         tria.begin_active(),
                                                       endc = tria.end();
     for (; cell != endc; ++cell)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           fe_val.reinit(cell, f);
 
@@ -318,7 +318,7 @@ test()
                                                         tria.begin_active(),
                                                       endc = tria.end();
     for (; cell != endc; ++cell)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           fe_val.reinit(cell, f);
 
@@ -367,7 +367,7 @@ test()
                                                         tria.begin_active(),
                                                       endc = tria.end();
     for (; cell != endc; ++cell)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           fe_val.reinit(cell, f);
 
index 6e4218efea70c493131221cb910b329be231bfd9..018c6208d2340edd91bee1b42aa792195734dd89 100644 (file)
@@ -75,7 +75,7 @@ test()
                                                         tria.begin_active(),
                                                       endc = tria.end();
     for (; cell != endc; ++cell)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           fe_val.reinit(cell, f);
 
@@ -113,7 +113,7 @@ test()
                                                         tria.begin_active(),
                                                       endc = tria.end();
     for (; cell != endc; ++cell)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           fe_val.reinit(cell, f);
 
@@ -151,7 +151,7 @@ test()
                                                         tria.begin_active(),
                                                       endc = tria.end();
     for (; cell != endc; ++cell)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           fe_val.reinit(cell, f);
 
@@ -194,7 +194,7 @@ test()
                                                         tria.begin_active(),
                                                       endc = tria.end();
     for (; cell != endc; ++cell)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           fe_val.reinit(cell, f);
 
@@ -240,7 +240,7 @@ test()
                                                         tria.begin_active(),
                                                       endc = tria.end();
     for (; cell != endc; ++cell)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           fe_val.reinit(cell, f);
 
@@ -286,7 +286,7 @@ test()
                                                         tria.begin_active(),
                                                       endc = tria.end();
     for (; cell != endc; ++cell)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           fe_val.reinit(cell, f);
 
@@ -336,7 +336,7 @@ test()
                                                         tria.begin_active(),
                                                       endc = tria.end();
     for (; cell != endc; ++cell)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           fe_val.reinit(cell, f);
 
@@ -385,7 +385,7 @@ test()
                                                         tria.begin_active(),
                                                       endc = tria.end();
     for (; cell != endc; ++cell)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           fe_val.reinit(cell, f);
 
index 2e2d07d1d2368c97976e9af868a963d4f5a79d4b..3bcb2a6b1c54bfe0999d901c61a85dbeeacfdba8 100644 (file)
@@ -135,8 +135,7 @@ plot(const Triangulation<dim> &tr, const unsigned int p)
   for (typename DoFHandler<dim>::active_cell_iterator c = dof.begin_active();
        c != dof.end();
        ++c)
-    for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-         ++face)
+    for (const unsigned int face : GeometryInfo<dim>::face_indices())
       {
         deallog << "cell " << c << " face " << face;
         if (c->at_boundary(face))
index 40d3c9a9423cf7186690515392dd6eb57ae6fdfe..37b6c43a664c10db0674f52fd2600f24ba0a0c9e 100644 (file)
@@ -101,7 +101,7 @@ void EvaluateNormal2(DoFHandler<2> *dof_handler, Vector<double> &solution)
       cell->get_dof_indices(local_dof_indices);
       fe_v.reinit(cell);
 
-      for (unsigned int f = 0; f < GeometryInfo<2>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<2>::face_indices())
         {
           if (!cell->face(f)->at_boundary())
             {
@@ -199,7 +199,7 @@ void EvaluateNormal(DoFHandler<2> *dof_handler, Vector<double> &solution)
     {
       cell->get_dof_indices(local_dof_indices);
 
-      for (unsigned int f = 0; f < GeometryInfo<2>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<2>::face_indices())
         {
           if (!cell->face(f)->at_boundary())
             {
index d1c5badf5e9264b08b50a1eaa9645a4228848d04..7cd2119e111fa3225bfc3975320c7c509931e968 100644 (file)
@@ -61,7 +61,7 @@ initialize_node_matrix(const FiniteElement<dim> &other,
   // the normal component of the
   // shape function, possibly
   // pointing in negative direction.
-  for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell; ++face)
+  for (const unsigned int face : GeometryInfo<dim>::face_indices())
     for (unsigned int k = 0; k < other.dofs_per_face; ++k)
       {
         for (unsigned int i = 0; i < n_dofs; ++i)
index 2552f08aa22f07ddbbbf951da6c13d9a727fe798..92748bce061d4c9c91e247cb4df38a7c5f7d6816 100644 (file)
@@ -103,7 +103,7 @@ check_face_support_points(const FiniteElement<dim> &fe)
   UpdateFlags       flags = update_values | update_gradients;
   FEFaceValues<dim> vals(mapping, fe, sub_quadrature, flags);
 
-  for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell; ++face)
+  for (const unsigned int face : GeometryInfo<dim>::face_indices())
     {
       QProjector<dim>::project_to_face(sub_quadrature, face, points);
       vals.reinit(dof.begin_active(), face);
index d61631e06d1f47d66a85c9f540a77c8be8daee71..bd94c7e07022631393e484bceca15f57f8f30226 100644 (file)
@@ -171,7 +171,7 @@ plot_face_shape_functions(Mapping<dim> &      mapping,
   sprintf(fname, "Face%dd-%s", dim, name);
   deallog.push(fname);
 
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     {
       if (!c->face(f)->has_children())
         {
index 019d9d455de24de26a887e064b90dda673134767..e982e8ccfd6d2cc1c70602cbafd7a7b70f38baa4 100644 (file)
@@ -62,7 +62,7 @@ test()
 
 
       for (auto cell : dofh.active_cell_iterators())
-        for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+        for (const unsigned int f : GeometryInfo<dim>::face_indices())
           if (cell->at_boundary(f) == false)
             {
               fiv.reinit(cell,
index 4565e209cca4faad76ddbd6096853d8667e59a0e..79723bbae82936a62d38a48a62f2f268adc83857 100644 (file)
@@ -118,7 +118,7 @@ test()
 
   deallog << "** interface between cell 0 and 1 **\n";
 
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (!cell->at_boundary(f))
       {
         fiv.reinit(cell,
index b6c9a794d674ab2584b592fd8160f82e1ae54855..382c3e2acc04e4a4e8a020dfea02dd0857157d99 100644 (file)
@@ -82,7 +82,7 @@ test(unsigned int fe_degree)
 
   auto cell = dofh.begin();
 
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (!cell->at_boundary(f))
       {
         fiv.reinit(cell,
index a649ada606f2ce8ef296ee3fc98300883425f223..be34a676bd03e0225df85d06dd4ac57d75346ac8 100644 (file)
@@ -85,7 +85,7 @@ test(unsigned int fe_degree)
   auto cell = dofh.begin(1);
   ++cell;
 
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (!cell->at_boundary(f))
       {
         if (!cell->neighbor_is_coarser(f))
index 5525c2e8baedca3ce9aaec05c8d4f7ac218be0e8..b4728788964328351c73cd85cb53a05f7d1437c4 100644 (file)
@@ -118,7 +118,7 @@ test()
 
   deallog << "** interface between cell 0 and 1 **\n";
 
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (!cell->at_boundary(f))
       {
         fiv.reinit(cell,
index 8a0b49c48f126dc11ec478d59f76a5d5f23cbcbe..5406079d96a7ce1ecbcbf5876bd352811ca02b36 100644 (file)
@@ -85,7 +85,7 @@ test(unsigned int fe_degree)
   auto cell = dofh.begin(1);
   ++cell;
 
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (!cell->at_boundary(f))
       {
         if (!cell->neighbor_is_coarser(f))
index 4e7151039ef8a0ce2b2c458436f3a476791f22e8..02817b5e1b00e5cff897ebfbb46c12454accbd43 100644 (file)
@@ -83,7 +83,7 @@ test(unsigned int fe_degree)
 
   auto cell = dofh.begin();
 
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (!cell->at_boundary(f))
       {
         fiv.reinit(cell,
index 8568b49c2312e432398ea3fbd88a4d05f2caf716..1972fa9d1def9a52d6dd4e546c3242428707229e 100644 (file)
@@ -116,7 +116,7 @@ test(const FiniteElement<dim> &fe)
   }
 
 
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     if (!cell->at_boundary(f))
       {
         fiv.reinit(cell,
index d5893996b99296b5adc2dcaf41d168691a9cd222..14c128f3045432c174d32ff1d4506bc9d30d14e5 100644 (file)
@@ -48,9 +48,7 @@ test(const int n_refinements, const int n_subdivisions, MPI_Comm comm)
     auto cell = tria.begin();
     auto endc = tria.end();
     for (; cell != endc; ++cell)
-      for (unsigned int face_number = 0;
-           face_number < GeometryInfo<dim>::faces_per_cell;
-           ++face_number)
+      for (const unsigned int face_number : GeometryInfo<dim>::face_indices())
         if (std::fabs(cell->face(face_number)->center()(0) - left) < 1e-12)
           cell->face(face_number)->set_all_boundary_ids(1);
         else if (std::fabs(cell->face(face_number)->center()(0) - right) <
index 60c06676dc87060daf1e906d30a0901763a459a0..24bcaed3bedc040e243208b485b0278a4f31158e 100644 (file)
@@ -44,7 +44,7 @@ test()
 
   for (auto &cell : tria.active_cell_iterators())
     {
-      for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+      for (const unsigned int i : GeometryInfo<dim>::face_indices())
         {
           if (mymap.find(cell->face(i)) == mymap.end())
             {
index 916298b7fa463d10adb7556d0ecc21c1e751e9a9..99018c7b744a7e158efb6b4b41bd3230ffb26cf6 100644 (file)
@@ -39,13 +39,11 @@ main()
                 << std::endl;
 
         bool manifold_ids_are_zero = cell->manifold_id() == 0;
-        for (unsigned int face_n = 0; face_n < GeometryInfo<2>::faces_per_cell;
-             ++face_n)
+        for (const unsigned int face_n : GeometryInfo<2>::face_indices())
           manifold_ids_are_zero &= cell->face(face_n)->manifold_id() == 0;
         AssertThrow(manifold_ids_are_zero, ExcInternalError());
 
-        for (unsigned int face_n = 0; face_n < GeometryInfo<2>::faces_per_cell;
-             ++face_n)
+        for (const unsigned int face_n : GeometryInfo<2>::face_indices())
           if (cell->face(face_n)->at_boundary())
             deallog << "boundary face center distance to origin: "
                     << (cell->face(face_n)->center(/*respect_manifold*/ true) -
@@ -71,13 +69,11 @@ main()
                 << cell->vertex(6) << ", " << cell->vertex(7) << std::endl;
 
         bool manifold_ids_are_zero = cell->manifold_id() == 0;
-        for (unsigned int face_n = 0; face_n < GeometryInfo<3>::faces_per_cell;
-             ++face_n)
+        for (const unsigned int face_n : GeometryInfo<3>::face_indices())
           manifold_ids_are_zero &= cell->face(face_n)->manifold_id() == 0;
         AssertThrow(manifold_ids_are_zero, ExcInternalError());
 
-        for (unsigned int face_n = 0; face_n < GeometryInfo<3>::faces_per_cell;
-             ++face_n)
+        for (const unsigned int face_n : GeometryInfo<3>::face_indices())
           if (cell->face(face_n)->at_boundary())
             deallog << "boundary face center distance to origin: "
                     << (cell->face(face_n)->center(/*respect_manifold*/ true) -
index e8d4a7085206ed50984e92f5cb4f0563dec6f04f..e13377d01d6697f83c0f137e2fdf2f5c0c280524 100644 (file)
@@ -39,13 +39,11 @@ main()
                 << std::endl;
 
         bool manifold_ids_are_zero = cell->manifold_id() == 0;
-        for (unsigned int face_n = 0; face_n < GeometryInfo<2>::faces_per_cell;
-             ++face_n)
+        for (const unsigned int face_n : GeometryInfo<2>::face_indices())
           manifold_ids_are_zero &= cell->face(face_n)->manifold_id() == 0;
         AssertThrow(manifold_ids_are_zero, ExcInternalError());
 
-        for (unsigned int face_n = 0; face_n < GeometryInfo<2>::faces_per_cell;
-             ++face_n)
+        for (const unsigned int face_n : GeometryInfo<2>::face_indices())
           if (cell->face(face_n)->at_boundary())
             deallog << "boundary face center distance to origin: "
                     << (cell->face(face_n)->center(true) - center).norm()
@@ -69,13 +67,11 @@ main()
                 << cell->vertex(6) << ", " << cell->vertex(7) << std::endl;
 
         bool manifold_ids_are_zero = cell->manifold_id() == 0;
-        for (unsigned int face_n = 0; face_n < GeometryInfo<3>::faces_per_cell;
-             ++face_n)
+        for (const unsigned int face_n : GeometryInfo<3>::face_indices())
           manifold_ids_are_zero &= cell->face(face_n)->manifold_id() == 0;
         AssertThrow(manifold_ids_are_zero, ExcInternalError());
 
-        for (unsigned int face_n = 0; face_n < GeometryInfo<3>::faces_per_cell;
-             ++face_n)
+        for (const unsigned int face_n : GeometryInfo<3>::face_indices())
           if (cell->face(face_n)->at_boundary())
             {
               deallog << "boundary face center distance to origin: "
index 1f350874f093dd1c790ae1b35f74b7c08c28c672..7b73b804da97f78b1511b9b9eb0e0e2ecee52a77 100644 (file)
@@ -33,8 +33,7 @@ test()
     if (cell->at_boundary())
       {
         cell->set_manifold_id(1);
-        for (unsigned int face_n = 0; face_n < GeometryInfo<2>::faces_per_cell;
-             ++face_n)
+        for (const unsigned int face_n : GeometryInfo<2>::face_indices())
           if (!cell->face(face_n)->at_boundary())
             cell->face(face_n)->set_manifold_id(1);
       }
@@ -62,8 +61,7 @@ test()
   for (const auto &cell : triangulation_3.active_cell_iterators())
     {
       cell_centers[cell->manifold_id()].push_back(cell->center());
-      for (unsigned int face_n = 0; face_n < GeometryInfo<3>::faces_per_cell;
-           ++face_n)
+      for (const unsigned int face_n : GeometryInfo<3>::face_indices())
         face_centers[cell->face(face_n)->manifold_id()].push_back(
           cell->face(face_n)->center());
       for (unsigned int line_n = 0; line_n < GeometryInfo<3>::lines_per_cell;
index b1060f7bc862824a400c82d0603908aa6f1a9efa..b257dd5d1e06c06102f793c73cf40d803a7e0a9d 100644 (file)
@@ -47,7 +47,7 @@ test(std::ostream &out)
     {
       deallog << "2d cell " << c
               << " has the following face orientations:" << std::endl;
-      for (unsigned int l = 0; l < GeometryInfo<2>::faces_per_cell; ++l)
+      for (const unsigned int l : GeometryInfo<2>::face_indices())
         deallog << "    " << (c->face_orientation(l) ? "true" : "false")
                 << std::endl;
     }
@@ -63,7 +63,7 @@ test(std::ostream &out)
         << "3d cell " << c
         << " has the following face orientation/flips and edge orientations:"
         << std::endl;
-      for (unsigned int f = 0; f < GeometryInfo<3>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<3>::face_indices())
         deallog << "    face=" << f
                 << (c->face_orientation(f) ? " -> true" : " -> false")
                 << (c->face_flip(f) ? "/true" : "/false") << std::endl;
index 912c2c1733e2e539a65d7d6941b830c8c177f237..98c88d14f52ca79ccbe8dc4d772fd9ba7da86640 100644 (file)
@@ -40,7 +40,7 @@ test()
     {
       deallog << "2d cell " << c
               << " has the following face orientations:" << std::endl;
-      for (unsigned int l = 0; l < GeometryInfo<2>::faces_per_cell; ++l)
+      for (const unsigned int l : GeometryInfo<2>::face_indices())
         deallog << "    " << (c->face_orientation(l) ? "true" : "false")
                 << std::endl;
     }
@@ -56,7 +56,7 @@ test()
         << "3d cell " << c
         << " has the following face orientation/flips and edge orientations:"
         << std::endl;
-      for (unsigned int f = 0; f < GeometryInfo<3>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<3>::face_indices())
         deallog << "    face=" << f
                 << (c->face_orientation(f) ? " -> true" : " -> false")
                 << (c->face_flip(f) ? "/true" : "/false") << std::endl;
index 1c1f68fa01d86b64ffde9226f64899792f5089af..a1266795d4e570e49872278307fe3ea2532c9450 100644 (file)
@@ -38,7 +38,7 @@ test()
     {
       deallog << "2d cell " << c
               << " has the following face orientations:" << std::endl;
-      for (unsigned int l = 0; l < GeometryInfo<2>::faces_per_cell; ++l)
+      for (const unsigned int l : GeometryInfo<2>::face_indices())
         deallog << "    " << (c->face_orientation(l) ? "true" : "false")
                 << std::endl;
     }
@@ -55,7 +55,7 @@ test()
         << "3d cell " << c
         << " has the following face orientation/flips and edge orientations:"
         << std::endl;
-      for (unsigned int f = 0; f < GeometryInfo<3>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<3>::face_indices())
         deallog << "    face=" << f
                 << (c->face_orientation(f) ? " -> true" : " -> false")
                 << (c->face_flip(f) ? "/true" : "/false") << std::endl;
index 6ad14f40214df752b63e2ca8e193a94cb06f3817..1beea73384ebb696826f69068a61e666b0958349 100644 (file)
@@ -48,7 +48,7 @@ test(const char *filename)
   for (Triangulation<3>::active_cell_iterator cell = tria.begin_active();
        cell != tria.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<3>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<3>::face_indices())
       if (cell->face_orientation(f) == false)
         {
           ++misoriented_faces;
index 0ff0657e0c190d4e62af1a145858c6e570e293a2..16228383d9370ed175e99cfb5acd8a5886d7756b 100644 (file)
@@ -53,8 +53,7 @@ test()
   std::set<typename Triangulation<dim, spacedim>::active_face_iterator>
     face_set;
   for (const auto &cell : tria.active_cell_iterators())
-    for (unsigned int face_n = 0; face_n < GeometryInfo<dim>::faces_per_cell;
-         ++face_n)
+    for (const unsigned int face_n : GeometryInfo<dim>::face_indices())
       if (cell->face(face_n)->at_boundary() &&
           cell->face(face_n)->manifold_id() == manifold_id)
         face_set.insert(cell->face(face_n));
index 75a9fa8a6585d384f29c56cac56d5e692bbd9355..458a54cab65a790f49809b76a141b413dcfa546e 100644 (file)
@@ -95,8 +95,7 @@ check_grid()
   for (; cell != endc; ++cell)
     {
       deallog << cell << std::endl;
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         {
           deallog << face << ": "
                   << (cell->face_orientation(face) ? "true " : "false ")
index fd494eaea66c787a5d063e0d6a1d1fe36ce5e99a..69e79adbb5ddbe5e9708f78cfec716245940a411 100644 (file)
@@ -36,7 +36,7 @@ print_triangulation(const Triangulation<dim, dim> &tria)
     {
       deallog << cell.material_id() << " ";
 
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         deallog << (cell.face(f)->at_boundary() ? cell.face(f)->boundary_id() :
                                                   -1)
                 << " ";
index 119430e7c63a14310358846417e95ed43b23a547..4668359195d9080a084fe046f6f709da5f19ee37 100644 (file)
@@ -38,7 +38,7 @@ dim_test()
 
   for (; cell != tr.end(); ++cell)
     {
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           if (cell->face(f)->at_boundary())
             deallog << "half_hyper_shell<" << dim << ">:: cell "
index a48ee8f6330ae90d125893fd9c39e61102d1779e..351697570e3a734219101f28ca6638cfd4e22ed7 100644 (file)
@@ -38,8 +38,7 @@ test()
     {
       deallog << "cell:" << std::endl;
 
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         {
           if (cell->face(face)->at_boundary() &&
               cell->face(face)->boundary_id() != 0)
index 801405ca1ff736a91490fa0601048d901e13b3eb..bd72673c704b6eb560d27d4a5162f1da80760d89 100644 (file)
@@ -42,8 +42,7 @@ test()
   std::vector<Tuple> boundary_faces;
 
   for (const auto &cell : triangulation.active_cell_iterators())
-    for (unsigned int face_n = 0; face_n < GeometryInfo<dim>::faces_per_cell;
-         ++face_n)
+    for (const unsigned int face_n : GeometryInfo<dim>::face_indices())
       if (cell->face(face_n)->at_boundary())
         boundary_faces.push_back(
           std::make_tuple(cell->face(face_n)->center(),
index 07be393cbfd7d5029baef85d980ad86a713bbcfc..4b9930828bbab66f0780345767c21b03be066781 100644 (file)
@@ -46,8 +46,7 @@ test()
   std::vector<Tuple> boundary_faces;
 
   for (const auto &cell : triangulation.active_cell_iterators())
-    for (unsigned int face_n = 0; face_n < GeometryInfo<dim>::faces_per_cell;
-         ++face_n)
+    for (const unsigned int face_n : GeometryInfo<dim>::face_indices())
       if (cell->face(face_n)->at_boundary())
         boundary_faces.push_back(
           std::make_tuple(cell->face(face_n)->center(),
index 390db00def7ae0a37f61511f7e5f7602d772c416..fab689d9dfcd7e81a38bf46854b1d13c6f27922f 100644 (file)
@@ -46,8 +46,7 @@ test()
   std::vector<Tuple> boundary_faces;
 
   for (const auto &cell : triangulation.active_cell_iterators())
-    for (unsigned int face_n = 0; face_n < GeometryInfo<dim>::faces_per_cell;
-         ++face_n)
+    for (const unsigned int face_n : GeometryInfo<dim>::face_indices())
       if (cell->face(face_n)->at_boundary())
         boundary_faces.push_back(
           std::make_tuple(cell->face(face_n)->center(),
index 7631d240d3931bd03d0714d89fc46e764c3e63cf..cf804dc6cadbebe9e42925745c21633b42d9fa02 100644 (file)
@@ -42,8 +42,7 @@ test()
   std::vector<Tuple> boundary_faces;
 
   for (const auto &cell : triangulation.active_cell_iterators())
-    for (unsigned int face_n = 0; face_n < GeometryInfo<dim>::faces_per_cell;
-         ++face_n)
+    for (const unsigned int face_n : GeometryInfo<dim>::face_indices())
       if (cell->face(face_n)->at_boundary())
         boundary_faces.push_back(
           std::make_tuple(cell->face(face_n)->center(),
index 62fa18e90d75887bad0db93a62b927a88c2d5f2c..b7bbdbe7e327f3379b2685962c0acb0b8dc2349c 100644 (file)
@@ -52,7 +52,7 @@ check(double r1, double r2, unsigned int n)
            tria.begin_active();
          c != tria.end();
          ++c)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (c->face(f)->at_boundary())
           for (unsigned int e = 0; e < GeometryInfo<dim>::lines_per_face; ++e)
             c->face(f)->line(e)->set_manifold_id(0);
index 85afd94be3b2a0f53599f4a51c154c232bbf7318..84204ca96233762018c3e274470c0832e441167a 100644 (file)
@@ -51,7 +51,7 @@ check(const unsigned int n)
          tria.begin_active();
        cell != tria.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       AssertThrow(cell->face(f)->at_boundary() == cell->at_boundary(f),
                   ExcInternalError());
 
@@ -61,7 +61,7 @@ check(const unsigned int n)
          tria.begin_active();
        cell != tria.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         deallog << cell->face(f) << ' ' << (int)cell->face(f)->boundary_id()
                 << ' ' << cell->face(f)->center().norm() << std::endl;
index 734866bf0f9b3779921acc525c2a5eeacc7443db..4f4a78fc27c180041add16df9d2e2bf9eaba88e2 100644 (file)
@@ -44,7 +44,7 @@ check(double r1, double r2, unsigned int n)
   for (typename Triangulation<dim>::cell_iterator cell = tria.begin();
        cell != tria.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->face(f)->at_boundary())
         for (unsigned int l = 0; l < GeometryInfo<dim>::lines_per_face; ++l)
           AssertThrow(cell->face(f)->line(l)->boundary_id() ==
index cf1b2e64705475d9c1c9906b2f7bb52978e575d6..40117b68bc60640677ac683e42d48ba20957faa1 100644 (file)
@@ -66,7 +66,7 @@ gmsh_grid(const char *name_v2, const char *name_v4)
           AssertThrow((cell_v2->vertex(i) - cell_v4->vertex(i)).norm() < 1.e-10,
                       ExcInternalError());
         }
-      for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+      for (const unsigned int i : GeometryInfo<dim>::face_indices())
         {
           AssertThrow(cell_v2->face(i)->boundary_id() ==
                         cell_v4->face(i)->boundary_id(),
index 4670117c95eb64377302db1ab1b1c6fdc70843e6..f7a191f822e4642155dfd6b9e2ea0ae1c4f10126 100644 (file)
@@ -67,7 +67,7 @@ gmsh_grid(const char *name_v2, const char *name_v41)
                         1.e-10,
                       ExcInternalError());
         }
-      for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+      for (const unsigned int i : GeometryInfo<dim>::face_indices())
         {
           AssertThrow(cell_v2->face(i)->boundary_id() ==
                         cell_v41->face(i)->boundary_id(),
index 24d07afc309250a509069a4ebfcc32fd4e44abb4..b7f24a8f2894d3ffea3b4f76a9023faefa9a155e 100644 (file)
@@ -115,7 +115,7 @@ gmsh_grid(const char *name_v2, const char *name_v4)
       AssertThrow(vertices_v2 == vertices_v4, ExcInternalError());
       std::map<Point<dim>, types::boundary_id, PointComparator<dim>> faces_v2;
       std::map<Point<dim>, types::boundary_id, PointComparator<dim>> faces_v4;
-      for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+      for (const unsigned int i : GeometryInfo<dim>::face_indices())
         {
           faces_v2[cell_v2->face(i)->center()] =
             cell_v2->face(i)->boundary_id();
index 6ce0b9d0e62b4998c4ec43227d8b4422036b2c73..5f249ae113a8e4bacf0a216ab863f027603361c9 100644 (file)
@@ -60,7 +60,7 @@ main()
   cell = tria.begin_active();
   for (; cell != endc; ++cell)
     {
-      for (unsigned int f = 0; f < GeometryInfo<2>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<2>::face_indices())
         if (cell->face(f)->manifold_id() != numbers::flat_manifold_id)
           deallog << cell << " (" << f << ")  "
                   << int(cell->face(f)->manifold_id()) << std::endl;
index 365849a14d3d1985388be4878259221cbaa9c873..97947943136f315c8c611a64ab2665e39dc07bad 100644 (file)
@@ -45,9 +45,7 @@ test(const std::string &filename)
     {
       deallog << "cell->manifold_id: " << cell->manifold_id() << std::endl;
       if (dim > 1)
-        for (unsigned int face_no = 0;
-             face_no < GeometryInfo<dim>::faces_per_cell;
-             ++face_no)
+        for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
           deallog << "cell->face(" << face_no
                   << ")->manifold_id: " << cell->face(face_no)->manifold_id()
                   << std::endl;
index 726e677fc30cad50f0cc78f1009708cd599cdb5f..26faccff40a2364dbe5b526198aa07124ebc5997 100644 (file)
@@ -50,7 +50,7 @@ check_file(const std::string name, typename GridIn<dim>::Format format)
          tria.begin_active();
        cell != tria.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         deallog << cell << ' ' << f << ": " << (int)cell->face(f)->boundary_id()
                 << std::endl;
index d46034dec8b0896ed9353da84c72b95e08f0432e..1f001738a09cde02f8169e6999c920340f7a3d10 100644 (file)
@@ -75,7 +75,7 @@ check(Triangulation<dim, spacedim> &tria)
             AssertDimension(obj1->boundary_id(), obj2->boundary_id());
           }
       if (dim > 1)
-        for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+        for (const unsigned int i : GeometryInfo<dim>::face_indices())
           {
             auto obj1 = cell1->face(i);
             auto obj2 = cell2->face(i);
index 95b33fa647ded7a1cf13203680902689bcdbaf18..536b657ac663445151d8be2a465eb0621a0b3f01 100644 (file)
@@ -91,8 +91,7 @@ check_parallelepiped(bool colorize, bool log, const unsigned int (&subd)[dim])
                                                         triangulation.end();
     for (; cell != endc; ++cell)
       {
-        for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-             ++face)
+        for (const unsigned int face : GeometryInfo<dim>::face_indices())
           {
             if (cell->face(face)->at_boundary())
               {
index d02a13c4f23ebb6e3194bd7d1863167b38303f94..3fbf6edd27cbf13e3ec8d28063a70015a8ae1aed 100644 (file)
@@ -72,7 +72,7 @@ void generate_grid(Triangulation<2> &triangulation)
   Triangulation<2>::face_iterator face_2;
 
   // Look for the two outermost faces:
-  for (unsigned int j = 0; j < GeometryInfo<2>::faces_per_cell; ++j)
+  for (const unsigned int j : GeometryInfo<2>::face_indices())
     {
       if (cell_1->face(j)->center()(1) > 2.9)
         face_1 = cell_1->face(j);
@@ -134,7 +134,7 @@ void generate_grid(Triangulation<3> &triangulation)
   Triangulation<3>::face_iterator face_2;
 
   // Look for the two outermost faces:
-  for (unsigned int j = 0; j < GeometryInfo<3>::faces_per_cell; ++j)
+  for (const unsigned int j : GeometryInfo<3>::face_indices())
     {
       if (cell_1->face(j)->center()(2) > 2.9)
         face_1 = cell_1->face(j);
index 2bdfaf179796fa4338ba2615809bb047ce2600c4..a7863eccc9fd614d6b8a678cec66cb1d0e2e1cd3 100644 (file)
@@ -76,7 +76,7 @@ void generate_grid(Triangulation<2> &triangulation, int orientation)
   Triangulation<2>::face_iterator face_2;
 
   // Look for the two outermost faces:
-  for (unsigned int j = 0; j < GeometryInfo<2>::faces_per_cell; ++j)
+  for (const unsigned int j : GeometryInfo<2>::face_indices())
     {
       if (cell_1->face(j)->center()(1) > 2.9)
         face_1 = cell_1->face(j);
@@ -146,7 +146,7 @@ void generate_grid(Triangulation<3> &triangulation, int orientation)
   Triangulation<3>::face_iterator face_2;
 
   // Look for the two outermost faces:
-  for (unsigned int j = 0; j < GeometryInfo<3>::faces_per_cell; ++j)
+  for (const unsigned int j : GeometryInfo<3>::face_indices())
     {
       if (cell_1->face(j)->center()(2) > 2.9)
         face_1 = cell_1->face(j);
index 0930d783cfd548c3e8c1fe8081fc1a2840be3154..10b5df3b8526735a2c8a42392d30c461161fada9 100644 (file)
@@ -66,9 +66,7 @@ main()
   for (; cell != endc; ++cell)
     {
       if (cell->at_boundary())
-        for (unsigned int face_no = 0;
-             face_no < GeometryInfo<dim>::faces_per_cell;
-             ++face_no)
+        for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
           {
             face = cell->face(face_no);
             if (face->at_boundary())
index 309f1d9cacba2d5ba70122a28de0a5503dbffb41..5f3928518c68d2768336b8ae91182df93de358bb 100644 (file)
@@ -77,8 +77,7 @@ main()
 
   for (; cell != endc; ++cell)
     if (cell->at_boundary() == true)
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         if (cell->face(face)->at_boundary() == true)
           for (unsigned int v = 0; v < GeometryInfo<dim>::vertices_per_face;
                ++v)
index 525c3541ab5930a48fc817de77c65631ff3679c9..3c7b9eda6b7ae9089f59a454aca8a81f2835d222 100644 (file)
@@ -104,8 +104,7 @@ main()
 
   for (; cell != endc; ++cell)
     if (cell->at_boundary() == true)
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         if (cell->face(face)->at_boundary() == true)
           for (unsigned int v = 0; v < GeometryInfo<dim>::vertices_per_face;
                ++v)
index e02984d444f998cbab7ba492d2b9b819a5827e22..bd316ee430cff7e8a6f7b1e869b71c36ff4f2a1a 100644 (file)
@@ -77,8 +77,7 @@ main()
 
   Triangulation<dim>::face_iterator face;
   for (cell = tria.begin_active(); cell != endc; ++cell)
-    for (unsigned int face_no = 0; face_no < GeometryInfo<dim>::faces_per_cell;
-         ++face_no)
+    for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
       {
         face = cell->face(face_no);
         if (face->at_boundary())
index 9ec5175b84570e33908f945c4b0aa28d59f29bdf..fed4fcddd55500b431b7aba5120d7379705f39c5 100644 (file)
@@ -73,9 +73,7 @@ main()
   for (; cell != endc; ++cell)
     {
       if (cell->at_boundary())
-        for (unsigned int face_no = 0;
-             face_no < GeometryInfo<dim>::faces_per_cell;
-             ++face_no)
+        for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
           {
             face = cell->face(face_no);
             if (face->at_boundary())
index 5acf6f075ca43413021a02a280be232b8ab9a2ef..b8128855ea634025e4f7393950691e10f30f98db 100644 (file)
@@ -46,8 +46,7 @@ mesh_info(const Triangulation<dim> &tria)
                                                       endc = tria.end();
     for (; cell != endc; ++cell)
       {
-        for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-             ++face)
+        for (const unsigned int face : GeometryInfo<dim>::face_indices())
           {
             if (cell->face(face)->at_boundary())
               boundary_count[cell->face(face)->boundary_id()]++;
index 80857d9911e14de7dd497538a814fdce1ce9fb2d..b7165628f60f454d710a1c793751a2a26d86b262 100644 (file)
@@ -93,8 +93,7 @@ mesh_info(const Triangulation<dim> &tria, const std::string &filename)
                                                       endc = tria.end();
     for (; cell != endc; ++cell)
       {
-        for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-             ++face)
+        for (const unsigned int face : GeometryInfo<dim>::face_indices())
           {
             if (cell->face(face)->at_boundary())
               boundary_count[cell->face(face)->boundary_id()]++;
index 101892b298bda1e16c359a34864f0f088a9cd77a..c747f86d561ee6256574f9568865a2f57a3907cf 100644 (file)
@@ -106,9 +106,7 @@ main()
       if (cell->material_id() == 2)
         {
           cell->set_manifold_id(tfi_id);
-          for (unsigned int face_n = 0;
-               face_n < GeometryInfo<2>::faces_per_cell;
-               ++face_n)
+          for (const unsigned int face_n : GeometryInfo<2>::face_indices())
             {
               if (cell->face(face_n)->at_boundary())
                 cell->face(face_n)->set_manifold_id(polar_id);
@@ -127,8 +125,7 @@ main()
   std::vector<Point<2> *> inner_pointers;
   for (const auto &cell : result_2.active_cell_iterators())
     {
-      for (unsigned int face_n = 0; face_n < GeometryInfo<2>::faces_per_cell;
-           ++face_n)
+      for (const unsigned int face_n : GeometryInfo<2>::face_indices())
         {
           if (cell->face(face_n)->manifold_id() == polar_id)
             {
@@ -157,9 +154,7 @@ main()
     {
       if (cell->at_boundary())
         {
-          for (unsigned int face_n = 0;
-               face_n < GeometryInfo<2>::faces_per_cell;
-               ++face_n)
+          for (const unsigned int face_n : GeometryInfo<2>::face_indices())
             {
               auto face = cell->face(face_n);
               if (face->at_boundary())
index 03fb15cc334acfec6bbd3a701f7e1844a939e62c..375f246167253debbc39da9bd96d52208d150b7a 100644 (file)
@@ -48,7 +48,7 @@ main()
 
   unsigned int boundary_face_count = 0;
   for (const auto &cell : tria_2.active_cell_iterators())
-    for (unsigned int f = 0; f < GeometryInfo<spacedim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<spacedim>::face_indices())
       if (cell->face(f)->at_boundary())
         ++boundary_face_count;
 
index 354258c0492b1af1d548b4892dcd0f77798be3b8..678fab5ee5a02dbf087d61ae73254386b0f1e8b2 100644 (file)
@@ -46,7 +46,7 @@ void check_this(Triangulation<3> &tria)
        ++cell)
     {
       std::set<unsigned int> vertices;
-      for (unsigned int f = 0; f < GeometryInfo<3>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<3>::face_indices())
         {
           vertices.insert(cell->face(f)->vertex_index(0));
           vertices.insert(cell->face(f)->vertex_index(1));
index 69d3a239b349f5a8d7b425bdadc21e05a1c55c04..0353500ebce6259bf4211bcac9703fbaa89014af 100644 (file)
@@ -45,14 +45,14 @@ void check_this(Triangulation<3> &tria)
 {
   for (Triangulation<3>::cell_iterator cell = tria.begin(); cell != tria.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<3>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<3>::face_indices())
       if (!cell->at_boundary())
         {
           const Triangulation<3>::cell_iterator neighbor = cell->neighbor(f);
           const unsigned int nb_nb = cell->neighbor_of_neighbor(f);
 
           bool found = false;
-          for (unsigned int ff = 0; ff < GeometryInfo<3>::faces_per_cell; ++ff)
+          for (const unsigned int ff : GeometryInfo<3>::face_indices())
             if (neighbor->neighbor(ff) == cell)
               {
                 AssertThrow(found == false, ExcInternalError());
index 6dadec3c4c560890373d7eceff6f61273aad3ecc..ce507f0f226ff7c8cf4b53d6e0f1087baf146978 100644 (file)
@@ -42,8 +42,7 @@ void check_this(Triangulation<3> &tria)
 {
   Triangulation<3>::active_cell_iterator cell = tria.begin_active();
   for (; cell != tria.end(); ++cell)
-    for (unsigned int face_no = 0; face_no < GeometryInfo<3>::faces_per_cell;
-         ++face_no)
+    for (const unsigned int face_no : GeometryInfo<3>::face_indices())
       if (!cell->at_boundary(face_no) &&
           cell->neighbor(face_no)->has_children())
         for (unsigned int subface_no = 0;
index 7890bcd7ac13cda3be43eee86551dc475f3c4f77..027c356365c57782d458b3d245a81d7154a194d3 100644 (file)
@@ -60,8 +60,7 @@ void check_this(Triangulation<3> &tria)
 
   DoFHandler<3>::active_cell_iterator cell = dof_handler.begin_active();
   for (; cell != dof_handler.end(); ++cell)
-    for (unsigned int face_no = 0; face_no < GeometryInfo<3>::faces_per_cell;
-         ++face_no)
+    for (const unsigned int face_no : GeometryInfo<3>::face_indices())
       if (!cell->at_boundary(face_no) &&
           cell->neighbor(face_no)->has_children())
         for (unsigned int subface_no = 0;
index 810206eca15c126184e255431673b7b712e548a3..070d9e568fe32156846731c7264cce594c56e164 100644 (file)
@@ -50,8 +50,7 @@ void check_this(Triangulation<3> &tria)
 
   DoFHandler<3>::active_cell_iterator cell = dof_handler.begin_active();
   for (; cell != dof_handler.end(); ++cell)
-    for (unsigned int face_no = 0; face_no < GeometryInfo<3>::faces_per_cell;
-         ++face_no)
+    for (const unsigned int face_no : GeometryInfo<3>::face_indices())
       if (!cell->at_boundary(face_no) &&
           cell->neighbor(face_no)->has_children())
         for (unsigned int subface_no = 0;
index b332e0b11c07d77b147f730a3bc173f2e82598e1..03974b895f1cad52ea4aeca357c1abac2a5a720d 100644 (file)
@@ -63,7 +63,7 @@ void check(Triangulation<3> &tria)
       // and make sure that the
       // result of the integration is
       // close to zero
-      for (unsigned int f = 0; f < GeometryInfo<3>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<3>::face_indices())
         {
           fe_face_values.reinit(cell, f);
           for (unsigned int q = 0; q < q_face.size(); ++q)
@@ -75,7 +75,7 @@ void check(Triangulation<3> &tria)
 
       // now same for subface
       // integration
-      for (unsigned int f = 0; f < GeometryInfo<3>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<3>::face_indices())
         for (unsigned int sf = 0; sf < GeometryInfo<3>::max_children_per_face;
              ++sf)
           {
index 0be9e4cc602d3b9eef700fddd17b6eff3dbb3cd6..d901cb5cd38562f2ff9167a52f5c0ec73e7ccb92 100644 (file)
@@ -61,8 +61,7 @@ void check(Triangulation<3> &tria)
   // active cells on the refined side don't
   // have any children)
   for (unsigned int cell_no = 0; cell != endc; ++cell, ++cell_no)
-    for (unsigned int face_no = 0; face_no < GeometryInfo<dim>::faces_per_cell;
-         ++face_no)
+    for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
       {
         const Triangulation<dim>::face_iterator face = cell->face(face_no);
 
index 2a95d4894ebf87caf0df777e78fbc503f3054162..8e2e1b531aed25f92d58036c00f9669846336a7f 100644 (file)
@@ -61,7 +61,7 @@ void check_this(Triangulation<3> &tria)
   for (DoFHandler<3>::cell_iterator cell = dof_handler.begin();
        cell != dof_handler.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<3>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<3>::face_indices())
       if (!cell->at_boundary(f))
         {
           const unsigned int nn = cell->neighbor_of_neighbor(f);
index c5602e763d47678eaca61ddc7f7dcf2a1f3609d3..c9606fd94b4ad02db9a9aae10d412352046e0924 100644 (file)
@@ -46,8 +46,7 @@ void check_this(Triangulation<3> &tria)
 
   DoFHandler<3>::active_cell_iterator cell = dof_handler.begin_active();
   for (; cell != dof_handler.end(); ++cell)
-    for (unsigned int face_no = 0; face_no < GeometryInfo<3>::faces_per_cell;
-         ++face_no)
+    for (const unsigned int face_no : GeometryInfo<3>::face_indices())
       if (!cell->at_boundary(face_no))
         {
           if (cell->neighbor(face_no)->has_children())
index a1a07c55b25f6474dda5119313ca3622b3ee30b8..71104dd73a0ae377ff83c14956bc10ddc2062d14 100644 (file)
@@ -40,7 +40,7 @@ count_wrong_faces(const Triangulation<3> &tria)
   for (Triangulation<3>::active_cell_iterator cell = tria.begin_active();
        cell != tria.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<3>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<3>::face_indices())
       if (cell->face_orientation(f) == false)
         ++count;
   return count;
index f2f7a0977fe6d69234fd6a1e004094a77d80a918..b49a301b4da6e43adb6c4b6fb57f29dda0d85bf0 100644 (file)
@@ -36,7 +36,7 @@ void check_this(Triangulation<3> &tria)
   // active ones
   for (Triangulation<3>::cell_iterator cell = tria.begin(); cell != tria.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<3>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<3>::face_indices())
       if (cell->has_children())
         for (unsigned int c = 0; c < GeometryInfo<3>::max_children_per_face;
              ++c)
index 4eed6c47f857f460b831c5dd1d3077e0fe95b3b9..3ffcdf269415136def0ccc45fa21d74bd8c05dd7 100644 (file)
@@ -55,7 +55,7 @@ void check_this(Triangulation<3> &tria)
   for (DoFHandler<3>::cell_iterator cell = dof_handler.begin();
        cell != dof_handler.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<3>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<3>::face_indices())
       if (!cell->at_boundary(f))
         {
           const unsigned int nn = cell->neighbor_of_neighbor(f);
index 592b696183239fb30bc31859d00157e495efc2e7..2e7277c02e10f779e98f48e9f2d53658ac964408 100644 (file)
@@ -58,7 +58,7 @@ void check_this(Triangulation<3> &tria)
   for (DoFHandler<3>::cell_iterator cell = dof_handler.begin();
        cell != dof_handler.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<3>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<3>::face_indices())
       if (!cell->at_boundary(f))
         {
           const unsigned int nn = cell->neighbor_of_neighbor(f);
index fe4910bfb9e10e044f79773dbdb133f1151cc7e2..60f10e5191bf6b14b66418513cb84b25423167fd 100644 (file)
@@ -44,7 +44,7 @@ test()
   unsigned int face_counter = 0;
   for (auto &cell : tria.active_cell_iterators())
     {
-      for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+      for (const unsigned int i : GeometryInfo<dim>::face_indices())
         {
           auto face = cell->face(i);
           if (mymap.find(cell->face(i)) == mymap.end())
index 977b84b5f02ee1abb19bd6f557235c9bf9db368e..e5dd43b017009cb092d2b1893fe41320e53b790f 100644 (file)
@@ -72,8 +72,7 @@ main()
       create_triangulation(case_no, tria);
       const Triangulation<3>::active_cell_iterator cell = tria.begin_active();
       Triangulation<3>::face_iterator              face;
-      for (unsigned int face_no = 0; face_no < GeometryInfo<3>::faces_per_cell;
-           ++face_no)
+      for (const unsigned int face_no : GeometryInfo<3>::face_indices())
         {
           face = cell->face(face_no);
           boundary.get_normals_at_vertices(face, normals);
index 79ec860520414c5da6510c97207775782ab1c5ad..8f156cb75608315c8c957beecb127747664996c1 100644 (file)
@@ -72,8 +72,7 @@ main()
       create_triangulation(case_no, tria);
       const Triangulation<2>::active_cell_iterator cell = tria.begin_active();
       Triangulation<2>::face_iterator              face;
-      for (unsigned int face_no = 0; face_no < GeometryInfo<2>::faces_per_cell;
-           ++face_no)
+      for (const unsigned int face_no : GeometryInfo<2>::face_indices())
         {
           face = cell->face(face_no);
           boundary.get_normals_at_vertices(face, normals);
index 5978613f90e3aa1b614e9cb483090b427435451a..b373f3a6f318275c66e637bd3da61191e5033df6 100644 (file)
@@ -43,8 +43,7 @@ main()
 
   Triangulation<3>::active_cell_iterator cell = tria.begin_active();
   for (; cell != tria.end(); ++cell)
-    for (unsigned int face_no = 0; face_no < GeometryInfo<3>::faces_per_cell;
-         ++face_no)
+    for (const unsigned int face_no : GeometryInfo<3>::face_indices())
       if (cell->at_boundary(face_no))
         {
           Triangulation<3>::face_iterator face = cell->face(face_no);
index d782e9add3407a618b1063c257246f121c0e366a..818d88e1cfc349d55a91f80600a32e5d796b82e1 100644 (file)
@@ -43,8 +43,7 @@ main()
 
   Triangulation<2>::active_cell_iterator cell = tria.begin_active();
   for (; cell != tria.end(); ++cell)
-    for (unsigned int face_no = 0; face_no < GeometryInfo<2>::faces_per_cell;
-         ++face_no)
+    for (const unsigned int face_no : GeometryInfo<2>::face_indices())
       if (cell->at_boundary(face_no))
         {
           Triangulation<2>::face_iterator face = cell->face(face_no);
index 67556849fdd3a59bf136fffb9e3fd6b6f20555b1..cd125eaadc351e5044e2918ede77c80d8b7ade0f 100644 (file)
@@ -76,8 +76,7 @@ main()
       create_triangulation(case_no, tria);
       const Triangulation<3>::active_cell_iterator cell = tria.begin_active();
       Triangulation<3>::face_iterator              face;
-      for (unsigned int face_no = 0; face_no < GeometryInfo<3>::faces_per_cell;
-           ++face_no)
+      for (const unsigned int face_no : GeometryInfo<3>::face_indices())
         {
           face = cell->face(face_no);
           boundary.get_normals_at_vertices(face, normals);
index 9fa12eccb6a8a8b489f512de90d9aacdbb34394b..e45e4c7ee5f7dd03307a742d1cebdbea43417565 100644 (file)
@@ -76,8 +76,7 @@ main()
       create_triangulation(case_no, tria);
       const Triangulation<2>::active_cell_iterator cell = tria.begin_active();
       Triangulation<2>::face_iterator              face;
-      for (unsigned int face_no = 0; face_no < GeometryInfo<2>::faces_per_cell;
-           ++face_no)
+      for (const unsigned int face_no : GeometryInfo<2>::face_indices())
         {
           face = cell->face(face_no);
           boundary.get_normals_at_vertices(face, normals);
index 1bc99f5b08b7bf3e50315fca5f3ab899a7f4dec1..b573979665bef7480e6432c437595ee71d0f3c42 100644 (file)
@@ -71,8 +71,7 @@ main()
       create_triangulation(case_no, tria);
       const Triangulation<3>::active_cell_iterator cell = tria.begin_active();
       Triangulation<3>::face_iterator              face;
-      for (unsigned int face_no = 0; face_no < GeometryInfo<3>::faces_per_cell;
-           ++face_no)
+      for (const unsigned int face_no : GeometryInfo<3>::face_indices())
         {
           deallog << " Face" << face_no << std::endl;
           face = cell->face(face_no);
index fd05cd03cdd054902268c85629236e60c06c7513..8267e94240b88eb00219939215e56d7686d56b73 100644 (file)
@@ -43,8 +43,7 @@ main()
 
   Triangulation<3>::active_cell_iterator cell = tria.begin_active();
   for (; cell != tria.end(); ++cell)
-    for (unsigned int face_no = 0; face_no < GeometryInfo<3>::faces_per_cell;
-         ++face_no)
+    for (const unsigned int face_no : GeometryInfo<3>::face_indices())
       if (cell->at_boundary(face_no))
         {
           deallog << " Face" << face_no << std::endl;
index cc5edd7229acd82363d01a5ec9961b754486e733..62d873449b833bedc27a94e307ef1c436d4ed177 100644 (file)
@@ -67,7 +67,7 @@ test()
   unsigned int neighbor_count = 0;
 
   for (const auto &cell : tria.active_cell_iterators())
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->has_periodic_neighbor(f))
         ++neighbor_count;
 
index 9f8b319e785d0e547e06b942a423ba395ecc987f..c580b46ba73424c820142d913519f4bfa34dbd37 100644 (file)
@@ -74,7 +74,7 @@ test()
   if (dim == 2)
     {
       subcelldata.boundary_lines.resize(GeometryInfo<dim>::faces_per_cell);
-      for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+      for (const unsigned int i : GeometryInfo<dim>::face_indices())
         {
           subcelldata.boundary_lines[i].vertices[0] = i;
           subcelldata.boundary_lines[i].vertices[1] = (i + 1) % 4;
@@ -84,7 +84,7 @@ test()
   else if (dim == 3)
     {
       subcelldata.boundary_quads.resize(GeometryInfo<dim>::faces_per_cell);
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           for (unsigned int i = 0; i < GeometryInfo<dim>::vertices_per_face;
                ++i)
index e39cd5a9333e9748fecf9c2a052845faeba3e6ca..9609bbb8bce8af502e36965f4afd31489cfb7677 100644 (file)
@@ -55,7 +55,7 @@ check_user_pointers(Triangulation<dim> &tr)
     for (typename Triangulation<dim>::cell_iterator it = tr.begin();
          it != tr.end();
          ++it)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (it->face(f)->user_flag_set() == false)
           {
             deallog << '.';
@@ -107,7 +107,7 @@ check_user_indices(Triangulation<dim> &tr)
     for (typename Triangulation<dim>::cell_iterator it = tr.begin();
          it != tr.end();
          ++it)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (it->face(f)->user_flag_set() == false)
           {
             deallog << '.';
@@ -156,7 +156,7 @@ user_pointers(Triangulation<dim> &tr)
     for (typename Triangulation<dim>::cell_iterator it = tr.begin();
          it != tr.end();
          ++it)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (it->face(f)->user_flag_set() == false)
           {
             it->face(f)->set_user_pointer(p++);
@@ -213,7 +213,7 @@ user_indices(Triangulation<dim> &tr)
       it->clear_user_index();
 
       if (dim > 1)
-        for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+        for (const unsigned int f : GeometryInfo<dim>::face_indices())
           it->face(f)->clear_user_index();
 
       if (dim > 2)
@@ -236,7 +236,7 @@ user_indices(Triangulation<dim> &tr)
     for (typename Triangulation<dim>::cell_iterator it = tr.begin();
          it != tr.end();
          ++it)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (it->face(f)->user_flag_set() == false)
           {
             it->face(f)->set_user_index(p++);
index 35ff9cc1ec04c700c0957f07220222a2b3da8f8b..e554f23872d302813cc433835a1c31a4608de200 100644 (file)
@@ -107,9 +107,7 @@ main()
           deallog << "cell uses fe index " << fe_index << ": "
                   << index_is_active << std::endl;
 
-          for (unsigned int face_n = 0;
-               face_n < GeometryInfo<1>::faces_per_cell;
-               ++face_n)
+          for (const unsigned int face_n : GeometryInfo<1>::face_indices())
             {
               AssertThrow(&cell->face(face_n)->get_fe(fe_index) ==
                             &fe_collection[fe_index],
index baa218d5241ecff8b06f6bb455bf76e00c3b9cd9..f977bb48af5c48abca5599eb935726179d1af350 100644 (file)
@@ -74,7 +74,7 @@ test()
 
   cell = dof_handler.begin_active();
   for (; cell != endc; ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       {
         deallog << "cell=" << cell << ", face=" << f
                 << ", fe_index=" << cell->active_fe_index() << ", dofs=";
index 22d37cb1cef06d678cbe015c703bf8e65f63f56a..893b08cf1fdf40f43123a08585eab58f40aebddb 100644 (file)
@@ -74,8 +74,7 @@ test()
              dof_handler.begin_active();
            cell != dof_handler.end();
            ++cell)
-        for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-             ++face)
+        for (const unsigned int face : GeometryInfo<dim>::face_indices())
           if (!cell->at_boundary(face))
             {
               Assert(cell->get_fe().dofs_per_face ==
index 92cbb6eb32c22d1d0bdc0d33cf03953891d60e60..0d0296b6748f7d8c5b4f5386ac2be72ada20d990 100644 (file)
@@ -192,7 +192,7 @@ test2cells(const unsigned int p1 = 2, const unsigned int p2 = 1)
     {
       const unsigned int fe_index = cell->active_fe_index();
       local_face_dof_indices.resize(fe_collection[fe_index].dofs_per_face);
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (!cell->at_boundary(f)) // that's enough for our simple mesh
           {
             deallog << "cell=" << cell << " face=" << f << std::endl;
index 38e88172b041ae6ac63e7359a2f713eba6f89cbb..9a0b694a014ad503ced96273364d2b8f0c1afa33 100644 (file)
@@ -243,7 +243,7 @@ test2cells(const FiniteElement<dim> &fe_0,
     {
       const unsigned int fe_index = cell->active_fe_index();
       local_face_dof_indices.resize(fe_collection[fe_index].dofs_per_face);
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (std::abs(cell->face(f)->center()[0]) < 0.1)
           {
             // deallog << "cell="<<cell<<" face="<<f<<std::endl;
index dfea2c3997086501740476e7969b9df2b454476f..b8595d794f9ff6d779bc3603369866f862040f53 100644 (file)
@@ -69,7 +69,7 @@ check_faces(const hp::DoFHandler<dim> &dof_handler)
          dof_handler.begin_active();
        cell != dof_handler.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       {
         deallog << "face=" << cell->face(f) << std::endl;
         deallog << "n=" << cell->face(f)->n_active_fe_indices() << std::endl;
index 4304caa77854322482acfdbab3bf3e7a52acefb6..8683ea7ecd8dcbad1ca3b6e2b4e5bf4c40e1647a 100644 (file)
@@ -193,9 +193,7 @@ compute_pi_by_perimeter()
             endc                = dof_handler.end();
           long double perimeter = 0;
           for (; cell != endc; ++cell)
-            for (unsigned int face_no = 0;
-                 face_no < GeometryInfo<dim>::faces_per_cell;
-                 ++face_no)
+            for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
               if (cell->face(face_no)->at_boundary())
                 {
                   x_fe_face_values.reinit(cell, face_no);
index 68ea552e9017c2c90f0ad487ea789bb626ac78f2..63ebe590eec2c2bd31285d3a31896d56a4e6c7a8 100644 (file)
@@ -536,9 +536,7 @@ DGMethod<dim>::assemble_system1()
 
       cell->get_dof_indices(dofs);
 
-      for (unsigned int face_no = 0;
-           face_no < GeometryInfo<dim>::faces_per_cell;
-           ++face_no)
+      for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
         {
           typename hp::DoFHandler<dim>::face_iterator face =
             cell->face(face_no);
@@ -715,9 +713,7 @@ DGMethod<dim>::assemble_system2()
 
       cell->get_dof_indices(dofs);
 
-      for (unsigned int face_no = 0;
-           face_no < GeometryInfo<dim>::faces_per_cell;
-           ++face_no)
+      for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
         {
           typename hp::DoFHandler<dim>::face_iterator face =
             cell->face(face_no);
index 6095825157ea77426edf382b5bf4230dcdeb5e07..7694f9d32a3a07668383852c7ff89c98779da1f3 100644 (file)
@@ -328,8 +328,7 @@ HelmholtzProblem<dim>::assemble_system()
                             rhs_values[q_point] * fe_values.JxW(q_point));
           }
 
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         if (cell->face(face)->at_boundary() &&
             (cell->face(face)->boundary_id() == 1))
           {
@@ -500,9 +499,7 @@ HelmholtzProblem<dim>::run()
                                                        triangulation.begin(),
                                                      endc = triangulation.end();
           for (; cell != endc; ++cell)
-            for (unsigned int face = 0;
-                 face < GeometryInfo<dim>::faces_per_cell;
-                 ++face)
+            for (const unsigned int face : GeometryInfo<dim>::face_indices())
               if ((cell->face(face)->center()(0) == -1) ||
                   (cell->face(face)->center()(1) == -1))
                 cell->face(face)->set_boundary_id(1);
index 70fae028c23a33d67dcf65f539534a0de34e4346..c7706a504ddcedbbd7dfeb73a091c73228b7f78c 100644 (file)
@@ -277,7 +277,7 @@ test_fe(Triangulation<dim> &tr, FiniteElement<dim> &fe)
                          face_quadrature,
                          update_values | update_gradients |
                            update_normal_vectors | update_JxW_values);
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     {
       deallog << "boundary_matrix " << i << std::endl;
       fef1.reinit(cell1, i);
index 07dbf53f4dfdc36a9792f903d081d61b0aac7e88..37a7fe1414c62181c9e7582a9256eb26d0275d66 100644 (file)
@@ -200,7 +200,7 @@ test_fe(Triangulation<dim> &tr, FiniteElement<dim> &fv, FiniteElement<dim> &fs)
                          face_quadrature,
                          update_values | update_gradients |
                            update_normal_vectors | update_JxW_values);
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     {
       deallog << "boundary_matrix " << i << std::endl;
       fev1.reinit(cell1, i);
index 168566094ebe37fb944848f87febc63a0b0a9b9b..a298f1d6199874715a4ac5c4000160df825c148c 100644 (file)
@@ -258,7 +258,7 @@ test_fe(Triangulation<dim> &tr, FiniteElement<dim> &fe)
                          face_quadrature,
                          update_values | update_gradients |
                            update_normal_vectors | update_JxW_values);
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     {
       deallog << "boundary_matrix " << i << std::endl;
       fef1.reinit(cell1, i);
index 17c2a0c1cdf1d917839f13020eb942b28a2f5063..7e628e27de15c51a731a2cfe4c77f9edb0d6fcf8 100644 (file)
@@ -99,7 +99,7 @@ test_fe(Triangulation<dim> &tr, FiniteElement<dim> &fe)
                          face_quadrature,
                          update_values | update_gradients |
                            update_normal_vectors | update_JxW_values);
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     {
       deallog << "boundary_matrix " << i << std::endl;
       fef1.reinit(cell1, i);
index feb49b4955f5149276c6a5b3b8aa44268b179e64..6668f87ff323d8b960d8f886dd72b10e3bb562bc 100644 (file)
@@ -258,7 +258,7 @@ test_fe(Triangulation<dim> &tr, FiniteElement<dim> &fe)
                          face_quadrature,
                          update_values | update_gradients |
                            update_normal_vectors | update_JxW_values);
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     {
       deallog << "boundary_matrix " << i << std::endl;
       fef1.reinit(cell1, i);
index 0db48ebb6686131b93dab57ad9e5e03d301eb361..53754c82e743280159c17f0cd92a5a41f5375b8f 100644 (file)
@@ -312,7 +312,7 @@ test_fe(Triangulation<dim> &tr, FiniteElement<dim> &fe)
                          face_quadrature,
                          update_values | update_gradients |
                            update_normal_vectors | update_JxW_values);
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     {
       deallog << "boundary_matrix " << i << std::endl;
       fef1.reinit(cell1, i);
index 0fbed8b7d254e0c784c79342f575e5fd51b0f128..56f1a22f3aff32e5ce212ecd7ee9ef532f699bcd 100644 (file)
@@ -90,7 +90,7 @@ TestMaxwellCurl(Triangulation<dim> &tr)
   deallog << "curl_matrix" << std::endl;
   curl_check.print(deallog, 10);
 
-  for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell; ++face)
+  for (const unsigned int face : GeometryInfo<dim>::face_indices())
     {
       fe_face_values.reinit(cell, face);
       nitsche_curl_matrix<dim>(
index 36bf111ac8c7a736a2bac0d2afbcae14b0314cfd..4001f338b91e058f45a04a6470dee2e60f214815 100644 (file)
@@ -244,7 +244,7 @@ main()
       if (int(cell->material_id()) == 1)
         {
           // Only loop over cells in the fluid region
-          for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+          for (const unsigned int f : GeometryInfo<dim>::face_indices())
             {
               if (!cell->at_boundary(f))
                 {
index 668bedf618dfcffd1f3b8d1c96070b7cd738f88d..960a287be4ea37d757007e607526e8f151fdf6c7 100644 (file)
@@ -376,7 +376,7 @@ namespace Step22
            triangulation.begin_active();
          cell != triangulation.end();
          ++cell)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (cell->face(f)->center()[dim - 1] == 0)
           cell->face(f)->set_all_boundary_ids(1);
     triangulation.refine_global(4 - dim);
index ee886303db75e3b09d9afb12be36372654b5b7c3..3b980d70e8caed29a1f1dfc7cddc1dbcdacd6d06 100644 (file)
@@ -87,7 +87,7 @@ test(unsigned int ref = 1)
 
       // check that FlatManifold returns the middle of the cell.
       deallog << "Cell: " << cell << std::endl;
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           const typename Triangulation<dim, spacedim>::face_iterator &face =
             cell->face(f);
index 6e1babc207201a3c2c93ccd7977a33ac493bb855..3afe831ecbe378e0a5ecb0d88f52ff97010f414a 100644 (file)
@@ -95,7 +95,7 @@ test(unsigned int ref = 1)
 
       // check that FlatManifold returns the middle of the cell.
       deallog << "Cell: " << cell << std::endl;
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           const typename Triangulation<dim, spacedim>::face_iterator &face =
             cell->face(f);
index b012b76817f7a58d40c00d5eff5cb7a8c11a4543..6e091f8c69b575a7958ebc61dd9ff99d79632b30 100644 (file)
@@ -36,7 +36,7 @@ print_info(Triangulation<dim, spacedim> &tria)
 
   for (cell = tria.begin_active(); cell != tria.end(); ++cell)
     {
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (cell->face(f)->at_boundary())
           deallog << "face: " << cell->face(f)
                   << ", boundary_id: " << (int)cell->face(f)->boundary_id()
index 4561f738572764974287237efd20576138860065..dc065b8537a1498100d2b0e31d24cafacc5eb3df 100644 (file)
@@ -39,7 +39,7 @@ print_info(Triangulation<dim, spacedim> &tria)
       deallog << "cell: " << cell << ", material_id: " << cell->material_id()
               << ", manifold_id: " << cell->manifold_id() << std::endl;
 
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         deallog << "face: " << cell->face(f)
                 << ", boundary_id: " << cell->face(f)->boundary_id()
                 << ", manifold_id: " << cell->face(f)->manifold_id()
index 95bb303e8f5d7aa2ef00f1d475040e3370ee4a13..5f4541809f6cc8a2c7f9ff78743076c163e5c85d 100644 (file)
@@ -43,7 +43,7 @@ test(unsigned int ref = 1)
     {
       // check that FlatManifold returns the middle of the cell.
       deallog << "Cell: " << cell << std::endl;
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           const typename Triangulation<dim, spacedim>::face_iterator &face =
             cell->face(f);
index 366a138ff568671c7f65758b28ae74d4b21026ea..9d9bb7fa3e166b8ac222674b337328c7ceb8a3b8 100644 (file)
@@ -105,8 +105,7 @@ check(Triangulation<dim> &tria)
   Tensor<1, dim> n;
   for (const auto &cell : tria.active_cell_iterators())
     {
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         if (cell->face(face)->at_boundary())
           {
             fe_face_values.reinit(cell, face);
index 032caf1cc2829e132638ba985b9458795538bc3a..60059814ca150b89ba4502d4c2fcdf19609e15a7 100644 (file)
@@ -45,7 +45,7 @@ test(unsigned int ref = 1)
     {
       deallog << "C: " << cell << ", mid: " << (int)cell->manifold_id()
               << std::endl;
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         deallog << "f: " << cell->face(f)
                 << ", mid: " << (int)cell->face(f)->manifold_id() << std::endl;
     }
index 1145d49553ab29e381d50c46258b9ea78b90a0b6..f16b38cce2b93a9b02f96821e3f308e58f2c02dd 100644 (file)
@@ -54,7 +54,7 @@ test(unsigned int ref = 1)
     {
       deallog << "C: " << cell << ", mid: " << (int)cell->manifold_id()
               << std::endl;
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         deallog << "f: " << cell->face(f)
                 << ", mid: " << (int)cell->face(f)->manifold_id() << std::endl;
     }
index f9b904516e037b07e50ed93b3e548643a8be4c17..4be45c4f3b559083b99a26c1ed617d36c72361b9 100644 (file)
@@ -51,7 +51,7 @@ test(unsigned int ref = 1)
     {
       deallog << "C: " << cell << ", mid: " << (int)cell->manifold_id()
               << std::endl;
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         deallog << "f: " << cell->face(f)
                 << ", mid: " << (int)cell->face(f)->manifold_id() << std::endl;
     }
index 4b19487bdd60e6cc769197f71d3bad906882ae24..b81462a90fe4ad6397855f9bec3b757baca4c4e3 100644 (file)
@@ -42,7 +42,7 @@ test(unsigned int ref = 1)
 
 
   tria.begin_active()->set_manifold_id(3);
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     tria.begin_active()->face(f)->set_manifold_id(2);
 
   tria.refine_global(1);
@@ -51,7 +51,7 @@ test(unsigned int ref = 1)
     {
       deallog << "C: " << cell << ", mid: " << (int)cell->manifold_id()
               << std::endl;
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         deallog << "f: " << cell->face(f)
                 << ", mid: " << (int)cell->face(f)->manifold_id() << std::endl;
     }
index 453b19c784c19f4698a7451617e3e4de70a286d2..eb49b780ac6b3e0cfb05be99dce1fc570c4e76d4 100644 (file)
@@ -51,7 +51,7 @@ test(unsigned int ref = 1)
   for (cell = tria.begin_active(); cell != tria.end(); ++cell)
     {
       deallog << "C: " << cell << std::endl;
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         deallog << "F: " << cell->face(f)
                 << ", mid: " << (int)cell->face(f)->manifold_id() << std::endl;
     }
index 8e8f46ea2de1c412f43c19f605b39c6516dc96f0..39c0252f946dcac1f138ba1d64cea5f0b32a5f30 100644 (file)
@@ -51,7 +51,7 @@ test(unsigned int ref = 1)
     if (dim < spacedim && cell->center().distance(center) < radius)
       cell->set_all_manifold_ids(1);
     else
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (cell->face(f)->center().distance(center) < radius)
           cell->face(f)->set_all_manifold_ids(1);
 
index 871c0222d719c036863ca5c6e8d5a9af1ab41162..daa3de6614608bd114ef8cf1e3789d404cb4ec87 100644 (file)
@@ -53,7 +53,7 @@ test(unsigned int ref = 1)
   for (cell = tria.begin_active(); cell != tria.end(); ++cell)
     {
       deallog << "C: " << cell << std::endl;
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         deallog << "F: " << cell->face(f)
                 << ", mid: " << (int)cell->face(f)->manifold_id() << std::endl;
     }
index 208336546f57a7523e4493cb55129c3fb34e0211..ebf95800c6a442829f6e4ce408911cebafad2d3a 100644 (file)
@@ -35,7 +35,7 @@ print_info(const Triangulation<dim, spacedim> &tria)
     {
       deallog << "C: " << cell << ", manifold id: " << (int)cell->manifold_id()
               << std::endl;
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           deallog << "f: " << cell->face(f)
                   << ", boundary id: " << (int)cell->face(f)->boundary_id()
index f40c27c8f81a3d313c5aeb94697369ae4d5e9453..1bc95dbe4d8a2a4400954970edb3010098a57eb6 100644 (file)
@@ -35,7 +35,7 @@ print_info(const Triangulation<dim, spacedim> &tria)
     {
       deallog << "C: " << cell << ", manifold id: " << (int)cell->manifold_id()
               << std::endl;
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           deallog << "f: " << cell->face(f)
                   << ", boundary id: " << (int)cell->face(f)->boundary_id()
@@ -75,7 +75,7 @@ test()
            e < static_cast<signed int>(GeometryInfo<dim>::lines_per_cell);
            ++e)
         cell->line(e)->set_manifold_id(e);
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           cell->face(f)->set_boundary_id(f);
           for (signed int e = 0;
index a65d0c7da52876fd3d2afdc59cd95d620fdc6efd..13cb4633a04fef2eaa1cd728882c1a4b931b0791 100644 (file)
@@ -38,7 +38,7 @@ print_info(Triangulation<dim, spacedim> &tria)
               << ", material_id: " << (int)cell->material_id()
               << ", manifold_id: " << (int)cell->manifold_id() << std::endl;
 
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         deallog << "face: " << cell->face(f)
                 << ", boundary_id: " << (int)cell->face(f)->boundary_id()
                 << ", manifold_id: " << (int)cell->face(f)->manifold_id()
index f026c561d34a29dd53cf8a766dea179f42852ec6..d29217e8622c6fe93881f01d4d04d94287698ca4 100644 (file)
@@ -38,7 +38,7 @@ print_info(Triangulation<dim, spacedim> &tria)
               << ", material_id: " << (int)cell->material_id()
               << ", manifold_id: " << (int)cell->manifold_id() << std::endl;
 
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         deallog << "face: " << cell->face(f)
                 << ", boundary_id: " << (int)cell->face(f)->boundary_id()
                 << ", manifold_id: " << (int)cell->face(f)->manifold_id()
index 4195086854b5cb44d97f9e8696d4a295c4af1f31..f3daa34dd99da75340b9619fbb09d6089251fa52 100644 (file)
@@ -41,7 +41,7 @@ main()
   tria.set_manifold(0, spherical);
 
   for (auto &cell : tria.active_cell_iterators())
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         {
           if (std::abs(cell->face(f)->vertex(1).norm() - 1.) < 1e-1)
@@ -80,7 +80,7 @@ main()
             }
         }
   for (auto &cell : tria.active_cell_iterators())
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         {
           // the first choice will contain perturbations in the normal because
index cc8e3f16d6328d3d1bfa19ee384cf986792b481b..c9a7e37ffa6b26658a32da638843a4d89b495751 100644 (file)
@@ -55,7 +55,7 @@ main()
                               update_normal_vectors | update_quadrature_points);
 
   for (auto &cell : tria.active_cell_iterators())
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       {
         fe_values.reinit(cell, f);
 
index 96dbb781639b38818e6420a727170518bb1a2a6f..94a7b3ad5af3f4e9ad40c19cf601f076ba13e4cb 100644 (file)
@@ -58,7 +58,7 @@ main()
                               update_normal_vectors | update_quadrature_points);
 
   for (auto &cell : tria.active_cell_iterators())
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         {
           fe_values.reinit(cell, f);
index a15adb49e2cc065bb73500117f4d0c827d9b84bd..43c838f1405492a6d03460ca8451a3c5c68f523b 100644 (file)
@@ -39,13 +39,11 @@ do_test(const Triangulation<dim, spacedim> &tria)
         deallog << cell->line(line)->center(/*respect_manifold=*/true)
                 << std::endl;
       deallog << "Faces on cell with center: " << cell->center() << std::endl;
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         deallog << cell->face(face)->center(/*respect_manifold=*/true)
                 << std::endl;
       deallog << "Center with manifold: " << cell->center(true) << std::endl;
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         if (cell->at_boundary(face))
           {
             std::vector<Point<spacedim>> points;
@@ -140,8 +138,7 @@ test_cylinder(unsigned int ref = 1)
        cell != tria.end();
        ++cell)
     {
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         if (cell->at_boundary(face))
           {
             bool cell_at_surfaces = true;
index 1a2c217fd4ec92cc553ff3b7e4f47f7c9764702f..b79ad1700da101732e467f0f03f018071c2c8716 100644 (file)
@@ -45,8 +45,7 @@ do_test(const Triangulation<dim, spacedim> &tria)
                   << std::endl;
         }
       deallog << "Faces on cell with center: " << cell->center() << std::endl;
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         {
           deallog << cell->face(face)->center(/*respect_manifold=*/true)
                   << std::endl;
@@ -56,8 +55,7 @@ do_test(const Triangulation<dim, spacedim> &tria)
 
       deallog << "Center with manifold: " << cell->center(true) << std::endl;
       deallog << "Manifold id: " << cell->manifold_id() << std::endl;
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         if (cell->at_boundary(face))
           {
             std::vector<Point<spacedim>> points;
@@ -169,8 +167,7 @@ test_cylinder(unsigned int ref = 1)
     {
       if (cell->at_boundary())
         cell->set_all_manifold_ids(1);
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         if (cell->at_boundary(face))
           {
             bool cell_at_surfaces = true;
index cd3ac96d19c7bfe4370eff9d53f0f0c21a628c3c..11c062866b1e428016d895615e095466e0de9810 100644 (file)
@@ -124,8 +124,7 @@ test_cylinder(unsigned int ref = 1)
        cell != tria.end();
        ++cell)
     {
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         if (cell->at_boundary(face))
           {
             bool cell_at_surfaces = true;
index b7503d8c4fd625aba2dd8fb7b91faf9447fd3b96..bac54e61fa324257d68d682b5e1bc059b70d019c 100644 (file)
@@ -40,13 +40,11 @@ do_test(const Triangulation<dim, spacedim> &tria)
         deallog << cell->line(line)->center(/*respect_manifold=*/true)
                 << std::endl;
       deallog << "Faces on cell with center: " << cell->center() << std::endl;
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         deallog << cell->face(face)->center(/*respect_manifold=*/true)
                 << std::endl;
       deallog << "Center with manifold: " << cell->center(true) << std::endl;
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         if (cell->at_boundary(face))
           {
             std::vector<Point<spacedim>> points;
index 93d21df6ee62500f5608007d004324bbd22a461d..fd01587c16b6cddc332dbebe3135c904a51e851b 100644 (file)
@@ -42,7 +42,7 @@ main()
        cell != tria.end();
        ++cell)
     {
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           bool face_at_sphere_boundary = true;
           for (unsigned int v = 0; v < GeometryInfo<dim - 1>::vertices_per_cell;
index 4d30435653e4152ff7464b477b3ec55251ab787b..d7deeae93d493d1bf93388a48732277a9eacd7e4 100644 (file)
@@ -44,7 +44,7 @@ main()
        cell != tria.end();
        ++cell)
     {
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           bool face_at_sphere_boundary = true;
           for (unsigned int v = 0; v < GeometryInfo<dim - 1>::vertices_per_cell;
index 6ca22539e79b54f55743b806e73152bdee56f339..b6359e37561bd693c3f2e0f190824ec5a85154ca 100644 (file)
@@ -242,7 +242,7 @@ void concentric_disks(Triangulation<2> &         tria,
         1); // not faces ... for Transfinite interpolation
       for (unsigned int k = 0; k < gp.n_balls; ++k)
         {
-          for (unsigned int f = 0; f < GeometryInfo<2>::faces_per_cell; ++f)
+          for (const unsigned int f : GeometryInfo<2>::face_indices())
             {
               const Point<2> p0 = cell->face(f)->vertex(0),
                              p1 = cell->face(f)->vertex(1);
index 2ef1060428da01785721409c1865c018a1186a2a..5c9b864c82f633538617639b42051563c9401689 100644 (file)
@@ -137,7 +137,7 @@ main()
       for (auto &cell : tria.active_cell_iterators())
         {
           deallog << "Face centers:" << std::endl;
-          for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+          for (const unsigned int f : GeometryInfo<dim>::face_indices())
             deallog << cell->face(f)->center(true) << std::endl;
           deallog << std::endl;
         }
index 56c135ba04dabf486fb6581a7a1d4e62d11b14a1..23421c9ac9e018f66e7162641a3954fbd51d320f 100644 (file)
@@ -75,7 +75,7 @@ main()
   for (auto &cell : tria.active_cell_iterators())
     {
       deallog << "Face centers:" << std::endl;
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         deallog << cell->face(f)->center(true) << std::endl;
       deallog << std::endl;
     }
index ca79261197f087841ee462775ba4be06c659c2b6..14833e0278d61aa2a6dcf1b0f32ed69d4b33f7e2 100644 (file)
@@ -148,7 +148,7 @@ main()
   for (auto &cell : tria.cell_iterators())
     {
       bool cell_at_boundary = false;
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (cell->at_boundary(f))
           cell_at_boundary = true;
       if (cell_at_boundary == false)
index da4c4c409189be84b1aa62fc2bf8c49ab4d0fbb6..c1e45d4c8a4f38d81f5432edb3ae6c8be52b79b8 100644 (file)
@@ -54,7 +54,7 @@ test(unsigned int ref = 1)
        cell != tria.end();
        ++cell)
     {
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (cell->face(f)->at_boundary())
           deallog << "Center: " << cell->face(f)->center(true)
                   << ", Norm: " << cell->face(f)->center(true).norm()
index 5dad81ccff0dd9a0d21fade7813ba90fd4c8142c..ede0ff57661eae7026b9495408fe110dd760f972 100644 (file)
@@ -54,7 +54,7 @@ test(unsigned int ref = 1)
        cell != tria.end();
        ++cell)
     {
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (cell->face(f)->at_boundary())
           deallog << "Center: " << cell->face(f)->center(true, true)
                   << ", Norm: " << cell->face(f)->center(true, true).norm()
index 9b27faf564ff2e58f9da4be2b43a48ecbce382b5..aae89e360ea9f129e15ec3713b27edae1c0a9b86 100644 (file)
@@ -40,8 +40,7 @@ print_triangulation_data(Stream &                  stream,
   std::map<int, int> manifold_id_count;
   for (const auto &cell : triangulation.active_cell_iterators())
     {
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         {
           if (cell->face(face)->at_boundary())
             {
@@ -100,8 +99,7 @@ main()
   const types::manifold_id curved_manifold_id = 1;
   for (const auto &cell : tria.active_cell_iterators())
     {
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         {
           if (cell->face(face)->at_boundary())
             {
index e826a3aba4d5e20cc6e07f6581d2f5464a3a59c1..be9fcfef932b53ff2b16a76f12260e514f808908 100644 (file)
@@ -64,8 +64,7 @@ plot_faces(Mapping<dim> &                           mapping,
                                           update_gradients | update_hessians |
                                           update_normal_vectors));
 
-  for (unsigned int face_nr = 0; face_nr < GeometryInfo<dim>::faces_per_cell;
-       ++face_nr)
+  for (const unsigned int face_nr : GeometryInfo<dim>::face_indices())
     {
       deallog << "Face=" << face_nr << std::endl;
       fe_values.reinit(cell, face_nr);
@@ -107,8 +106,7 @@ plot_subfaces(Mapping<dim> &                           mapping,
     q,
     UpdateFlags(update_quadrature_points | update_JxW_values | update_values |
                 update_gradients | update_hessians | update_normal_vectors));
-  for (unsigned int face_nr = 0; face_nr < GeometryInfo<dim>::faces_per_cell;
-       ++face_nr)
+  for (const unsigned int face_nr : GeometryInfo<dim>::face_indices())
     for (unsigned int sub_nr = 0;
          sub_nr < GeometryInfo<dim>::max_children_per_face;
          ++sub_nr)
index df59400f2fa4abd0264bca1fa6f048391ab3b2f9..417691e25794bb0c31920207509bef749dfb47e8 100644 (file)
@@ -64,8 +64,7 @@ plot_faces(Mapping<dim> &                           mapping,
                                           update_gradients | update_hessians |
                                           update_normal_vectors));
 
-  for (unsigned int face_nr = 0; face_nr < GeometryInfo<dim>::faces_per_cell;
-       ++face_nr)
+  for (const unsigned int face_nr : GeometryInfo<dim>::face_indices())
     {
       deallog << "Face=" << face_nr << std::endl;
       fe_values.reinit(cell, face_nr);
@@ -107,8 +106,7 @@ plot_subfaces(Mapping<dim> &                           mapping,
     q,
     UpdateFlags(update_quadrature_points | update_JxW_values | update_values |
                 update_gradients | update_hessians | update_normal_vectors));
-  for (unsigned int face_nr = 0; face_nr < GeometryInfo<dim>::faces_per_cell;
-       ++face_nr)
+  for (const unsigned int face_nr : GeometryInfo<dim>::face_indices())
     for (unsigned int sub_nr = 0;
          sub_nr < GeometryInfo<dim>::max_children_per_face;
          ++sub_nr)
index 48279d61aaf026bfcb3f83aeebe71aa258d826d3..18cf78958dc3b05f0eab795d1ce5cb8390d9cfb8 100644 (file)
@@ -104,8 +104,7 @@ plot_faces(Mapping<dim> &                           mapping,
                                           update_JxW_values |
                                           update_normal_vectors));
 
-  for (unsigned int face_nr = 0; face_nr < GeometryInfo<dim>::faces_per_cell;
-       ++face_nr)
+  for (const unsigned int face_nr : GeometryInfo<dim>::face_indices())
     {
       fe_values.reinit(cell, face_nr);
 
@@ -148,8 +147,7 @@ plot_subfaces(Mapping<dim> &                           mapping,
                                  q,
                                  UpdateFlags(update_quadrature_points |
                                              update_normal_vectors));
-  for (unsigned int face_nr = 0; face_nr < GeometryInfo<dim>::faces_per_cell;
-       ++face_nr)
+  for (const unsigned int face_nr : GeometryInfo<dim>::face_indices())
     for (unsigned int sub_nr = 0;
          sub_nr < GeometryInfo<dim>::max_children_per_face;
          ++sub_nr)
index 5e17940f03ccaf6cd847280d342d4240826942bb..c1b45780eb1ecf4817554cccb31096d2429f2f68 100644 (file)
@@ -91,7 +91,7 @@ main()
   for (DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active();
        cell != dof_handler.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<2>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<2>::face_indices())
       if (cell->face(f)->at_boundary())
         {
           c1_values.reinit(cell, f);
index 47eef5d8f339de926202a1bc8dbdf3832b1ac108..b7120e6ece7e7e3e27e239b221b1faaf5b99f2bb 100644 (file)
@@ -72,7 +72,7 @@ test()
 
   typename Triangulation<dim, spacedim>::active_cell_iterator cell =
     triangulation.begin_active();
-  for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<dim>::face_indices())
     {
       fe_values_mapping.reinit(cell, f);
       fe_values_q.reinit(cell, f);
index dd4f789f4abfdb4ec6fc3ec5b661023878d07c1c..1e9bf4ea1345f941b31f41d34efd274f3353c81b 100644 (file)
@@ -66,7 +66,7 @@ test()
          triangulation.begin_active();
        cell != triangulation.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       {
         const double xc = cell->face(f)->center()[0] - 1.5;
         const double yc = cell->face(f)->center()[1] - 2.5;
@@ -100,7 +100,7 @@ test()
          triangulation.begin_active();
        cell != triangulation.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       {
         const double xc = cell->face(f)->center()[0] - 1.5;
         const double yc = cell->face(f)->center()[1] - 2.5;
index ea231e2cb2ef180d75d7e8b12381cf4ff32821b1..fc9eebcf6aadc099af7bd6b02260be414da9b20c 100644 (file)
@@ -65,7 +65,7 @@ test()
              triangulation.begin_active();
            cell != triangulation.end();
            ++cell)
-        for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+        for (const unsigned int f : GeometryInfo<dim>::face_indices())
           if (cell->face(f)->at_boundary())
             {
               fe_v.reinit(cell, f);
index 06b374904d53322d2dfbc30263b72d3ee105e946..4d4fa8d8710b97e509a0dfa6b7e46f718f485284 100644 (file)
@@ -49,7 +49,7 @@ dim2_grid()
           << ", and unit coordinates: "
           << mapping.transform_real_to_unit_cell(cell, testp) << std::endl;
   for (; cell != endc; ++cell)
-    for (unsigned int face = 0; face < GeometryInfo<2>::faces_per_cell; ++face)
+    for (const unsigned int face : GeometryInfo<2>::face_indices())
       {
         deallog << "For face: " << face << ", the test point projects to: "
                 << mapping.project_real_point_to_unit_point_on_face(cell,
@@ -80,7 +80,7 @@ dim3_grid()
           << ", and unit coordinates: "
           << mapping.transform_real_to_unit_cell(cell, testp) << std::endl;
   for (; cell != endc; ++cell)
-    for (unsigned int face = 0; face < GeometryInfo<3>::faces_per_cell; ++face)
+    for (const unsigned int face : GeometryInfo<3>::face_indices())
       {
         deallog << "For face: " << face << ", the test point projects to: "
                 << mapping.project_real_point_to_unit_point_on_face(cell,
@@ -115,7 +115,7 @@ dim3_parallelepiped_grid()
           << mapping.transform_real_to_unit_cell(cell, testp) << std::endl;
 
   for (; cell != endc; ++cell)
-    for (unsigned int face = 0; face < GeometryInfo<3>::faces_per_cell; ++face)
+    for (const unsigned int face : GeometryInfo<3>::face_indices())
       {
         deallog << "For face: " << face << ", the test point projects to: "
                 << mapping.project_real_point_to_unit_point_on_face(cell,
index 17cb4deaa0afed6b5670a234da7c7e205ade94f7..afad93cca754370ff3be432743948f8ec708b196 100644 (file)
@@ -136,7 +136,7 @@ test()
   typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
                                                     endc = tria.end();
   for (; cell != endc; ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_manifold_ids(0);
   tria.set_manifold(0, manifold);
index 27910d73bb939165655cd1042c534ccbca0ec4a4..70ab7a365d84ca24591646897d06cdd14d347007 100644 (file)
@@ -193,7 +193,7 @@ test()
   typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
                                                     endc = tria.end();
   for (; cell != endc; ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_manifold_ids(0);
   tria.set_manifold(0, manifold);
index e94f87f1483446acc583c40d48057708949ccb33..0cb764fdbec763e78108aefc9460f2c71aa8fbd7 100644 (file)
@@ -177,7 +177,7 @@ test()
   typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
                                                     endc = tria.end();
   for (; cell != endc; ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_manifold_ids(0);
   tria.set_manifold(0, manifold);
index d0da52ccb86ed6724c79659209fe779cff753239..90fe98dcf8ebe449f8e9ac1688ef327df5e23ccf 100644 (file)
@@ -270,8 +270,7 @@ private:
           local_diagonal_vector[phif.static_dofs_per_cell];
         for (unsigned int i = 0; i < phif.static_dofs_per_cell; ++i)
           local_diagonal_vector[i] = 0.;
-        for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-             ++face)
+        for (const unsigned int face : GeometryInfo<dim>::face_indices())
           {
             phif.reinit(cell, face);
             VectorizedArray<number> sigmaF =
index 86637bc48bd2729acd7a944a05e5cf7e3c83e191..ee576e315d88f7e3d437f63425b1cfd1c77e9aa7 100644 (file)
@@ -38,7 +38,7 @@ test()
   typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
                                                     endc = tria.end();
   for (; cell != endc; ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_manifold_ids(0);
   tria.set_manifold(0, manifold);
index b386fb5d45eabcc7d8aa59cd7f99199379ea2c88..a0789be80cf8c943245c4a0bb16a7e0f90af41b4 100644 (file)
@@ -41,7 +41,7 @@ test()
   typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
                                                     endc = tria.end();
   for (; cell != endc; ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_manifold_ids(0);
   tria.set_manifold(0, manifold);
index 8f2721c1ae54f3b3f35e934d958ddf4333802f55..d5b1f58d13366f25389bafe2a8bd9017b5c9968c 100644 (file)
@@ -39,7 +39,7 @@ test()
   typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
                                                     endc = tria.end();
   for (; cell != endc; ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_manifold_ids(0);
   tria.set_manifold(0, manifold);
index d5f680b2738899092fe75c6d6ecd187b864723fd..79366b6fa442bdf2b5da1c68f80afb5820cebfb8 100644 (file)
@@ -61,7 +61,7 @@ test()
   typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
                                                     endc = tria.end();
   for (; cell != endc; ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_manifold_ids(0);
   tria.set_manifold(0, manifold);
index bccd54a3ae0053e8fb216750ce8906b485106936..45607c899dd06850bcb7418e55ef5458b439c856 100644 (file)
@@ -47,7 +47,7 @@ test()
   typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
                                                     endc = tria.end();
   for (; cell != endc; ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_manifold_ids(0);
   tria.set_manifold(0, manifold);
index 9c7e292aff00cc19ae553efcabaff22af67273e7..54788316ce527aa45371c18c5cea0d86013996da 100644 (file)
@@ -61,7 +61,7 @@ test()
   typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
                                                     endc = tria.end();
   for (; cell != endc; ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_manifold_ids(0);
   tria.set_manifold(0, manifold);
index 51a7ebc6908f0f15e0420f8f9409e149ace679d9..9c3614f7f01ab11b3638dabb5d0182dc1e358173 100644 (file)
@@ -159,7 +159,7 @@ test()
   typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
                                                     endc = tria.end();
   for (; cell != endc; ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_manifold_ids(0);
   tria.set_manifold(0, manifold);
index 4c3004ea4c4a5c3b25d8ee79574567620cb08da9..9e8c8bcfad8aad0594da1fdee3963bde839a59eb 100644 (file)
@@ -247,7 +247,7 @@ test()
   typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
                                                     endc = tria.end();
   for (; cell != endc; ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_manifold_ids(0);
   tria.set_manifold(0, manifold);
index d7de6315b9d702c2ce2b7f18a0d8be684f57f208..b9bd39a3a0e70f1d85bb6e6a41be804f7072534a 100644 (file)
@@ -180,7 +180,7 @@ test()
   typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
                                                     endc = tria.end();
   for (; cell != endc; ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_manifold_ids(0);
   tria.set_manifold(0, manifold);
index 82d5942d67ac0a3f8ea97c53b6784e4793be8791..4b8febf87e8132fb310be342f6e170fb362ac61d 100644 (file)
@@ -195,7 +195,7 @@ test()
   typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
                                                     endc = tria.end();
   for (; cell != endc; ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_manifold_ids(0);
   tria.set_manifold(0, manifold);
index 77c4b00407b42560a0017b3d371785d197a17c68..bc477ef91e7cca008d37b3b36c2d869e712c1002 100644 (file)
@@ -181,7 +181,7 @@ test()
   typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
                                                     endc = tria.end();
   for (; cell != endc; ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_manifold_ids(0);
   tria.set_manifold(0, manifold);
index 0c163313d69ad048f6a8de0eafd750e51c6eb01b..ee31aeafddc24a3f284c309cc39518699edbec61 100644 (file)
@@ -172,7 +172,7 @@ test()
   typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
                                                     endc = tria.end();
   for (; cell != endc; ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_manifold_ids(0);
   tria.set_manifold(0, manifold);
index 4e823e94cb2c2336b15b8aed6d5b1e941c0b1098..6d7eb2bb87a0ccb53f5bfd64448325bc8e95cb54 100644 (file)
@@ -44,7 +44,7 @@ test()
   typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
                                                     endc = tria.end();
   for (; cell != endc; ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_manifold_ids(0);
   tria.set_manifold(0, manifold);
index 6404ec5936a3eedb166f383179b7325c114392cd..56cf15c9780c91f13033e8b2bee11200527aa5ea 100644 (file)
@@ -42,7 +42,7 @@ test()
   typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
                                                     endc = tria.end();
   for (; cell != endc; ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_manifold_ids(0);
   tria.set_manifold(0, manifold);
index 08c7bc441edc03a8e20f6346a2e0845ab5630cdd..2eed9aebafc16b3ec0437067af3917d5cdf954e2 100644 (file)
@@ -39,7 +39,7 @@ test()
   typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
                                                     endc = tria.end();
   for (; cell != endc; ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_manifold_ids(0);
   tria.set_manifold(0, manifold);
index faadab48ad342522bb01ba07492e2da6f6c41639..3ff403c92098cd93aae8361348f0ff5fe45594cb 100644 (file)
@@ -38,7 +38,7 @@ test()
   typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
                                                     endc = tria.end();
   for (; cell != endc; ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_manifold_ids(0);
   tria.set_manifold(0, manifold);
index e58f1acd25ef3394513c6c87174ff813dfb9a935..213e048691ef8fa5a2cec946f9015f8275b4ba61 100644 (file)
@@ -193,7 +193,7 @@ test()
   typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
                                                     endc = tria.end();
   for (; cell != endc; ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_manifold_ids(0);
   tria.set_manifold(0, manifold);
index 95c6722b4b910d636fcb1efa1c5d6dfe722666c0..af9037006ac4a202150af394c45855915a18bf32 100644 (file)
@@ -199,7 +199,7 @@ test()
   typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
                                                     endc = tria.end();
   for (; cell != endc; ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_manifold_ids(0);
   tria.set_manifold(0, manifold);
index 73bf0ed99a3f09f8600846ec8ce3e62dfc7b833d..2d856b12ff049e78c8117066b95981bea24992f5 100644 (file)
@@ -41,7 +41,7 @@ test()
   typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
                                                     endc = tria.end();
   for (; cell != endc; ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_manifold_ids(0);
   tria.set_manifold(0, manifold);
index da54db7f8a108179ce6030d0a0bafdb1470cf7ed..72e2f9d2ff05b810741c8ff26735bc602d0f66fe 100644 (file)
@@ -115,7 +115,7 @@ test()
   typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
                                                     endc = tria.end();
   for (; cell != endc; ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_manifold_ids(0);
   tria.set_manifold(0, manifold);
index c5120a553a8dcf23887396897a7e8ce8be883b18..0f4fd5838befca9aea491415e571954c83c62f12 100644 (file)
@@ -53,7 +53,7 @@ test()
   for (typename Triangulation<dim>::cell_iterator cell = tria.begin();
        cell != tria.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_boundary_ids(f);
   std::vector<
index d8c3cc8a1e18c679007609bfd4652e300df6aa6c..870cf8458c615704fee75b3e0fa6031aa0920c9e 100644 (file)
@@ -51,7 +51,7 @@ test()
 
   parallel::distributed::Triangulation<mydim> tria(MPI_COMM_WORLD);
   GridGenerator::hyper_cube(tria);
-  for (unsigned int f = 0; f < GeometryInfo<mydim>::faces_per_cell; ++f)
+  for (const unsigned int f : GeometryInfo<mydim>::face_indices())
     tria.begin_active()->face(f)->set_all_boundary_ids(f);
   std::vector<
     GridTools::PeriodicFacePair<typename Triangulation<mydim>::cell_iterator>>
index ac54e2426b54b9df951df6aa742ff5eb87bf5784..6594d5bba716deb85b9d127e1c4159c1d40891ec 100644 (file)
@@ -117,7 +117,7 @@ test()
            triangulation.begin();
          cell != triangulation.end();
          ++cell)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (cell->face(f)->at_boundary())
           {
             if (std::abs(cell->face(f)->center()[2]) < 1e-12)
index b08e7cae78012e2d1237a43105b529e0e4fa9135..3f08f63458e207074ad2812fce9db39163406636 100644 (file)
@@ -55,7 +55,7 @@ test()
   for (typename Triangulation<dim>::cell_iterator cell = tria.begin();
        cell != tria.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_boundary_ids(f);
   std::vector<
index 65f04d3ab004ba9cc8f5d4eedd9e51a296fe41de..5784918a547ac16d96725c78480576bde2c90a83 100644 (file)
@@ -56,7 +56,7 @@ test()
   for (typename Triangulation<dim>::cell_iterator cell = tria.begin();
        cell != tria.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_boundary_ids(f);
   std::vector<
index 55ff4040426fd9ef4f3a164f83dff2ceca586560..a9766e1282de8879e58a64d3037b08bedd09e26c 100644 (file)
@@ -54,7 +54,7 @@ test()
   for (typename Triangulation<dim>::cell_iterator cell = tria.begin();
        cell != tria.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_boundary_ids(f);
   std::vector<
index 5f5d566ed96b15404f75f04f3f85aa238807dada..0c82043594ec154fce6dafbde838b878d84a726b 100644 (file)
@@ -56,7 +56,7 @@ test()
   for (typename Triangulation<dim>::cell_iterator cell = tria.begin();
        cell != tria.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_boundary_ids(f);
   std::vector<
index a914aa0d03ed2269dd449caf2808246e1ec8b3bf..bf53ef42bc009510a0da8f9c44b3ddfba2f6e44e 100644 (file)
@@ -119,7 +119,7 @@ test()
   typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
                                                     endc = tria.end();
   for (; cell != endc; ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_manifold_ids(0);
   tria.set_manifold(0, manifold);
index db3be89600741310baef62bc06bea85dd885ce15..f55fbd9ab79a5ac1420564e928758ee619068856 100644 (file)
@@ -44,7 +44,7 @@ test()
   typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
                                                     endc = tria.end();
   for (; cell != endc; ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_manifold_ids(0);
   tria.set_manifold(0, manifold);
index 728bae208f3bf2e40ad9ed4666b664127a345972..7ef8a167b12ffb11c4cd383e6c1b1e9451d04189 100644 (file)
@@ -325,8 +325,7 @@ private:
             phi.integrate(false, true);
             local_diagonal_vector[i] = phi.begin_dof_values()[i];
           }
-        for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-             ++face)
+        for (const unsigned int face : GeometryInfo<dim>::face_indices())
           {
             phif.reinit(cell, face);
             VectorizedArray<number> sigmaF =
index e58ca605ceea2762f640411c991c0890caa674c2..599f531b0a72a50feef4fa9158b5b79ae54e15c6 100644 (file)
@@ -190,7 +190,7 @@ test()
   typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
                                                     endc = tria.end();
   for (; cell != endc; ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_manifold_ids(0);
   tria.set_manifold(0, manifold);
index a9b9a5774465290b46b5beb66a467a948dad382d..186f91bca6d2b8b8777d1a4ff52d903e3a63a27a 100644 (file)
@@ -100,9 +100,7 @@ public:
             const FiniteElement<dim> &fe = cell->get_fe();
             local_dofs.resize(fe.dofs_per_face);
 
-            for (unsigned int face_no = 0;
-                 face_no < GeometryInfo<dim>::faces_per_cell;
-                 ++face_no)
+            for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
               if (cell->at_boundary(face_no) == true)
                 {
                   const typename DoFHandler<dim>::face_iterator face =
index 9dcf07c6a7bbee28baec8bc8b5450d05b802b36e..57097b23256ba161048153e37b36aac2b7e4784c 100644 (file)
@@ -103,9 +103,7 @@ public:
             const FiniteElement<dim> &fe = cell->get_fe();
             local_dofs.resize(fe.dofs_per_face);
 
-            for (unsigned int face_no = 0;
-                 face_no < GeometryInfo<dim>::faces_per_cell;
-                 ++face_no)
+            for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
               if (cell->at_boundary(face_no) == true)
                 {
                   const typename DoFHandler<dim>::face_iterator face =
index 2bf5b1db4cab57553efba8ff874568c89ceecdb7..b0d651abf82754081df70f4fd8cc261e0e8084b6 100644 (file)
@@ -99,9 +99,7 @@ public:
             const FiniteElement<dim> &fe = cell->get_fe();
             local_dofs.resize(fe.dofs_per_face);
 
-            for (unsigned int face_no = 0;
-                 face_no < GeometryInfo<dim>::faces_per_cell;
-                 ++face_no)
+            for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
               if (cell->at_boundary(face_no) == true)
                 {
                   const typename DoFHandler<dim>::face_iterator face =
index 519c7a75b6c72404398d98ef6a164e789d2ccb79..436accd1d85b1628718aed04587302d26b2df8b5 100644 (file)
@@ -56,7 +56,7 @@ test()
   typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
                                                     endc = tria.end();
   for (; cell != endc; ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_manifold_ids(0);
   tria.set_manifold(0, manifold);
index d7aad75e241885cd96c73eb950e3fbf738411c93..7a11f6a1e5a6bde2202c244a4ed0ab7f4d89a932 100644 (file)
@@ -122,9 +122,7 @@ private:
                    ExcInternalError());
             // deallog << "c " << cell_data[lane] << std::endl;
 
-            for (unsigned int face = 0;
-                 face < GeometryInfo<dim>::faces_per_cell;
-                 ++face)
+            for (const unsigned int face : GeometryInfo<dim>::face_indices())
               {
                 fe_eval_m.reinit(cell, face);
                 fe_eval_p.reinit(cell, face);
index 5f0506263ca0e33997873e624a708f954203842b..d12abd339714d81d7ac824c2dda35e21d80aa684 100644 (file)
@@ -204,7 +204,7 @@ test()
     constraints.distribute_local_to_global(
       c.matrices[0], c.vectors[0], c.local_dof_indices[0], matrix, rhs);
 
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       constraints.distribute_local_to_global(c.matrices[1 + f],
                                              c.local_dof_indices[0],
                                              c.local_dof_indices[1 + f],
index 7cc23d4f1a2cd1391dc6d72713c11301ee4bb5dc..b10d9085488ee9d66713db6d07453e4c1db0f329 100644 (file)
@@ -244,9 +244,7 @@ namespace LinearAdvectionTest
       {
         if (current_cell->is_locally_owned())
           {
-            for (unsigned int face_n = 0;
-                 face_n < GeometryInfo<dim>::faces_per_cell;
-                 ++face_n)
+            for (const unsigned int face_n : GeometryInfo<dim>::face_indices())
               {
                 const int neighbor_index = current_cell->neighbor_index(face_n);
                 if (neighbor_index != -1) // interior face
index 6722fef8baf1317496aa6c7ddfa5150351981714..b6da8f0092eb41a22a7ab0683073ba7cd294bece 100644 (file)
@@ -82,7 +82,7 @@ test()
          tr.begin_active();
        cell != tr.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_manifold_ids(numbers::flat_manifold_id);
   //  static const SphericalManifold<dim> boundary_shell;
index 5770e1b1e4d90ac4a0922a4a070a10751fdf8202..5914d204e29ffe40742ca40492f95ae73ac209af 100644 (file)
@@ -91,7 +91,7 @@ test(const unsigned int degree_center,
         // verify that our scenario is initialized correctly
         // by checking the number of neighbors of the center cell
         unsigned int n_neighbors = 0;
-        for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+        for (const unsigned int i : GeometryInfo<dim>::face_indices())
           if (static_cast<unsigned int>(cell->neighbor_index(i)) !=
               numbers::invalid_unsigned_int)
             ++n_neighbors;
index 908ccf52e88e4326c320743d11a35ad7a19409c7..dbe3a84ed7166e52e0b88d08b28b59e0b6e26792 100644 (file)
@@ -91,7 +91,7 @@ test(const unsigned int degree_center,
         // verify that our scenario is initialized correctly
         // by checking the number of neighbors of the center cell
         unsigned int n_neighbors = 0;
-        for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+        for (const unsigned int i : GeometryInfo<dim>::face_indices())
           if (static_cast<unsigned int>(cell->neighbor_index(i)) !=
               numbers::invalid_unsigned_int)
             ++n_neighbors;
index a8057367e2e2e901cbede805417e9833f99723ca..f23d9e34256c503430bced7bbe13843a11c22cc0 100644 (file)
@@ -93,7 +93,7 @@ test(const unsigned int degree_center,
             // verify that our scenario is initialized correctly
             // by checking the number of neighbors of the center cell
             unsigned int n_neighbors = 0;
-            for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+            for (const unsigned int i : GeometryInfo<dim>::face_indices())
               if (static_cast<unsigned int>(cell->neighbor_index(i)) !=
                   numbers::invalid_unsigned_int)
                 ++n_neighbors;
@@ -103,7 +103,7 @@ test(const unsigned int degree_center,
         else if (cell->id().to_string() == "0_0:")
           {
             // set different boundary id on leftmost cell
-            for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+            for (const unsigned int f : GeometryInfo<dim>::face_indices())
               if (cell->face(f)->at_boundary())
                 cell->face(f)->set_boundary_id(1);
 
index f9d7dffb1186f5cd240088089d31dffd6d11f6fc..cd3da607af23a26fd4300c1c1b5bb112272fd364 100644 (file)
@@ -126,8 +126,7 @@ test()
               {
                 if (cell->level_subdomain_id() != tr.locally_owned_subdomain())
                   continue;
-                for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell;
-                     ++f)
+                for (const unsigned int f : GeometryInfo<dim>::face_indices())
                   {
                     if (cell->at_boundary(f))
                       continue;
index 4ba4cd4f23888a880bc2e5a1dc2c442b820105a1..1ccc3ff233e6f903eeb505eb966c8d3bb61bcd3a 100644 (file)
@@ -131,8 +131,7 @@ test()
               {
                 if (cell->level_subdomain_id() != tr.locally_owned_subdomain())
                   continue;
-                for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell;
-                     ++f)
+                for (const unsigned int f : GeometryInfo<dim>::face_indices())
                   {
                     if (cell->at_boundary(f))
                       continue;
index 9150815fa22749dd23467283b8f2e46d532aa183..e973917fec32b2c11e8bf6f82dc6d563a75390e4 100644 (file)
@@ -55,8 +55,7 @@ test()
   for (typename Triangulation<dim>::cell_iterator cell = tria.begin();
        cell != tria.end();
        ++cell)
-    for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-         ++face)
+    for (const unsigned int face : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(face))
         {
           if (face >= 2)
index 15673c807ac13cb013a370a3b7371af04ea5fdc3..005920721694b5f75f0bb264f99ca0bef56eb665 100644 (file)
@@ -52,8 +52,7 @@ test()
       for (typename Triangulation<dim>::cell_iterator cell = tria.begin();
            cell != tria.end();
            ++cell)
-        for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-             ++face)
+        for (const unsigned int face : GeometryInfo<dim>::face_indices())
           if (cell->at_boundary(face))
             cell->face(face)->set_all_boundary_ids(face);
 
index c68f8c1975a766fe77095fe31888cb9b7acec2a9..c111472151d59c20ac7ebb1a6e4acb0c37d22f64 100644 (file)
@@ -56,8 +56,7 @@ test()
   for (typename Triangulation<dim>::cell_iterator cell = tria.begin();
        cell != tria.end();
        ++cell)
-    for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-         ++face)
+    for (const unsigned int face : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(face))
         {
           if (face >= 2)
index 61e86544358c8fb330b200ad8229506e31e3acd5..0d111b0f91d90ab16836d5106cf2be0344a9911d 100644 (file)
@@ -53,7 +53,7 @@ test()
   for (typename Triangulation<dim>::cell_iterator cell = tria.begin();
        cell != tria.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (f / 2 != 1 && cell->at_boundary(f))
         cell->face(f)->set_all_boundary_ids(f + 10);
 
index 978cfe05d3c8122027904d3de865a39cb22a0a88..6f59092c5c7b0fd268a02d685a5e4f93f345165c 100644 (file)
@@ -52,7 +52,7 @@ test()
   for (typename Triangulation<dim>::cell_iterator cell = tria.begin();
        cell != tria.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_boundary_ids(f + 10);
 
index dd5f7afe6bdf9feea4d4b61708e61e8a45e02bc9..f0eda24a1d321dc06d97548f58b0148bc8f93b83 100644 (file)
@@ -54,7 +54,7 @@ test()
   for (typename Triangulation<dim>::cell_iterator cell = tria.begin();
        cell != tria.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (cell->at_boundary(f))
         cell->face(f)->set_all_boundary_ids(f);
 
index 2800874bccb6fc14857921f5f3027e4d14bc99f6..0779ce4478a97bb73a15fdf4c22614f5e039ee18 100644 (file)
@@ -73,7 +73,7 @@ test()
               continue;
             }
 
-          for (unsigned int n = 0; n < GeometryInfo<dim>::faces_per_cell; ++n)
+          for (const unsigned int n : GeometryInfo<dim>::face_indices())
             {
               if (cell->at_boundary(n))
                 continue;
index a1506a37b23815dbdb8cb28df7af7f46ea9bac3d..602704b565a857275b4d99b2fe85dc2a804e4cf7 100644 (file)
@@ -78,8 +78,7 @@ test()
                   continue;
                 }
 
-              for (unsigned int n = 0; n < GeometryInfo<dim>::faces_per_cell;
-                   ++n)
+              for (const unsigned int n : GeometryInfo<dim>::face_indices())
                 {
                   if (cell->at_boundary(n))
                     continue;
index 30f625e71fbad0b199b93c6df641c578535012c3..afa0482adc17e38aed748af288bd1feed43bd526 100644 (file)
@@ -82,7 +82,7 @@ test()
                           ExcInternalError());
             }
           else
-            for (unsigned int n = 0; n < GeometryInfo<dim>::faces_per_cell; ++n)
+            for (const unsigned int n : GeometryInfo<dim>::face_indices())
               {
                 if (cell->at_boundary(n))
                   continue;
index 0fa2e88982d28c981e76f6cf345d34e151aba68a..862e007d644eaa6a2f568f0d0bf3fe9a11e00e6d 100644 (file)
@@ -566,9 +566,7 @@ namespace Step22
     // first collect all points locally
     for (; cell != endc; ++cell)
       if (cell->is_locally_owned() && cell->at_boundary())
-        for (unsigned int face_no = 0;
-             face_no < GeometryInfo<dim>::faces_per_cell;
-             ++face_no)
+        for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
           {
             const typename DoFHandler<dim>::face_iterator face =
               cell->face(face_no);
index 501fdab10d470425366a0ade105f62733cf728ae..4aebaa560a971af7cbb5097df963c0dd049d3b57 100644 (file)
@@ -49,7 +49,7 @@ set_periodicity(parallel::distributed::Triangulation<dim> &triangulation,
   typename Triangulation<dim>::face_iterator face_2;
 
   // Look for the two outermost faces:
-  for (unsigned int j = 0; j < GeometryInfo<dim>::faces_per_cell; ++j)
+  for (const unsigned int j : GeometryInfo<dim>::face_indices())
     {
       if (cell_1->face(j)->center()(dim - 1) > 2.9)
         face_1 = cell_1->face(j);
index a6caf06fc7d84e961e5e9d99705c7e6e534b306b..e86b0daa4e289e8e0b5e451aa23a946bd34761b7 100644 (file)
@@ -44,7 +44,7 @@ main(int argc, char *argv[])
     endc = triangulation.end();
   for (; cell != endc; ++cell)
     {
-      for (unsigned int f = 0; f < GeometryInfo<3>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<3>::face_indices())
         {
           const Point<3> face_center = cell->face(f)->center();
           if (cell->face(f)->at_boundary())
index 062649ce08fe493e5935a70127c83a1cfd18920f..5782c1c907bc475ad2bef7b50b748d32b08c6f5e 100644 (file)
@@ -81,7 +81,7 @@ test(const unsigned numRefinementLevels = 2)
 
   // mark faces
   for (auto &cell : triangulation.active_cell_iterators())
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       {
         const Point<dim> &face_center = cell->face(f)->center();
         if (cell->face(f)->at_boundary())
index ba4d6c55c5eb58f29747a03ac990cd1fe45c9ccd..2a1bf187eaf0fead2efd668a871d89d8334a6e0e 100644 (file)
@@ -54,7 +54,7 @@ test(const unsigned numRefinementLevels = 2)
 
   // mark faces
   for (auto &cell : triangulation.active_cell_iterators())
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       {
         const Point<dim> &face_center = cell->face(f)->center();
         if (cell->face(f)->at_boundary())
index cee8276bd7001f35cc603deddc9f6546be23a2db..caf9ebf8e408b89bcd92db7c9f5ee3bc6bf7300c 100644 (file)
@@ -79,7 +79,7 @@ test()
   std::set<types::global_dof_index> starting_indices;
   for (const auto &cell : dofh.active_cell_iterators())
     if (cell->is_locally_owned())
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (!cell->at_boundary(f) && cell->neighbor(f)->is_ghost())
           {
             // we've identified a subdomain interface. use these DoFs
index 6eb7b4918fb0cb626d16bcfa3e6841bb4392bc83..6673a1a27b70d7ee9d0413ba0b1577a4771c17e3 100644 (file)
@@ -161,9 +161,7 @@ namespace Step40
         {
           if (cell->is_locally_owned())
             {
-              for (unsigned int face = 0;
-                   face < GeometryInfo<dim>::faces_per_cell;
-                   ++face)
+              for (const unsigned int face : GeometryInfo<dim>::face_indices())
                 {
                   if ((cell->face(face)->at_boundary()) ||
                       (cell->neighbor(face)->is_active() &&
index d5c26c9bc215d2fd7626ae54ac07073fe4f0e667..6391e2c72e45325d6597d25b7a0f89e71f66ec32 100644 (file)
@@ -162,9 +162,7 @@ namespace Step40
         {
           if (cell->is_locally_owned())
             {
-              for (unsigned int face = 0;
-                   face < GeometryInfo<dim>::faces_per_cell;
-                   ++face)
+              for (const unsigned int face : GeometryInfo<dim>::face_indices())
                 {
                   if ((cell->face(face)->at_boundary()) ||
                       (cell->neighbor(face)->is_active() &&
index d716f69ca73d7802896825703be5337544d18227..3c6be20004056f1d94547bb24e8fa1323d8d80aa 100644 (file)
@@ -96,9 +96,7 @@ check()
       for (const auto level_cell : dof_handler.cell_iterators_on_level(level))
         {
           // Iterate over all faces
-          for (unsigned int i_face = 0;
-               i_face < GeometryInfo<dim>::faces_per_cell;
-               ++i_face)
+          for (const unsigned int i_face : GeometryInfo<dim>::face_indices())
             {
               if ((level_cell->at_boundary(i_face) &&
                    !level_cell->has_periodic_neighbor(i_face)) ||
@@ -131,9 +129,7 @@ check()
       for (const auto level_cell : dof_handler.cell_iterators_on_level(level))
         {
           // Iterate over all faces
-          for (unsigned int i_face = 0;
-               i_face < GeometryInfo<dim>::faces_per_cell;
-               ++i_face)
+          for (const unsigned int i_face : GeometryInfo<dim>::face_indices())
             {
               if (!level_cell->has_periodic_neighbor(i_face) ||
                   level_cell->periodic_neighbor(i_face)->level() !=
index 94e0d06a81cb55db15e2e615a19ac5467a015661..2dc079cace3b0d5b36fe52bf43aaab9e49741b03 100644 (file)
@@ -56,7 +56,7 @@ dofs(const DoFHandler<dim> &dof)
       indices.resize(cell->get_fe().dofs_per_face);
 
       deallog << "Level " << cell->level() << std::endl;
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         {
           typename DoFHandler<dim>::face_iterator face = cell->face(f);
           face->get_mg_dof_indices(cell->level(), indices);
index 0f64d717f84b734404f06079d9160dfc2c5b82a8..7fc4a3cc2ca95abbee86f819c66b56f1d60a80f8 100644 (file)
@@ -131,7 +131,7 @@ initialize(const DoFHandler<dim> &dof, MGLevelObject<Vector<double>> &u)
            ++cell)
         {
           cell->get_mg_dof_indices(dof_indices);
-          for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+          for (const unsigned int f : GeometryInfo<dim>::face_indices())
             {
               cell->face(f)->get_mg_dof_indices(cell->level(), face_indices);
               if (cell->face(f)->at_boundary())
index 66016f252a403b195f5e952e7a46d1754d5ef82f..f142f095bdf36f6e8fdc0a0d08ef40eb1a9cf4f7 100644 (file)
@@ -131,7 +131,7 @@ initialize(const DoFHandler<dim> &dof, MGLevelObject<Vector<double>> &u)
            ++cell)
         {
           cell->get_mg_dof_indices(dof_indices);
-          for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+          for (const unsigned int f : GeometryInfo<dim>::face_indices())
             {
               cell->face(f)->get_mg_dof_indices(cell->level(), face_indices);
               if (cell->face(f)->at_boundary())
index 3561f8ff6441d7cc684369788beabfd71ee1ce8c..12f8c5bae3ffab8ec09034bd05f9d6ce1f3c7f90 100644 (file)
@@ -207,7 +207,7 @@ test()
          triangulation.begin_active();
        cell != triangulation.end();
        ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if ((cell->face(f)->center()[2] != -4) &&
           (cell->face(f)->center()[2] != 7) && (cell->face(f)->at_boundary()))
         cell->face(f)->set_boundary_id(1);
@@ -218,8 +218,7 @@ test()
          triangulation.begin_active();
        cell != triangulation.end();
        ++cell)
-    for (unsigned int face_no = 0; face_no < GeometryInfo<dim>::faces_per_cell;
-         ++face_no)
+    for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
       AssertThrow(cell->at_boundary(face_no) ==
                     cell->face(face_no)->at_boundary(),
                   ExcInternalError());
index 54c48d3df43eb248d47dbf79b52510e6c38cdb16..111fcb259d12af2ff1a38f6470d2c83e1dfde0bc 100644 (file)
@@ -46,7 +46,7 @@ test(const Triangulation<dim> &tr, const FiniteElement<dim> &fe)
   DoFHandler<dim> dof(tr);
   dof.distribute_dofs(fe);
 
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     {
       deallog << "FE=" << fe.get_name() << ", case=" << i << std::endl;
 
@@ -69,7 +69,7 @@ test_hyper_cube()
   Triangulation<dim> tr;
   GridGenerator::hyper_cube(tr);
 
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     tr.begin_active()->face(i)->set_boundary_id(i);
 
   tr.refine_global(2);
index 0de58c2c41e736ddbf746a95cabce17431eb236d..9c6427945efbe418c4eb60d210f7852fc45c9a21 100644 (file)
@@ -47,7 +47,7 @@ test(const Triangulation<dim> &tr, const FiniteElement<dim> &fe)
   DoFHandler<dim> dof(tr);
   dof.distribute_dofs(fe);
 
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     {
       deallog << "FE=" << fe.get_name() << ", case=" << i << std::endl;
 
@@ -70,7 +70,7 @@ test_hyper_cube()
   Triangulation<dim> tr;
   GridGenerator::hyper_cube(tr);
 
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     tr.begin_active()->face(i)->set_boundary_id(i);
 
   tr.refine_global(2);
index f7c933c24e7e299b5e8429a14663a0ced5766f7b..e4ff5e336d9f5142f94727055bc5e46a284825f3 100644 (file)
@@ -57,7 +57,7 @@ test(const Triangulation<dim> &tr, const FiniteElement<dim> &fe)
 
   DoFRenumbering::component_wise(dof);
 
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     {
       deallog << "FE=" << fe.get_name() << ", case=" << i << std::endl;
 
index 47f3f265e1912d9d519fe47f5299cc4d8a4992fb..5baeebc65f18b3c950d83d33cc3f668e300443b4 100644 (file)
@@ -63,7 +63,7 @@ void colorize_sixty_deg_hyper_shell(Triangulation<3> &tria,
   Triangulation<3>::cell_iterator cell = tria.begin();
 
   for (; cell != tria.end(); ++cell)
-    for (unsigned int f = 0; f < GeometryInfo<3>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<3>::face_indices())
       {
         if (!cell->face(f)->at_boundary())
           continue;
index 560edbd888946d93a18d8d9245e21f18de0a43dc..b6e73b02a48d211edbec86194ac531bdd9a27e37 100644 (file)
@@ -61,9 +61,7 @@ run()
       {
         if (cell->is_locally_owned())
           {
-            for (unsigned int face = 0;
-                 face < GeometryInfo<dim>::faces_per_cell;
-                 ++face)
+            for (const unsigned int face : GeometryInfo<dim>::face_indices())
               {
                 if (cell->face(face)->at_boundary())
                   {
index c26110d6524ccfdaa947802b83c372eea478816d..d24b7668a6f8418efe58d9fb67c44470e49ce29a 100644 (file)
@@ -42,7 +42,7 @@ test(const Triangulation<dim> &tr, const hp::FECollection<dim> &fe)
   hp::DoFHandler<dim> dof(tr);
   dof.distribute_dofs(fe);
 
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     {
       deallog << "FE=" << fe[0].get_name() << ", case=" << i << std::endl;
 
@@ -65,7 +65,7 @@ test_hyper_cube()
   Triangulation<dim> tr;
   GridGenerator::hyper_cube(tr);
 
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     tr.begin_active()->face(i)->set_boundary_id(i);
 
   tr.refine_global(2);
index bfed52af14340337d7664638dbe23649d71a798f..9e34476566046ca09a085d4f8882165b399b441c 100644 (file)
@@ -43,7 +43,7 @@ test(const Triangulation<dim> &tr, const hp::FECollection<dim> &fe)
   hp::DoFHandler<dim> dof(tr);
   dof.distribute_dofs(fe);
 
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     {
       deallog << "FE=" << fe[0].get_name() << ", case=" << i << std::endl;
 
@@ -66,7 +66,7 @@ test_hyper_cube()
   Triangulation<dim> tr;
   GridGenerator::hyper_cube(tr);
 
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     tr.begin_active()->face(i)->set_boundary_id(i);
 
   tr.refine_global(2);
index 24f49578c4f0d77728b4082f79172ba25b7d7efd..5ad197eab6c077ef0ae1089b86ac0dc825b2e201 100644 (file)
@@ -49,7 +49,7 @@ test(const Triangulation<dim> &tr, const hp::FECollection<dim> &fe)
 
   DoFRenumbering::component_wise(dof);
 
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     {
       deallog << "FE=" << fe[0].get_name() << ", case=" << i << std::endl;
 
index eea303cf1d09f1a518b611b7152f2063a7d0e326..2439ef92db5ea9d5003b6d4755278b2a5f5042dc 100644 (file)
@@ -46,7 +46,7 @@ test(const Triangulation<dim> &tr, const FiniteElement<dim> &fe)
   DoFHandler<dim> dof(tr);
   dof.distribute_dofs(fe);
 
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     {
       deallog << "FE=" << fe.get_name() << ", case=" << i << std::endl;
 
@@ -69,7 +69,7 @@ test_hyper_cube()
   Triangulation<dim> tr;
   GridGenerator::hyper_cube(tr);
 
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     tr.begin_active()->face(i)->set_boundary_id(i);
 
   tr.refine_global(2);
index b7aface97a08686145d391d90f5b970f1309d2ef..ab8cdb5b7ff32422306f881d00fff4140305fee1 100644 (file)
@@ -47,7 +47,7 @@ test(const Triangulation<dim> &tr, const FiniteElement<dim> &fe)
   DoFHandler<dim> dof(tr);
   dof.distribute_dofs(fe);
 
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     {
       deallog << "FE=" << fe.get_name() << ", case=" << i << std::endl;
 
@@ -70,7 +70,7 @@ test_hyper_cube()
   Triangulation<dim> tr;
   GridGenerator::hyper_cube(tr);
 
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     tr.begin_active()->face(i)->set_boundary_id(i);
 
   tr.refine_global(2);
index 257e06f606602e9b94940916c87c77002caa7c21..7d38898b8bf6033d6d9a0af783df34ac1aa9f63a 100644 (file)
@@ -47,7 +47,7 @@ test(const Triangulation<dim> &tr, const hp::FECollection<dim> &fe)
     cell->set_active_fe_index(cell->index() % 2);
   dof.distribute_dofs(fe);
 
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     {
       deallog << "FE=" << fe[0].get_name() << ", case=" << i << std::endl;
 
@@ -70,7 +70,7 @@ test_hyper_cube()
   Triangulation<dim> tr;
   GridGenerator::hyper_cube(tr);
 
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     tr.begin_active()->face(i)->set_boundary_id(i);
 
   tr.refine_global(2);
index c2a07d75e833a04c7c41800b880c54b51075faa0..86142cef4fb3b46e1bcbb9170d38e7b11f2b348e 100644 (file)
@@ -49,10 +49,10 @@ test(const Triangulation<dim> &tr, const FiniteElement<dim> &fe)
 
   Functions::ConstantFunction<dim> constant_function(1., dim);
   std::map<types::boundary_id, const Function<dim> *> function_map;
-  for (unsigned int j = 0; j < GeometryInfo<dim>::faces_per_cell; ++j)
+  for (const unsigned int j : GeometryInfo<dim>::face_indices())
     function_map[j] = &constant_function;
 
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     {
       deallog << "FE=" << fe.get_name() << ", case=" << i << std::endl;
 
@@ -77,8 +77,7 @@ test(const Triangulation<dim> &tr, const FiniteElement<dim> &fe)
   typename DoFHandler<dim>::active_cell_iterator cell = dof.begin_active(),
                                                  endc = dof.end();
   for (; cell != endc; ++cell)
-    for (unsigned int face_no = 0; face_no < GeometryInfo<dim>::faces_per_cell;
-         ++face_no)
+    for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
       if (cell->face(face_no)->at_boundary())
         {
           typename DoFHandler<dim>::face_iterator face = cell->face(face_no);
@@ -104,7 +103,7 @@ test_hyper_cube()
   Triangulation<dim> tr;
   GridGenerator::hyper_cube(tr);
 
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     tr.begin_active()->face(i)->set_boundary_id(i);
 
   tr.refine_global(2);
index 4b204244ba1c6acb5376b91cb24e382ccad6bd1e..ced4d5c21b4df03f8010a8a82a272fdd3c1a4c17 100644 (file)
@@ -168,9 +168,7 @@ test_boundary_values(const FiniteElement<dim> &fe)
       std::vector<double>         cell_pres_values(face_quadrature.size());
       for (const auto &cell : dof_handler.active_cell_iterators())
         {
-          for (unsigned int face_n = 0;
-               face_n < GeometryInfo<dim>::faces_per_cell;
-               ++face_n)
+          for (const unsigned int face_n : GeometryInfo<dim>::face_indices())
             {
               auto face = cell->face(face_n);
               if (face->at_boundary())
index bdd1b1305d112f79b69bcb0d09d856f6947f78fb..17444fb802f0b7b94df67f928c35b4ea72153e54 100644 (file)
@@ -50,10 +50,10 @@ test(const Triangulation<dim> &tr, const FiniteElement<dim> &fe)
 
   Functions::ConstantFunction<dim> constant_function(1., dim);
   std::map<types::boundary_id, const Function<dim> *> function_map;
-  for (unsigned int j = 0; j < GeometryInfo<dim>::faces_per_cell; ++j)
+  for (const unsigned int j : GeometryInfo<dim>::face_indices())
     function_map[j] = &constant_function;
 
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     {
       deallog << "FE=" << fe.get_name() << ", case=" << i << std::endl;
 
@@ -78,8 +78,7 @@ test(const Triangulation<dim> &tr, const FiniteElement<dim> &fe)
   typename DoFHandler<dim>::active_cell_iterator cell = dof.begin_active(),
                                                  endc = dof.end();
   for (; cell != endc; ++cell)
-    for (unsigned int face_no = 0; face_no < GeometryInfo<dim>::faces_per_cell;
-         ++face_no)
+    for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
       if (cell->face(face_no)->at_boundary())
         {
           typename DoFHandler<dim>::face_iterator face = cell->face(face_no);
@@ -105,7 +104,7 @@ test_hyper_cube()
   Triangulation<dim> tr;
   GridGenerator::hyper_cube(tr);
 
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (const unsigned int i : GeometryInfo<dim>::face_indices())
     tr.begin_active()->face(i)->set_boundary_id(i);
 
   tr.refine_global(2);
index 24c8aad494d3875e56e2a84dbad0ee8e66e63dc7..7c5942852e9e2cd7d68c3288e48f7d10e25064d8 100644 (file)
@@ -1103,8 +1103,7 @@ namespace Step44
                                                       endc =
                                                         triangulation.end();
     for (; cell != endc; ++cell)
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         {
           if (cell->face(face)->at_boundary() == true &&
               cell->face(face)->center()[1] == 1.0 * parameters.scale)
@@ -1803,8 +1802,7 @@ namespace Step44
               Assert(i_group <= J_dof, ExcInternalError());
           }
       }
-    for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-         ++face)
+    for (const unsigned int face : GeometryInfo<dim>::face_indices())
       if (cell->face(face)->at_boundary() == true &&
           cell->face(face)->boundary_id() == 6)
         {
index 94258ef85eccd398e05e50c63f0deff9ee5a25b5..4fc4acae89bd2b3efd746852bd6f2c2d41ce9f31 100644 (file)
@@ -328,7 +328,7 @@ namespace Step18
            triangulation.begin_active();
          cell != triangulation.end();
          ++cell)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (cell->face(f)->at_boundary())
           {
             const Point<dim> face_center = cell->face(f)->center();
index 7c491414f389799c4cd37fb2b50e40d90f97c0ed..cfed4d3ce6ee815e5c8ee888515eb8c7894bd66f 100644 (file)
@@ -344,7 +344,7 @@ namespace Step18
            triangulation.begin_active();
          cell != triangulation.end();
          ++cell)
-      for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (cell->face(f)->at_boundary())
           {
             const Point<dim> face_center = cell->face(f)->center();
index 68ad00d3a5b79f59b7caba4a38a0739d2d327eeb..6ce4ffae8f32a0d9d1a18b4b96b7974af093c5f3 100644 (file)
@@ -1268,8 +1268,7 @@ namespace Step44
                                                       endc =
                                                         triangulation.end();
     for (; cell != endc; ++cell)
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         {
           if (cell->face(face)->at_boundary() == true &&
               cell->face(face)->center()[1] == 1.0 * parameters.scale)
@@ -1829,8 +1828,7 @@ namespace Step44
               Assert(i_group <= J_dof, ExcInternalError());
           }
       }
-    for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-         ++face)
+    for (const unsigned int face : GeometryInfo<dim>::face_indices())
       if (cell->face(face)->at_boundary() == true &&
           cell->face(face)->boundary_id() == 6)
         {
index 0cb3691baee15d9f2d6ca5fe2ffccbf9ea9cde8c..842fc299128e7d664d1f45f701b0693a5002b459 100644 (file)
@@ -1068,8 +1068,7 @@ namespace Step44
                                                       endc =
                                                         triangulation.end();
     for (; cell != endc; ++cell)
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         {
           if (cell->face(face)->at_boundary() == true &&
               cell->face(face)->center()[1] == 1.0 * parameters.scale)
@@ -1629,8 +1628,7 @@ namespace Step44
               Assert(i_group <= J_dof, ExcInternalError());
           }
       }
-    for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-         ++face)
+    for (const unsigned int face : GeometryInfo<dim>::face_indices())
       if (cell->face(face)->at_boundary() == true &&
           cell->face(face)->boundary_id() == 6)
         {
index b142dcaa0ce88faf1dd23c00b1272796974ca561..4e45ce482ecac04430afafac951e61ed8511f5e6 100644 (file)
@@ -1081,8 +1081,7 @@ namespace Step44
                                                       endc =
                                                         triangulation.end();
     for (; cell != endc; ++cell)
-      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-           ++face)
+      for (const unsigned int face : GeometryInfo<dim>::face_indices())
         {
           if (cell->face(face)->at_boundary() == true &&
               cell->face(face)->center()[1] == 1.0 * parameters.scale)
@@ -1640,8 +1639,7 @@ namespace Step44
               Assert(i_group <= J_dof, ExcInternalError());
           }
       }
-    for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
-         ++face)
+    for (const unsigned int face : GeometryInfo<dim>::face_indices())
       if (cell->face(face)->at_boundary() == true &&
           cell->face(face)->boundary_id() == 6)
         {
index 88820d95183ff32da312b0241d9bcefb43b52a54..e71a6c84b32948e2ad9c0e9ce7a9120724f3a160 100644 (file)
@@ -51,7 +51,7 @@ namespace dealii
               return false;
           }
 
-        for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+        for (const unsigned int f : GeometryInfo<dim>::face_indices())
           {
             if (c1->face(f)->at_boundary() != c2->face(f)->at_boundary())
               return false;
@@ -102,7 +102,7 @@ namespace dealii
             if (local_dofs_1 != local_dofs_2)
               return false;
 
-            for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+            for (const unsigned int f : GeometryInfo<dim>::face_indices())
               {
                 std::vector<types::global_dof_index> local_dofs_1(
                   c1->get_fe().dofs_per_face);
@@ -139,7 +139,7 @@ do_boundary(Triangulation<dim, spacedim> &t1)
 {
   typename Triangulation<dim, spacedim>::cell_iterator c1 = t1.begin();
   for (; c1 != t1.end(); ++c1)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (c1->at_boundary(f))
         c1->face(f)->set_boundary_id(42);
 }
index bf34814090129e6e3a0c9350584a666c44fd396b..6b09c9f234919ff0e9ea4bd67330f4808cb8c9fd 100644 (file)
@@ -52,7 +52,7 @@ namespace dealii
               return false;
           }
 
-        for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+        for (const unsigned int f : GeometryInfo<dim>::face_indices())
           {
             if (c1->face(f)->at_boundary() != c2->face(f)->at_boundary())
               return false;
@@ -109,7 +109,7 @@ namespace dealii
             if (local_dofs_1 != local_dofs_2)
               return false;
 
-            for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+            for (const unsigned int f : GeometryInfo<dim>::face_indices())
               {
                 std::vector<types::global_dof_index> local_dofs_1(
                   c1->get_fe().dofs_per_face);
@@ -148,7 +148,7 @@ do_boundary(Triangulation<dim, spacedim> &t1)
 {
   typename Triangulation<dim, spacedim>::cell_iterator c1 = t1.begin();
   for (; c1 != t1.end(); ++c1)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (c1->at_boundary(f))
         c1->face(f)->set_boundary_id(42);
 }
index 73b5d53e757f9d20bd272503d48604b71b79bd1e..5bf61649e361e599ab98e0ea302c1c14a9f0c12f 100644 (file)
@@ -53,7 +53,7 @@ namespace dealii
               return false;
           }
 
-        for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+        for (const unsigned int f : GeometryInfo<dim>::face_indices())
           {
             if (c1->face(f)->at_boundary() != c2->face(f)->at_boundary())
               return false;
@@ -126,7 +126,7 @@ do_boundary(Triangulation<dim, spacedim> &t1)
 {
   typename Triangulation<dim, spacedim>::cell_iterator c1 = t1.begin();
   for (; c1 != t1.end(); ++c1)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (c1->at_boundary(f))
         {
           c1->face(f)->set_boundary_id(42);
index fbda19ba3057e40137e5a083b259fe9bdfa061fb..086664fcfba1b3212171aa77bca27a6b54bc3cfd 100644 (file)
@@ -55,7 +55,7 @@ namespace dealii
               return false;
           }
 
-        for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+        for (const unsigned int f : GeometryInfo<dim>::face_indices())
           {
             if (c1->face(f)->at_boundary() != c2->face(f)->at_boundary())
               return false;
@@ -128,7 +128,7 @@ do_boundary(Triangulation<dim, spacedim> &t1)
 {
   typename Triangulation<dim, spacedim>::cell_iterator c1 = t1.begin();
   for (; c1 != t1.end(); ++c1)
-    for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+    for (const unsigned int f : GeometryInfo<dim>::face_indices())
       if (c1->at_boundary(f))
         c1->face(f)->set_boundary_id(42);
 }
index c0ec5c07eafb07cd565ca65e2de8a6c0a95911b3..f0be17f8fec8dbcb9016e3af0d96f39a1aebcbe6 100644 (file)
@@ -237,9 +237,7 @@ namespace LinearAdvectionTest
       {
         if (current_cell->is_locally_owned())
           {
-            for (unsigned int face_n = 0;
-                 face_n < GeometryInfo<dim>::faces_per_cell;
-                 ++face_n)
+            for (const unsigned int face_n : GeometryInfo<dim>::face_indices())
               {
                 const int neighbor_index = current_cell->neighbor_index(face_n);
                 if (neighbor_index != -1) // interior face

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.