]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove GeometryInfro from a few files
authorPeter Munch <peterrmuench@gmail.com>
Tue, 30 Jun 2020 20:21:02 +0000 (22:21 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Tue, 30 Jun 2020 20:45:56 +0000 (22:45 +0200)
13 files changed:
include/deal.II/dofs/dof_accessor.templates.h
include/deal.II/fe/fe_tools_interpolate.templates.h
include/deal.II/grid/grid_tools.h
include/deal.II/matrix_free/face_setup_internal.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/multigrid/mg_constrained_dofs.h
include/deal.II/numerics/error_estimator.templates.h
include/deal.II/numerics/matrix_creator.templates.h
include/deal.II/numerics/vector_tools_boundary.templates.h
include/deal.II/numerics/vector_tools_constraints.templates.h
include/deal.II/numerics/vector_tools_rhs.templates.h

index 830fd3ca3584d5dffa03f26b01671c74c41e584f..069a0eb5399d442e7f803c18e4d3361ed086ad02 100644 (file)
@@ -2408,7 +2408,7 @@ DoFCellAccessor<dimension_, space_dimension_, level_dof_access>::
              GeometryInfo<dimension_>::faces_per_cell>
     face_iterators;
 
-  for (unsigned int i : GeometryInfo<dimension_>::face_indices())
+  for (unsigned int i : this->face_indices())
     face_iterators[i] =
       dealii::internal::DoFCellAccessorImplementation::get_face(
         *this, i, std::integral_constant<int, dimension_>());
index adb96ff7209bdd5e68c4ca41eb949cf143755a5d..d567cdcb5670cc3c57948e63a1eea838da953e84 100644 (file)
@@ -162,7 +162,7 @@ namespace FETools
              (constraints.n_constraints() == 0));
 
           if (hanging_nodes_not_allowed)
-            for (const unsigned int face : GeometryInfo<dim>::face_indices())
+            for (const unsigned int face : cell1->face_indices())
               Assert(cell1->at_boundary(face) ||
                        cell1->neighbor(face)->level() == cell1->level(),
                      ExcHangingNodesNotAllowed());
@@ -315,7 +315,7 @@ namespace FETools
             (cell->get_fe().dofs_per_vertex != 0) || (fe2.dofs_per_vertex != 0);
 
           if (hanging_nodes_not_allowed)
-            for (const unsigned int face : GeometryInfo<dim>::face_indices())
+            for (const unsigned int face : cell->face_indices())
               Assert(cell->at_boundary(face) ||
                        cell->neighbor(face)->level() == cell->level(),
                      ExcHangingNodesNotAllowed());
@@ -648,7 +648,7 @@ namespace FETools
             (dof1.get_fe().dofs_per_vertex != 0) || (fe2.dofs_per_vertex != 0);
 
           if (hanging_nodes_not_allowed)
-            for (const unsigned int face : GeometryInfo<dim>::face_indices())
+            for (const unsigned int face : cell->face_indices())
               Assert(cell->at_boundary(face) ||
                        cell->neighbor(face)->level() == cell->level(),
                      ExcHangingNodesNotAllowed());
index 3d6e6fd29adc219ad5a7d6a6e5b1daafe1008b19..aebd0cd7dbb623ed2a68256477d1a042e26d111f 100644 (file)
@@ -3215,7 +3215,7 @@ namespace GridTools
           cell = triangulation.begin_active(),
           endc = triangulation.end();
         for (; cell != endc; ++cell)
