]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Replace ACCESSOR -> AccessorType and related changes. 16228/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 31 Oct 2023 21:09:00 +0000 (15:09 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 1 Nov 2023 01:39:33 +0000 (19:39 -0600)
include/deal.II/meshworker/loop.h

index 7cd4239d32903875e2cc3522ab672882517c29f5..3576becbb5db60fb3e1e206d330547d1cf9307db 100644 (file)
@@ -51,17 +51,17 @@ namespace internal
     return false;
   }
 
-  template <class ACCESSOR>
+  template <typename AccessorType>
   inline bool
-  is_active_iterator(const TriaActiveIterator<ACCESSOR> &)
+  is_active_iterator(const TriaActiveIterator<AccessorType> &)
   {
     return true;
   }
 
-  template <class ACCESSOR>
+  template <typename AccessorType>
   inline bool
   is_active_iterator(
-    const dealii::FilteredIterator<TriaActiveIterator<ACCESSOR>> &)
+    const dealii::FilteredIterator<TriaActiveIterator<AccessorType>> &)
   {
     return true;
   }
@@ -186,10 +186,14 @@ namespace MeshWorker
    *
    * @ingroup MeshWorker
    */
-  template <class INFOBOX, class DOFINFO, int dim, int spacedim, class ITERATOR>
+  template <class INFOBOX,
+            class DOFINFO,
+            int dim,
+            int spacedim,
+            typename IteratorType>
   void
   cell_action(
-    ITERATOR                  cell,
+    IteratorType              cell,
     DoFInfoBox<dim, DOFINFO> &dof_info,
     INFOBOX                  &info,
     const std::function<void(DOFINFO &, typename INFOBOX::CellInfo &)>
@@ -245,7 +249,7 @@ namespace MeshWorker
     if (integrate_interior_face || integrate_boundary)
       for (const unsigned int face_no : cell->face_indices())
         {
-          typename ITERATOR::AccessorType::Container::face_iterator face =
+          typename IteratorType::AccessorType::Container::face_iterator face =
             cell->face(face_no);
           if (cell->at_boundary(face_no) &&
               !cell->has_periodic_neighbor(face_no))
@@ -262,7 +266,7 @@ namespace MeshWorker
           else if (integrate_interior_face)
             {
               // Interior face
-              TriaIterator<typename ITERATOR::AccessorType> neighbor =
+              TriaIterator<typename IteratorType::AccessorType> neighbor =
                 cell->neighbor_or_periodic_neighbor(face_no);
 
               types::subdomain_id neighbid = numbers::artificial_subdomain_id;
@@ -315,7 +319,7 @@ namespace MeshWorker
                       cell->periodic_neighbor_of_coarser_periodic_neighbor(
                         face_no) :
                       cell->neighbor_of_coarser_neighbor(face_no);
-                  const typename ITERATOR::AccessorType::Container::
+                  const typename IteratorType::AccessorType::Container::
                     face_iterator nface =
                       neighbor->face(neighbor_face_no.first);
 
@@ -433,13 +437,13 @@ namespace MeshWorker
             int spacedim,
             class DOFINFO,
             class INFOBOX,
-            class ASSEMBLER,
-            class ITERATOR>
+            typename AssemblerType,
+            typename IteratorType>
   void
-  loop(ITERATOR                             begin,
-       std_cxx20::type_identity_t<ITERATOR> end,
-       DOFINFO                             &dinfo,
-       INFOBOX                             &info,
+  loop(IteratorType                             begin,
+       std_cxx20::type_identity_t<IteratorType> end,
+       DOFINFO                                 &dinfo,
+       INFOBOX                                 &info,
        const std::function<void(DOFINFO &, typename INFOBOX::CellInfo &)>
          &cell_worker,
        const std::function<void(DOFINFO &, typename INFOBOX::CellInfo &)>
@@ -448,7 +452,7 @@ namespace MeshWorker
                                 DOFINFO &,
                                 typename INFOBOX::CellInfo &,
                                 typename INFOBOX::CellInfo &)> &face_worker,
-       ASSEMBLER                                               &assembler,
+       AssemblerType                                           &assembler,
        const LoopControl &lctrl = LoopControl())
   {
     DoFInfoBox<dim, DOFINFO> dof_info(dinfo);
@@ -465,17 +469,19 @@ namespace MeshWorker
       begin,
       end,
       [&cell_worker, &boundary_worker, &face_worker, &lctrl](
-        ITERATOR cell, INFOBOX &info, DoFInfoBox<dim, DOFINFO> &dof_info) {
-        cell_action<INFOBOX, DOFINFO, dim, spacedim, ITERATOR>(cell,
-                                                               dof_info,
-                                                               info,
-                                                               cell_worker,
-                                                               boundary_worker,
-                                                               face_worker,
-                                                               lctrl);
+        IteratorType cell, INFOBOX &info, DoFInfoBox<dim, DOFINFO> &dof_info) {
+        cell_action<INFOBOX, DOFINFO, dim, spacedim, IteratorType>(
+          cell,
+          dof_info,
+          info,
+          cell_worker,
+          boundary_worker,
+          face_worker,
+          lctrl);
       },
       [&assembler](const MeshWorker::DoFInfoBox<dim, DOFINFO> &dinfo) {
-        dealii::internal::assemble<dim, DOFINFO, ASSEMBLER>(dinfo, &assembler);
+        dealii::internal::assemble<dim, DOFINFO, AssemblerType>(dinfo,
+                                                                &assembler);
       },
       info,
       dof_info);
@@ -488,15 +494,18 @@ namespace MeshWorker
    *
    * @ingroup MeshWorker
    */
-  template <int dim, int spacedim, class ITERATOR, class ASSEMBLER>
+  template <int dim,
+            int spacedim,
+            typename IteratorType,
+            typename AssemblerType>
   void
-  integration_loop(ITERATOR                              begin,
-                   std_cxx20::type_identity_t<ITERATOR>  end,
-                   DoFInfo<dim, spacedim>               &dof_info,
-                   IntegrationInfoBox<dim, spacedim>    &box,
-                   const LocalIntegrator<dim, spacedim> &integrator,
-                   ASSEMBLER                            &assembler,
-                   const LoopControl                    &lctrl = LoopControl())
+  integration_loop(IteratorType                             begin,
+                   std_cxx20::type_identity_t<IteratorType> end,
+                   DoFInfo<dim, spacedim>                  &dof_info,
+                   IntegrationInfoBox<dim, spacedim>       &box,
+                   const LocalIntegrator<dim, spacedim>    &integrator,
+                   AssemblerType                           &assembler,
+                   const LoopControl &lctrl = LoopControl())
   {
     std::function<void(DoFInfo<dim, spacedim> &,
                        IntegrationInfo<dim, spacedim> &)>

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.