-          for (const unsigned int face : GeometryInfo<dim>::face_indices())
+          for (const unsigned int face : cell->face_indices())
             if (cell->face(face)->has_children() &&
                 !cell->face(face)->at_boundary())
               {
@@ -3231,7 +3231,7 @@ namespace GridTools
           cell = triangulation.begin_active(),
           endc = triangulation.end();
         for (; cell != endc; ++cell)
-          for (const unsigned int face : GeometryInfo<dim>::face_indices())
+          for (const unsigned int face : cell->face_indices())
             if (cell->face(face)->has_children() &&
                 !cell->face(face)->at_boundary())
               {
@@ -3296,8 +3296,7 @@ namespace GridTools
     std::vector<typename MeshType::active_cell_iterator> &active_neighbors)
   {
     active_neighbors.clear();
-    for (const unsigned int n :
-         GeometryInfo<MeshType::dimension>::face_indices())
+    for (const unsigned int n : cell->face_indices())
       if (!cell->at_boundary(n))
         {
           if (MeshType::dimension == 1)
index ae3b6b2d0418ff159aa636ac76db7220c53023fd..c9a1ede8ce9aa7d342943a81befbb8853aab67bd 100644 (file)
@@ -203,7 +203,7 @@ namespace internal
                 continue;
               typename dealii::Triangulation<dim>::cell_iterator dcell(
                 &triangulation, cell_levels[i].first, cell_levels[i].second);
-              for (const unsigned int f : GeometryInfo<dim>::face_indices())
+              for (const unsigned int f : dcell->face_indices())
                 {
                   if (dcell->at_boundary(f) && !dcell->has_periodic_neighbor(f))
                     continue;
@@ -571,7 +571,7 @@ namespace internal
             &triangulation, cell_levels[i].first, cell_levels[i].second);
           if (use_active_cells)
             Assert(dcell->is_active(), ExcNotImplemented());
-          for (auto f : GeometryInfo<dim>::face_indices())
+          for (const auto f : dcell->face_indices())
             {
               if (dcell->at_boundary(f) && !dcell->has_periodic_neighbor(f))
                 face_is_owned[dcell->face(f)->index()] =
@@ -767,7 +767,7 @@ namespace internal
                   &triangulation,
                   cell_levels[cell].first,
                   cell_levels[cell].second);
-                for (const unsigned int f : GeometryInfo<dim>::face_indices())
+                for (const auto f : dcell->face_indices())
                   {
                     // boundary face
                     if (face_is_owned[dcell->face(f)->index()] ==
index e9a0888b2ca9101bb8b6fcc218939e4c0728ede3..9aadc8521f00f4731ce16c4d1e2038bc639f9544 100644 (file)
@@ -628,7 +628,7 @@ namespace internal
         new_indices.clear();
         typename dealii::Triangulation<dim>::cell_iterator dcell(
           &tria, cell_level_index[cell].first, cell_level_index[cell].second);
-        for (auto f : GeometryInfo<dim>::face_indices())
+        for (auto f : dcell->face_indices())
           {
             // Only inner faces couple different cells
             if (dcell->at_boundary(f) == false &&
@@ -931,8 +931,7 @@ namespace internal
                 for (const auto &cell :
                      dof_handler[no]->cell_iterators_on_level(mg_level + 1))
                   if (cell->level_subdomain_id() == task_info.my_pid)
-                    for (const unsigned int f :
-                         GeometryInfo<dim>::face_indices())
+                    for (const unsigned int f : cell->face_indices())
                       if ((cell->at_boundary(f) == false ||
                            cell->has_periodic_neighbor(f) == true) &&
                           cell->level() >
index 151fb676618f1cf410fdd91823fb7f42f0f3ec3b..ee9293abb0663cb72d90627e68d2853026fb64ff 100644 (file)
@@ -243,8 +243,7 @@ namespace MeshWorker
     info.post_cell(dof_info);
 
     if (integrate_interior_face || integrate_boundary)
-      for (const unsigned int face_no : GeometryInfo<
-             ITERATOR::AccessorType::Container::dimension>::face_indices())
+      for (const unsigned int face_no : cell->face_indices())
         {
           typename ITERATOR::AccessorType::Container::face_iterator face =
             cell->face(face_no);
index 21a22c2b322ea82c9299655f1b2c90db6b119629..79445a8ef9eb692892421ced61de0a64c108498e 100644 (file)
@@ -340,9 +340,7 @@ namespace MeshWorker
         cell_worker(cell, scratch, copy);
 
       if (flags & (work_on_faces | work_on_boundary))
-        for (const unsigned int face_no :
-             GeometryInfo<CellIteratorBaseType::AccessorType::Container::
-                            dimension>::face_indices())
+        for (const unsigned int face_no : cell->face_indices())
           {
             if (cell->at_boundary(face_no) &&
                 !cell->has_periodic_neighbor(face_no))
index d60ac04867d885483436a6fc7149d503254002e7..7a1f228f7be8782862641b333815fc3c3754c9c3 100644 (file)
@@ -277,7 +277,7 @@ MGConstrainedDoFs::initialize(const DoFHandler<dim, spacedim> &dof)
       for (; cell != endc; ++cell)
         if (cell->level_subdomain_id() != numbers::artificial_subdomain_id)
           {
-            for (auto f : GeometryInfo<dim>::face_indices())
+            for (auto f : cell->face_indices())
               if (cell->has_periodic_neighbor(f) &&
                   cell->periodic_neighbor(f)->level() == cell->level())
                 {
index 921395dbd29e8535ca664bfffa8a3d7ea6661d6a..beb539b0aadedc0a7f83b9e7c580ad035800fc2c 100644 (file)
@@ -881,7 +881,7 @@ namespace internal
     local_face_integrals.clear();
 
     // loop over all faces of this cell
-    for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
+    for (const unsigned int face_no : cell->face_indices())
       {
         const typename DoFHandler<dim, spacedim>::face_iterator face =
           cell->face(face_no);
@@ -1290,7 +1290,7 @@ KellyErrorEstimator<dim, spacedim>::estimate(
         const unsigned int present_cell = cell->active_cell_index();
 
         // loop over all faces of this cell
-        for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
+        for (const unsigned int face_no : cell->face_indices())
           {
             Assert(face_integrals.find(cell->face(face_no)) !=
                      face_integrals.end(),
index 2a7d2bab031c12d62b08671f066df9382b89f2f3..bbbdf0467a2523428241ef86a284cf96c9fde530 100644 (file)
@@ -982,7 +982,7 @@ namespace MatrixCreator
       copy_data.cell_matrix.clear();
       copy_data.cell_vector.clear();
 
-      for (const unsigned int face : GeometryInfo<dim>::face_indices())
+      for (const unsigned int face : cell->face_indices())
         // check if this face is on that part of the boundary we are
         // interested in
         if (boundary_functions.find(cell->face(face)->boundary_id()) !=
@@ -1199,7 +1199,7 @@ namespace MatrixCreator
       // inefficient, so we copy the dofs into a set, which enables binary
       // searches.
       unsigned int pos(0);
-      for (const unsigned int face : GeometryInfo<dim>::face_indices())
+      for (const unsigned int face : copy_data.cell->face_indices())
         {
           // check if this face is on that part of
           // the boundary we are interested in
@@ -1420,7 +1420,7 @@ namespace MatrixCreator
       copy_data.cell_vector.clear();
 
 
-      for (const unsigned int face : GeometryInfo<dim>::face_indices())
+      for (const unsigned int face : cell->face_indices())
         // check if this face is on that part of
         // the boundary we are interested in
         if (boundary_functions.find(cell->face(face)->boundary_id()) !=
@@ -1653,7 +1653,7 @@ namespace MatrixCreator
       // inefficient, so we copy the dofs into a set, which enables binary
       // searches.
       unsigned int pos(0);
-      for (const unsigned int face : GeometryInfo<dim>::face_indices())
+      for (const unsigned int face : copy_data.cell->face_indices())
         {
           // check if this face is on that part of
           // the boundary we are interested in
index 4566f8ebb62db0c71134e96d3f3e1998eba54ef4..df11dd947a6686e7905c6f8395dc23f9fa88c5b0 100644 (file)
@@ -96,8 +96,7 @@ namespace VectorTools
       if (dim == 1)
         {
           for (const auto &cell : dof.active_cell_iterators())
-            for (const unsigned int direction :
-                 GeometryInfo<dim>::face_indices())
+            for (const unsigned int direction : cell->face_indices())
               if (cell->at_boundary(direction) &&
                   (function_map.find(cell->face(direction)->boundary_id()) !=
                    function_map.end()))
@@ -220,8 +219,7 @@ namespace VectorTools
 
           for (auto const &cell : dof.active_cell_iterators())
             if (!cell->is_artificial())
-              for (const unsigned int face_no :
-                   GeometryInfo<dim>::face_indices())
+              for (const unsigned int face_no : cell->face_indices())
                 {
                   const FiniteElement<dim, spacedim> &fe = cell->get_fe();
 
@@ -704,7 +702,7 @@ namespace VectorTools
           // Assert that there are no hanging nodes at the boundary
           int level = -1;
           for (const auto &cell : dof.active_cell_iterators())
-            for (auto f : GeometryInfo<dim>::face_indices())
+            for (auto f : cell->face_indices())
               {
                 if (cell->at_boundary(f))
                   {
@@ -930,11 +928,10 @@ namespace VectorTools
       const unsigned int dim      = 3;
       const unsigned int spacedim = 3;
 
-      hp_fe_values.reinit(
-        cell,
-        (cell->active_fe_index() * GeometryInfo<dim>::faces_per_cell + face) *
-            GeometryInfo<dim>::lines_per_face +
-          line);
+      hp_fe_values.reinit(cell,
+                          (cell->active_fe_index() * cell->n_faces() + face) *
+                              GeometryInfo<dim>::lines_per_face +
+                            line);
 
       // Initialize the required
       // objects.
@@ -1104,9 +1101,7 @@ namespace VectorTools
     {
       const unsigned int spacedim = dim;
       hp_fe_values.reinit(cell,
-                          cell->active_fe_index() *
-                              GeometryInfo<dim>::faces_per_cell +
-                            face);
+                          cell->active_fe_index() * cell->n_faces() + face);
       // Initialize the required
       // objects.
       const FEValues<dim> &fe_values = hp_fe_values.get_present_fe_values();
@@ -1610,8 +1605,7 @@ namespace VectorTools
           {
             for (; cell != dof_handler.end(); ++cell)
               if (cell->at_boundary() && cell->is_locally_owned())
-                for (const unsigned int face :
-                     GeometryInfo<dim>::face_indices())
+                for (const unsigned int face : cell->face_indices())
                   if (cell->face(face)->boundary_id() == boundary_component)
                     {
                       // if the FE is a
@@ -1705,8 +1699,7 @@ namespace VectorTools
 
             for (; cell != dof_handler.end(); ++cell)
               if (cell->at_boundary() && cell->is_locally_owned())
-                for (const unsigned int face :
-                     GeometryInfo<dim>::face_indices())
+                for (const unsigned int face : cell->face_indices())
                   if (cell->face(face)->boundary_id() == boundary_component)
                     {
                       // if the FE is a
@@ -1841,8 +1834,7 @@ namespace VectorTools
           {
             for (; cell != dof_handler.end(); ++cell)
               if (cell->at_boundary() && cell->is_locally_owned())
-                for (const unsigned int face :
-                     GeometryInfo<dim>::face_indices())
+                for (const unsigned int face : cell->face_indices())
                   if (cell->face(face)->boundary_id() == boundary_component)
                     {
                       // if the FE is a FE_Nothing object there is no work to do
@@ -1933,8 +1925,7 @@ namespace VectorTools
 
             for (; cell != dof_handler.end(); ++cell)
               if (cell->at_boundary() && cell->is_locally_owned())
-                for (const unsigned int face :
-                     GeometryInfo<dim>::face_indices())
+                for (const unsigned int face : cell->face_indices())
                   if (cell->face(face)->boundary_id() == boundary_component)
                     {
                       // if the FE is a FE_Nothing object there is no work to do
@@ -2043,11 +2034,10 @@ namespace VectorTools
       const FiniteElement<dim> &fe = cell->get_fe();
 
       // reinit for this cell, face and line.
-      hp_fe_values.reinit(
-        cell,
-        (cell->active_fe_index() * GeometryInfo<dim>::faces_per_cell + face) *
-            GeometryInfo<dim>::lines_per_face +
-          line);
+      hp_fe_values.reinit(cell,
+                          (cell->active_fe_index() * cell->n_faces() + face) *
+                              GeometryInfo<dim>::lines_per_face +
+                            line);
 
       // Initialize the required objects.
       const FEValues<dim> &fe_values = hp_fe_values.get_present_fe_values();
@@ -2899,8 +2889,7 @@ namespace VectorTools
                 {
                   if (cell->at_boundary() && cell->is_locally_owned())
                     {
-                      for (const unsigned int face :
-                           GeometryInfo<dim>::face_indices())
+                      for (const unsigned int face : cell->face_indices())
                         {
                           if (cell->face(face)->boundary_id() ==
                               boundary_component)
@@ -3023,8 +3012,7 @@ namespace VectorTools
                 {
                   if (cell->at_boundary() && cell->is_locally_owned())
                     {
-                      for (const unsigned int face :
-                           GeometryInfo<dim>::face_indices())
+                      for (const unsigned int face : cell->face_indices())
                         {
                           if (cell->face(face)->boundary_id() ==
                               boundary_component)
@@ -3444,8 +3432,7 @@ namespace VectorTools
           {
             for (const auto &cell : dof_handler.active_cell_iterators())
               if (cell->at_boundary() && cell->is_locally_owned())
-                for (const unsigned int face :
-                     GeometryInfo<dim>::face_indices())
+                for (const unsigned int face : cell->face_indices())
                   if (cell->face(face)->boundary_id() == boundary_component)
                     {
                       // if the FE is a
@@ -3473,9 +3460,8 @@ namespace VectorTools
                         }
 
                       fe_values.reinit(cell,
-                                       face +
-                                         cell->active_fe_index() *
-                                           GeometryInfo<dim>::faces_per_cell);
+                                       face + cell->active_fe_index() *
+                                                cell->n_faces());
 
                       const std::vector<DerivativeForm<1, dim, spacedim>>
                         &jacobians =
@@ -3513,8 +3499,7 @@ namespace VectorTools
 
             for (const auto &cell : dof_handler.active_cell_iterators())
               if (cell->at_boundary() && cell->is_locally_owned())
-                for (const unsigned int face :
-                     GeometryInfo<dim>::face_indices())
+                for (const unsigned int face : cell->face_indices())
                   if (cell->face(face)->boundary_id() == boundary_component)
                     {
                       // This is only implemented, if the FE is a
@@ -3531,9 +3516,8 @@ namespace VectorTools
                         }
 
                       fe_values.reinit(cell,
-                                       face +
-                                         cell->active_fe_index() *
-                                           GeometryInfo<dim>::faces_per_cell);
+                                       face + cell->active_fe_index() *
+                                                cell->n_faces());
 
                       const std::vector<DerivativeForm<1, dim, spacedim>>
                         &jacobians =
@@ -3615,8 +3599,7 @@ namespace VectorTools
           {
             for (const auto &cell : dof_handler.active_cell_iterators())
               if (cell->at_boundary() && cell->is_locally_owned())
-                for (const unsigned int face :
-                     GeometryInfo<dim>::face_indices())
+                for (const unsigned int face : cell->face_indices())
                   if (cell->face(face)->boundary_id() == boundary_component)
                     {
                       // This is only
@@ -3636,9 +3619,8 @@ namespace VectorTools
                         }
 
                       fe_values.reinit(cell,
-                                       face +
-                                         cell->active_fe_index() *
-                                           GeometryInfo<dim>::faces_per_cell);
+                                       face + cell->active_fe_index() *
+                                                cell->n_faces());
 
                       const std::vector<DerivativeForm<1, dim, spacedim>>
                         &jacobians =
@@ -3669,8 +3651,7 @@ namespace VectorTools
 
             for (const auto &cell : dof_handler.active_cell_iterators())
               if (cell->at_boundary() && cell->is_locally_owned())
-                for (const unsigned int face :
-                     GeometryInfo<dim>::face_indices())
+                for (const unsigned int face : cell->face_indices())
                   if (cell->face(face)->boundary_id() == boundary_component)
                     {
                       // This is only
@@ -3690,9 +3671,8 @@ namespace VectorTools
                         }
 
                       fe_values.reinit(cell,
-                                       face +
-                                         cell->active_fe_index() *
-                                           GeometryInfo<dim>::faces_per_cell);
+                                       face + cell->active_fe_index() *
+                                                cell->n_faces());
 
                       const std::vector<DerivativeForm<1, dim, spacedim>>
                         &jacobians =
index 58d9526b8dd307d2d6daeabd5cba93f009926f77..11e202ecab40052cdff390501416a9e0347dd85d 100644 (file)
@@ -540,7 +540,7 @@ namespace VectorTools
     std::set<types::boundary_id>::iterator b_id;
     for (; cell != endc; ++cell)
       if (!cell->is_artificial())
-        for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
+        for (const unsigned int face_no : cell->face_indices())
           if ((b_id = boundary_ids.find(cell->face(face_no)->boundary_id())) !=
               boundary_ids.end())
             {
@@ -1114,7 +1114,7 @@ namespace VectorTools
     std::vector<std::array<types::global_dof_index, dim>> cell_vector_dofs;
     for (const auto &cell : dof_handler.active_cell_iterators())
       if (!cell->is_artificial())
-        for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
+        for (const unsigned int face_no : cell->face_indices())
           if ((b_id = boundary_ids.find(cell->face(face_no)->boundary_id())) !=
               boundary_ids.end())
             {
index 14778511b9f79b9bf8e899a5f7bf50c773e1910b..96fe8feb5d7ae76ec7176d641c1491fb126d46cc 100644 (file)
@@ -73,7 +73,7 @@ namespace VectorTools
         std::vector<double> rhs_values(n_q_points);
 
         for (; cell != endc; ++cell)
-          for (unsigned int face : GeometryInfo<dim>::face_indices())
+          for (unsigned int face : cell->face_indices())
             if (cell->face(face)->at_boundary() &&
                 (boundary_ids.empty() ||
                  (boundary_ids.find(cell->face(face)->boundary_id()) !=
@@ -104,7 +104,7 @@ namespace VectorTools
                                                Vector<double>(n_components));
 
         for (; cell != endc; ++cell)
-          for (unsigned int face : GeometryInfo<dim>::face_indices())
+          for (unsigned int face : cell->face_indices())
             if (cell->face(face)->at_boundary() &&
                 (boundary_ids.empty() ||
                  (boundary_ids.find(cell->face(face)->boundary_id()) !=
@@ -218,7 +218,7 @@ namespace VectorTools
         std::vector<double> rhs_values;
 
         for (; cell != endc; ++cell)
-          for (unsigned int face : GeometryInfo<dim>::face_indices())
+          for (unsigned int face : cell->face_indices())
             if (cell->face(face)->at_boundary() &&
                 (boundary_ids.empty() ||
                  (boundary_ids.find(cell->face(face)->boundary_id()) !=
@@ -256,7 +256,7 @@ namespace VectorTools
         std::vector<Vector<double>> rhs_values;
 
         for (; cell != endc; ++cell)
-          for (unsigned int face : GeometryInfo<dim>::face_indices())
+          for (unsigned int face : cell->face_indices())
             if (cell->face(face)->at_boundary() &&
                 (boundary_ids.empty() ||
                  (boundary_ids.find(cell->face(face)->boundary_id()) !=

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.