]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove DoFHandlerType from numerics/vector_tools 10609/head
authorPeter Munch <peterrmuench@gmail.com>
Fri, 26 Jun 2020 07:22:14 +0000 (09:22 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Fri, 26 Jun 2020 09:59:54 +0000 (11:59 +0200)
include/deal.II/numerics/vector_tools_boundary.h
include/deal.II/numerics/vector_tools_boundary.templates.h
include/deal.II/numerics/vector_tools_constraints.h
include/deal.II/numerics/vector_tools_constraints.templates.h
include/deal.II/numerics/vector_tools_integrate_difference.templates.h
include/deal.II/numerics/vector_tools_interpolate.h
include/deal.II/numerics/vector_tools_interpolate.templates.h
include/deal.II/numerics/vector_tools_project.templates.h
source/numerics/vector_tools_boundary.inst.in
source/numerics/vector_tools_constraints.inst.in
source/numerics/vector_tools_interpolate.inst.in

index adf98a31096ad5852bde7a6b4d284a7b180d1d9f..271632d42e5e0723472a9426a78187d5528eaac7 100644 (file)
@@ -19,6 +19,8 @@
 
 #include <deal.II/base/config.h>
 
+#include <deal.II/dofs/dof_handler.h>
+
 #include <deal.II/hp/mapping_collection.h>
 
 #include <map>
@@ -94,14 +96,11 @@ namespace VectorTools
    *
    * See the general documentation of this namespace for more information.
    */
-  template <int dim,
-            int spacedim,
-            template <int, int> class DoFHandlerType,
-            typename number>
+  template <int dim, int spacedim, typename number>
   void
   interpolate_boundary_values(
-    const Mapping<dim, spacedim> &       mapping,
-    const DoFHandlerType<dim, spacedim> &dof,
+    const Mapping<dim, spacedim> &   mapping,
+    const DoFHandler<dim, spacedim> &dof,
     const std::map<types::boundary_id, const Function<spacedim, number> *>
       &                                        function_map,
     std::map<types::global_dof_index, number> &boundary_values,
@@ -130,14 +129,11 @@ namespace VectorTools
    * @see
    * @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
    */
-  template <int dim,
-            int spacedim,
-            template <int, int> class DoFHandlerType,
-            typename number>
+  template <int dim, int spacedim, typename number>
   void
   interpolate_boundary_values(
     const Mapping<dim, spacedim> &             mapping,
-    const DoFHandlerType<dim, spacedim> &      dof,
+    const DoFHandler<dim, spacedim> &          dof,
     const types::boundary_id                   boundary_component,
     const Function<spacedim, number> &         boundary_function,
     std::map<types::global_dof_index, number> &boundary_values,
@@ -152,13 +148,10 @@ namespace VectorTools
    * @see
    * @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
    */
-  template <int dim,
-            int spacedim,
-            template <int, int> class DoFHandlerType,
-            typename number>
+  template <int dim, int spacedim, typename number>
   void
   interpolate_boundary_values(
-    const DoFHandlerType<dim, spacedim> &      dof,
+    const DoFHandler<dim, spacedim> &          dof,
     const types::boundary_id                   boundary_component,
     const Function<spacedim, number> &         boundary_function,
     std::map<types::global_dof_index, number> &boundary_values,
@@ -171,13 +164,10 @@ namespace VectorTools
    * apply as for the previous function, in particular about the use of the
    * component mask and the requires size of the function object.
    */
-  template <int dim,
-            int spacedim,
-            template <int, int> class DoFHandlerType,
-            typename number>
+  template <int dim, int spacedim, typename number>
   void
   interpolate_boundary_values(
-    const DoFHandlerType<dim, spacedim> &dof,
+    const DoFHandler<dim, spacedim> &dof,
     const std::map<types::boundary_id, const Function<spacedim, number> *>
       &                                        function_map,
     std::map<types::global_dof_index, number> &boundary_values,
@@ -245,14 +235,11 @@ namespace VectorTools
    *
    * @ingroup constraints
    */
-  template <int dim,
-            int spacedim,
-            template <int, int> class DoFHandlerType,
-            typename number>
+  template <int dim, int spacedim, typename number>
   void
   interpolate_boundary_values(
-    const Mapping<dim, spacedim> &       mapping,
-    const DoFHandlerType<dim, spacedim> &dof,
+    const Mapping<dim, spacedim> &   mapping,
+    const DoFHandler<dim, spacedim> &dof,
     const std::map<types::boundary_id, const Function<spacedim, number> *>
       &                        function_map,
     AffineConstraints<number> &constraints,
@@ -269,18 +256,15 @@ namespace VectorTools
    * @see
    * @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
    */
-  template <int dim,
-            int spacedim,
-            template <int, int> class DoFHandlerType,
-            typename number>
+  template <int dim, int spacedim, typename number>
   void
   interpolate_boundary_values(
-    const Mapping<dim, spacedim> &       mapping,
-    const DoFHandlerType<dim, spacedim> &dof,
-    const types::boundary_id             boundary_component,
-    const Function<spacedim, number> &   boundary_function,
-    AffineConstraints<number> &          constraints,
-    const ComponentMask &                component_mask = ComponentMask());
+    const Mapping<dim, spacedim> &    mapping,
+    const DoFHandler<dim, spacedim> & dof,
+    const types::boundary_id          boundary_component,
+    const Function<spacedim, number> &boundary_function,
+    AffineConstraints<number> &       constraints,
+    const ComponentMask &             component_mask = ComponentMask());
 
   /**
    * Call the other interpolate_boundary_values() function, see above, with
@@ -293,17 +277,14 @@ namespace VectorTools
    * @see
    * @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
    */
-  template <int dim,
-            int spacedim,
-            template <int, int> class DoFHandlerType,
-            typename number>
+  template <int dim, int spacedim, typename number>
   void
   interpolate_boundary_values(
-    const DoFHandlerType<dim, spacedim> &dof,
-    const types::boundary_id             boundary_component,
-    const Function<spacedim, number> &   boundary_function,
-    AffineConstraints<number> &          constraints,
-    const ComponentMask &                component_mask = ComponentMask());
+    const DoFHandler<dim, spacedim> & dof,
+    const types::boundary_id          boundary_component,
+    const Function<spacedim, number> &boundary_function,
+    AffineConstraints<number> &       constraints,
+    const ComponentMask &             component_mask = ComponentMask());
 
 
   /**
@@ -314,13 +295,10 @@ namespace VectorTools
    *
    * @ingroup constraints
    */
-  template <int dim,
-            int spacedim,
-            template <int, int> class DoFHandlerType,
-            typename number>
+  template <int dim, int spacedim, typename number>
   void
   interpolate_boundary_values(
-    const DoFHandlerType<dim, spacedim> &dof,
+    const DoFHandler<dim, spacedim> &dof,
     const std::map<types::boundary_id, const Function<spacedim, number> *>
       &                        function_map,
     AffineConstraints<number> &constraints,
index 7c471864d9e97077c53bdcf4718a067cb22ab557..4566f8ebb62db0c71134e96d3f3e1998eba54ef4 100644 (file)
@@ -52,12 +52,11 @@ namespace VectorTools
     template <int dim,
               int spacedim,
               typename number,
-              template <int, int> class DoFHandlerType,
               template <int, int> class M_or_MC>
     static inline void
     do_interpolate_boundary_values(
-      const M_or_MC<dim, spacedim> &       mapping,
-      const DoFHandlerType<dim, spacedim> &dof,
+      const M_or_MC<dim, spacedim> &   mapping,
+      const DoFHandler<dim, spacedim> &dof,
       const std::map<types::boundary_id, const Function<spacedim, number> *>
         &                                        function_map,
       std::map<types::global_dof_index, number> &boundary_values,
@@ -219,10 +218,7 @@ namespace VectorTools
             q_collection,
             update_quadrature_points);
 
-          typename DoFHandlerType<dim, spacedim>::active_cell_iterator
-            cell = dof.begin_active(),
-            endc = dof.end();
-          for (; cell != endc; ++cell)
+          for (auto const &cell : dof.active_cell_iterators())
             if (!cell->is_artificial())
               for (const unsigned int face_no :
                    GeometryInfo<dim>::face_indices())
@@ -256,8 +252,8 @@ namespace VectorTools
                               "use for non-primitive finite elements."));
                     }
 
-                  const typename DoFHandlerType<dim, spacedim>::face_iterator
-                                           face = cell->face(face_no);
+                  const typename DoFHandler<dim, spacedim>::face_iterator face =
+                    cell->face(face_no);
                   const types::boundary_id boundary_component =
                     face->boundary_id();
 
@@ -380,14 +376,11 @@ namespace VectorTools
 
 
 
-  template <int dim,
-            int spacedim,
-            template <int, int> class DoFHandlerType,
-            typename number>
+  template <int dim, int spacedim, typename number>
   void
   interpolate_boundary_values(
-    const Mapping<dim, spacedim> &       mapping,
-    const DoFHandlerType<dim, spacedim> &dof,
+    const Mapping<dim, spacedim> &   mapping,
+    const DoFHandler<dim, spacedim> &dof,
     const std::map<types::boundary_id, const Function<spacedim, number> *>
       &                                        function_map,
     std::map<types::global_dof_index, number> &boundary_values,
@@ -399,14 +392,11 @@ namespace VectorTools
 
 
 
-  template <int dim,
-            int spacedim,
-            template <int, int> class DoFHandlerType,
-            typename number>
+  template <int dim, int spacedim, typename number>
   void
   interpolate_boundary_values(
     const Mapping<dim, spacedim> &             mapping,
-    const DoFHandlerType<dim, spacedim> &      dof,
+    const DoFHandler<dim, spacedim> &          dof,
     const types::boundary_id                   boundary_component,
     const Function<spacedim, number> &         boundary_function,
     std::map<types::global_dof_index, number> &boundary_values,
@@ -436,13 +426,10 @@ namespace VectorTools
 
 
 
-  template <int dim,
-            int spacedim,
-            template <int, int> class DoFHandlerType,
-            typename number>
+  template <int dim, int spacedim, typename number>
   void
   interpolate_boundary_values(
-    const DoFHandlerType<dim, spacedim> &      dof,
+    const DoFHandler<dim, spacedim> &          dof,
     const types::boundary_id                   boundary_component,
     const Function<spacedim, number> &         boundary_function,
     std::map<types::global_dof_index, number> &boundary_values,
@@ -458,13 +445,10 @@ namespace VectorTools
 
 
 
-  template <int dim,
-            int spacedim,
-            template <int, int> class DoFHandlerType,
-            typename number>
+  template <int dim, int spacedim, typename number>
   void
   interpolate_boundary_values(
-    const DoFHandlerType<dim, spacedim> &dof,
+    const DoFHandler<dim, spacedim> &dof,
     const std::map<types::boundary_id, const Function<spacedim, number> *>
       &                                        function_map,
     std::map<types::global_dof_index, number> &boundary_values,
@@ -484,14 +468,11 @@ namespace VectorTools
 
 
 
-  template <int dim,
-            int spacedim,
-            template <int, int> class DoFHandlerType,
-            typename number>
+  template <int dim, int spacedim, typename number>
   void
   interpolate_boundary_values(
-    const Mapping<dim, spacedim> &       mapping,
-    const DoFHandlerType<dim, spacedim> &dof,
+    const Mapping<dim, spacedim> &   mapping,
+    const DoFHandler<dim, spacedim> &dof,
     const std::map<types::boundary_id, const Function<spacedim, number> *>
       &                        function_map,
     AffineConstraints<number> &constraints,
@@ -516,18 +497,15 @@ namespace VectorTools
 
 
 
-  template <int dim,
-            int spacedim,
-            template <int, int> class DoFHandlerType,
-            typename number>
+  template <int dim, int spacedim, typename number>
   void
   interpolate_boundary_values(
-    const Mapping<dim, spacedim> &       mapping,
-    const DoFHandlerType<dim, spacedim> &dof,
-    const types::boundary_id             boundary_component,
-    const Function<spacedim, number> &   boundary_function,
-    AffineConstraints<number> &          constraints,
-    const ComponentMask &                component_mask)
+    const Mapping<dim, spacedim> &    mapping,
+    const DoFHandler<dim, spacedim> & dof,
+    const types::boundary_id          boundary_component,
+    const Function<spacedim, number> &boundary_function,
+    AffineConstraints<number> &       constraints,
+    const ComponentMask &             component_mask)
   {
     std::map<types::boundary_id, const Function<spacedim, number> *>
       function_map;
@@ -538,17 +516,14 @@ namespace VectorTools
 
 
 
-  template <int dim,
-            int spacedim,
-            template <int, int> class DoFHandlerType,
-            typename number>
+  template <int dim, int spacedim, typename number>
   void
   interpolate_boundary_values(
-    const DoFHandlerType<dim, spacedim> &dof,
-    const types::boundary_id             boundary_component,
-    const Function<spacedim, number> &   boundary_function,
-    AffineConstraints<number> &          constraints,
-    const ComponentMask &                component_mask)
+    const DoFHandler<dim, spacedim> & dof,
+    const types::boundary_id          boundary_component,
+    const Function<spacedim, number> &boundary_function,
+    AffineConstraints<number> &       constraints,
+    const ComponentMask &             component_mask)
   {
     interpolate_boundary_values(StaticMappingQ1<dim, spacedim>::mapping,
                                 dof,
@@ -560,13 +535,10 @@ namespace VectorTools
 
 
 
-  template <int dim,
-            int spacedim,
-            template <int, int> class DoFHandlerType,
-            typename number>
+  template <int dim, int spacedim, typename number>
   void
   interpolate_boundary_values(
-    const DoFHandlerType<dim, spacedim> &dof,
+    const DoFHandler<dim, spacedim> &dof,
     const std::map<types::boundary_id, const Function<spacedim, number> *>
       &                        function_map,
     AffineConstraints<number> &constraints,
@@ -641,14 +613,13 @@ namespace VectorTools
 
     template <int dim,
               int spacedim,
-              template <int, int> class DoFHandlerType,
               template <int, int> class M_or_MC,
               template <int> class Q_or_QC,
               typename number>
     void
     do_project_boundary_values(
-      const M_or_MC<dim, spacedim> &       mapping,
-      const DoFHandlerType<dim, spacedim> &dof,
+      const M_or_MC<dim, spacedim> &   mapping,
+      const DoFHandler<dim, spacedim> &dof,
       const std::map<types::boundary_id, const Function<spacedim, number> *>
         &                                        boundary_functions,
       const Q_or_QC<dim - 1> &                   q,
@@ -2853,10 +2824,10 @@ namespace VectorTools
         }
     }
 
-    template <int dim, typename DoFHandlerType, typename number>
+    template <int dim, int spacedim, typename number>
     void
     compute_project_boundary_values_curl_conforming_l2(
-      const DoFHandlerType &                 dof_handler,
+      const DoFHandler<dim, spacedim> &      dof_handler,
       const unsigned int                     first_vector_component,
       const Function<dim, number> &          boundary_function,
       const types::boundary_id               boundary_component,
@@ -2914,10 +2885,10 @@ namespace VectorTools
                                              update_JxW_values);
 
       // Storage for dof values found and whether they have been processed:
-      std::vector<bool>                             dofs_processed;
-      std::vector<number>                           dof_values;
-      std::vector<types::global_dof_index>          face_dof_indices;
-      typename DoFHandlerType::active_cell_iterator cell =
+      std::vector<bool>                                        dofs_processed;
+      std::vector<number>                                      dof_values;
+      std::vector<types::global_dof_index>                     face_dof_indices;
+      typename DoFHandler<dim, spacedim>::active_cell_iterator cell =
         dof_handler.begin_active();
 
       switch (dim)
index d2a6dcf6698a5af305faeaa5be7484351d889e45..e1daae474e62e3a39cc82e7ba5e88300b3239624 100644 (file)
@@ -19,6 +19,8 @@
 
 #include <deal.II/base/config.h>
 
+#include <deal.II/dofs/dof_handler.h>
+
 #include <map>
 #include <set>
 
@@ -268,12 +270,12 @@ namespace VectorTools
    * @see
    * @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
    */
-  template <int dim, int spacedim, template <int, int> class DoFHandlerType>
+  template <int dim, int spacedim>
   void
   compute_nonzero_normal_flux_constraints(
-    const DoFHandlerType<dim, spacedim> &dof_handler,
-    const unsigned int                   first_vector_component,
-    const std::set<types::boundary_id> & boundary_ids,
+    const DoFHandler<dim, spacedim> &   dof_handler,
+    const unsigned int                  first_vector_component,
+    const std::set<types::boundary_id> &boundary_ids,
     const std::map<types::boundary_id, const Function<spacedim, double> *>
       &                           function_map,
     AffineConstraints<double> &   constraints,
@@ -292,14 +294,14 @@ namespace VectorTools
    * @see
    * @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
    */
-  template <int dim, int spacedim, template <int, int> class DoFHandlerType>
+  template <int dim, int spacedim>
   void
   compute_no_normal_flux_constraints(
-    const DoFHandlerType<dim, spacedim> &dof_handler,
-    const unsigned int                   first_vector_component,
-    const std::set<types::boundary_id> & boundary_ids,
-    AffineConstraints<double> &          constraints,
-    const Mapping<dim, spacedim> &       mapping =
+    const DoFHandler<dim, spacedim> &   dof_handler,
+    const unsigned int                  first_vector_component,
+    const std::set<types::boundary_id> &boundary_ids,
+    AffineConstraints<double> &         constraints,
+    const Mapping<dim, spacedim> &      mapping =
       StaticMappingQ1<dim, spacedim>::mapping);
 
   /**
@@ -318,12 +320,12 @@ namespace VectorTools
    * @see
    * @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
    */
-  template <int dim, int spacedim, template <int, int> class DoFHandlerType>
+  template <int dim, int spacedim>
   void
   compute_nonzero_tangential_flux_constraints(
-    const DoFHandlerType<dim, spacedim> &dof_handler,
-    const unsigned int                   first_vector_component,
-    const std::set<types::boundary_id> & boundary_ids,
+    const DoFHandler<dim, spacedim> &   dof_handler,
+    const unsigned int                  first_vector_component,
+    const std::set<types::boundary_id> &boundary_ids,
     const std::map<types::boundary_id, const Function<spacedim, double> *>
       &                           function_map,
     AffineConstraints<double> &   constraints,
@@ -338,14 +340,14 @@ namespace VectorTools
    * @see
    * @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
    */
-  template <int dim, int spacedim, template <int, int> class DoFHandlerType>
+  template <int dim, int spacedim>
   void
   compute_normal_flux_constraints(
-    const DoFHandlerType<dim, spacedim> &dof_handler,
-    const unsigned int                   first_vector_component,
-    const std::set<types::boundary_id> & boundary_ids,
-    AffineConstraints<double> &          constraints,
-    const Mapping<dim, spacedim> &       mapping =
+    const DoFHandler<dim, spacedim> &   dof_handler,
+    const unsigned int                  first_vector_component,
+    const std::set<types::boundary_id> &boundary_ids,
+    AffineConstraints<double> &         constraints,
+    const Mapping<dim, spacedim> &      mapping =
       StaticMappingQ1<dim, spacedim>::mapping);
 
   //@}
index 8fcc6c45f9b3dfef22a7f2d044f706a5fe28a235..58d9526b8dd307d2d6daeabd5cba93f009926f77 100644 (file)
@@ -464,12 +464,12 @@ namespace VectorTools
   } // namespace internal
 
 
-  template <int dim, int spacedim, template <int, int> class DoFHandlerType>
+  template <int dim, int spacedim>
   void
   compute_nonzero_normal_flux_constraints(
-    const DoFHandlerType<dim, spacedim> &dof_handler,
-    const unsigned int                   first_vector_component,
-    const std::set<types::boundary_id> & boundary_ids,
+    const DoFHandler<dim, spacedim> &   dof_handler,
+    const unsigned int                  first_vector_component,
+    const std::set<types::boundary_id> &boundary_ids,
     const std::map<types::boundary_id, const Function<spacedim> *>
       &                           function_map,
     AffineConstraints<double> &   constraints,
@@ -527,14 +527,14 @@ namespace VectorTools
     using DoFToNormalsMap = std::multimap<
       internal::VectorDoFTuple<dim>,
       std::pair<Tensor<1, dim>,
-                typename DoFHandlerType<dim, spacedim>::active_cell_iterator>>;
+                typename DoFHandler<dim, spacedim>::active_cell_iterator>>;
     std::map<internal::VectorDoFTuple<dim>, Vector<double>>
       dof_vector_to_b_values;
 
     DoFToNormalsMap dof_to_normals_map;
 
     // now loop over all cells and all faces
-    typename DoFHandlerType<dim, spacedim>::active_cell_iterator
+    typename DoFHandler<dim, spacedim>::active_cell_iterator
       cell = dof_handler.begin_active(),
       endc = dof_handler.end();
     std::set<types::boundary_id>::iterator b_id;
@@ -545,7 +545,7 @@ namespace VectorTools
               boundary_ids.end())
             {
               const FiniteElement<dim> &fe = cell->get_fe();
-              typename DoFHandlerType<dim, spacedim>::face_iterator face =
+              typename DoFHandler<dim, spacedim>::face_iterator face =
                 cell->face(face_no);
 
               // get the indices of the dofs on this cell...
@@ -709,7 +709,7 @@ namespace VectorTools
         // vectors. the values of the map are pairs of normal vectors and
         // number of cells that have contributed
         using CellToNormalsMap =
-          std::map<typename DoFHandlerType<dim, spacedim>::active_cell_iterator,
+          std::map<typename DoFHandler<dim, spacedim>::active_cell_iterator,
                    std::pair<Tensor<1, dim>, unsigned int>>;
 
         CellToNormalsMap cell_to_normals_map;
@@ -886,7 +886,7 @@ namespace VectorTools
                 // natural) because std::set requires that the stored elements
                 // are comparable with operator<
                 using CellContributions = std::map<
-                  typename DoFHandlerType<dim, spacedim>::active_cell_iterator,
+                  typename DoFHandler<dim, spacedim>::active_cell_iterator,
                   std::list<Tensor<1, dim>>>;
                 CellContributions cell_contributions;
 
@@ -1050,12 +1050,12 @@ namespace VectorTools
     };
   } // namespace internal
 
-  template <int dim, int spacedim, template <int, int> class DoFHandlerType>
+  template <int dim, int spacedim>
   void
   compute_nonzero_tangential_flux_constraints(
-    const DoFHandlerType<dim, spacedim> &dof_handler,
-    const unsigned int                   first_vector_component,
-    const std::set<types::boundary_id> & boundary_ids,
+    const DoFHandler<dim, spacedim> &   dof_handler,
+    const unsigned int                  first_vector_component,
+    const std::set<types::boundary_id> &boundary_ids,
     const std::map<types::boundary_id, const Function<spacedim> *>
       &                           function_map,
     AffineConstraints<double> &   constraints,
@@ -1119,7 +1119,7 @@ namespace VectorTools
               boundary_ids.end())
             {
               const FiniteElement<dim> &fe = cell->get_fe();
-              typename DoFHandlerType<dim, spacedim>::face_iterator face =
+              typename DoFHandler<dim, spacedim>::face_iterator face =
                 cell->face(face_no);
 
               // get the indices of the dofs on this cell...
@@ -1258,14 +1258,14 @@ namespace VectorTools
   }
 
 
-  template <int dim, int spacedim, template <int, int> class DoFHandlerType>
+  template <int dim, int spacedim>
   void
   compute_no_normal_flux_constraints(
-    const DoFHandlerType<dim, spacedim> &dof_handler,
-    const unsigned int                   first_vector_component,
-    const std::set<types::boundary_id> & boundary_ids,
-    AffineConstraints<double> &          constraints,
-    const Mapping<dim, spacedim> &       mapping)
+    const DoFHandler<dim, spacedim> &   dof_handler,
+    const unsigned int                  first_vector_component,
+    const std::set<types::boundary_id> &boundary_ids,
+    AffineConstraints<double> &         constraints,
+    const Mapping<dim, spacedim> &      mapping)
   {
     Functions::ZeroFunction<dim>                             zero_function(dim);
     std::map<types::boundary_id, const Function<spacedim> *> function_map;
@@ -1279,14 +1279,14 @@ namespace VectorTools
                                             mapping);
   }
 
-  template <int dim, int spacedim, template <int, int> class DoFHandlerType>
+  template <int dim, int spacedim>
   void
   compute_normal_flux_constraints(
-    const DoFHandlerType<dim, spacedim> &dof_handler,
-    const unsigned int                   first_vector_component,
-    const std::set<types::boundary_id> & boundary_ids,
-    AffineConstraints<double> &          constraints,
-    const Mapping<dim, spacedim> &       mapping)
+    const DoFHandler<dim, spacedim> &   dof_handler,
+    const unsigned int                  first_vector_component,
+    const std::set<types::boundary_id> &boundary_ids,
+    AffineConstraints<double> &         constraints,
+    const Mapping<dim, spacedim> &      mapping)
   {
     Functions::ZeroFunction<dim>                             zero_function(dim);
     std::map<types::boundary_id, const Function<spacedim> *> function_map;
index 379e292f5a5e87dd06612982e06374700da573f6..4e77bd2fced5fe0a580ed75b124e5eef94f1c973 100644 (file)
@@ -796,15 +796,11 @@ namespace VectorTools
 
 
 
-    template <int dim,
-              class InVector,
-              class OutVector,
-              typename DoFHandlerType,
-              int spacedim>
+    template <int dim, int spacedim, class InVector, class OutVector>
     static void
     do_integrate_difference(
       const dealii::hp::MappingCollection<dim, spacedim> &     mapping,
-      const DoFHandlerType &                                   dof,
+      const DoFHandler<dim, spacedim> &                        dof,
       const InVector &                                         fe_function,
       const Function<spacedim, typename InVector::value_type> &exact_solution,
       OutVector &                                              difference,
@@ -917,16 +913,12 @@ namespace VectorTools
           difference(cell->active_cell_index()) = 0;
     }
 
-    template <int dim,
-              class InVector,
-              class OutVector,
-              typename DoFHandlerType,
-              int spacedim>
+    template <int dim, int spacedim, class InVector, class OutVector>
     DEAL_II_DEPRECATED static typename std::enable_if<
       !std::is_same<typename InVector::value_type, double>::value>::type
     do_integrate_difference(
       const dealii::hp::MappingCollection<dim, spacedim> &mapping,
-      const DoFHandlerType &                              dof,
+      const DoFHandler<dim, spacedim> &                   dof,
       const InVector &                                    fe_function,
       const Function<spacedim> &                          exact_solution,
       OutVector &                                         difference,
index bf5a707c1b997f08ab9aa4b74514e8b48a196409..880f51a8cd18354790a265fe7c344911ca71048d 100644 (file)
@@ -55,9 +55,6 @@ namespace VectorTools
    * with the hanging nodes from space @p dof afterwards, to make the result
    * continuous again.
    *
-   * The template argument <code>DoFHandlerType</code> may either be of type
-   * DoFHandler or hp::DoFHandler.
-   *
    * See the general documentation of this namespace for further information.
    *
    * @todo The @p mapping argument should be replaced by a
@@ -156,14 +153,11 @@ namespace VectorTools
    * between cells), then each subsequent call will rewrite the intercell @p
    * dofs of the previous one.
    */
-  template <int dim,
-            int spacedim,
-            typename VectorType,
-            template <int, int> class DoFHandlerType>
+  template <int dim, int spacedim, typename VectorType>
   void
   interpolate_based_on_material_id(
-    const Mapping<dim, spacedim> &       mapping,
-    const DoFHandlerType<dim, spacedim> &dof_handler,
+    const Mapping<dim, spacedim> &   mapping,
+    const DoFHandler<dim, spacedim> &dof_handler,
     const std::map<types::material_id,
                    const Function<spacedim, typename VectorType::value_type> *>
       &                  function_map,
@@ -194,15 +188,12 @@ namespace VectorTools
    * parallel::distributed::Triangulation<dim>::no_automatic_repartitioning
    * flag).
    */
-  template <int dim,
-            int spacedim,
-            typename VectorType,
-            template <int, int> class DoFHandlerType>
+  template <int dim, int spacedim, typename VectorType>
   void
-  interpolate_to_different_mesh(const DoFHandlerType<dim, spacedim> &dof1,
-                                const VectorType &                   u1,
-                                const DoFHandlerType<dim, spacedim> &dof2,
-                                VectorType &                         u2);
+  interpolate_to_different_mesh(const DoFHandler<dim, spacedim> &dof1,
+                                const VectorType &               u1,
+                                const DoFHandler<dim, spacedim> &dof2,
+                                VectorType &                     u2);
 
   /**
    * Compute the interpolation of a @p dof1-function @p u1 to a @p dof2-function
@@ -217,15 +208,12 @@ namespace VectorTools
    * Without it - due to cellwise interpolation - the resulting output vector
    * does not necessarily respect continuity requirements at hanging nodes.
    */
-  template <int dim,
-            int spacedim,
-            typename VectorType,
-            template <int, int> class DoFHandlerType>
+  template <int dim, int spacedim, typename VectorType>
   void
   interpolate_to_different_mesh(
-    const DoFHandlerType<dim, spacedim> &                     dof1,
+    const DoFHandler<dim, spacedim> &                         dof1,
     const VectorType &                                        u1,
-    const DoFHandlerType<dim, spacedim> &                     dof2,
+    const DoFHandler<dim, spacedim> &                         dof2,
     const AffineConstraints<typename VectorType::value_type> &constraints,
     VectorType &                                              u2);
 
@@ -236,13 +224,10 @@ namespace VectorTools
    * @p intergridmap has to be initialized via InterGridMap::make_mapping
    * pointing from a source DoFHandler to a destination DoFHandler.
    */
-  template <int dim,
-            int spacedim,
-            typename VectorType,
-            template <int, int> class DoFHandlerType>
+  template <int dim, int spacedim, typename VectorType>
   void
   interpolate_to_different_mesh(
-    const InterGridMap<DoFHandlerType<dim, spacedim>> &       intergridmap,
+    const InterGridMap<DoFHandler<dim, spacedim>> &           intergridmap,
     const VectorType &                                        u1,
     const AffineConstraints<typename VectorType::value_type> &constraints,
     VectorType &                                              u2);
@@ -277,14 +262,11 @@ namespace VectorTools
    * This function is only implemented for FiniteElements where the specified
    * components are primitive.
    */
-  template <int dim,
-            int spacedim,
-            template <int, int> class DoFHandlerType,
-            typename VectorType>
+  template <int dim, int spacedim, typename VectorType>
   void
-  get_position_vector(const DoFHandlerType<dim, spacedim> &dh,
-                      VectorType &                         vector,
-                      const ComponentMask &mask = ComponentMask());
+  get_position_vector(const DoFHandler<dim, spacedim> &dh,
+                      VectorType &                     vector,
+                      const ComponentMask &            mask = ComponentMask());
 
   //@}
 } // namespace VectorTools
index b004b518ba4c33c721b09c57e11b40fd75a81e8a..511400948cabe822b2505be9111442752780e335 100644 (file)
@@ -213,17 +213,13 @@ namespace VectorTools
     // Function<spacedim, typename VectorType::value_type>*
     //
     // A given cell is skipped if function(cell) == nullptr
-    template <int dim,
-              int spacedim,
-              typename VectorType,
-              template <int, int> class DoFHandlerType,
-              typename T>
+    template <int dim, int spacedim, typename VectorType, typename T>
     void
-    interpolate(const Mapping<dim, spacedim> &       mapping,
-                const DoFHandlerType<dim, spacedim> &dof_handler,
-                T &                                  function,
-                VectorType &                         vec,
-                const ComponentMask &                component_mask)
+    interpolate(const Mapping<dim, spacedim> &   mapping,
+                const DoFHandler<dim, spacedim> &dof_handler,
+                T &                              function,
+                VectorType &                     vec,
+                const ComponentMask &            component_mask)
     {
       Assert(component_mask.represents_n_components(
                dof_handler.get_fe_collection().n_components()),
@@ -606,14 +602,11 @@ namespace VectorTools
   }
 
 
-  template <int dim,
-            int spacedim,
-            template <int, int> class DoFHandlerType,
-            typename VectorType>
+  template <int dim, int spacedim, typename VectorType>
   void
-  get_position_vector(const DoFHandlerType<dim, spacedim> &dh,
-                      VectorType &                         vector,
-                      const ComponentMask &                mask)
+  get_position_vector(const DoFHandler<dim, spacedim> &dh,
+                      VectorType &                     vector,
+                      const ComponentMask &            mask)
   {
     AssertDimension(vector.size(), dh.n_dofs());
     const FiniteElement<dim, spacedim> &fe = dh.get_fe();
@@ -699,8 +692,8 @@ namespace VectorTools
         // interpolate from that vector space to this one, by
         // carefully selecting the right components.
 
-        FESystem<dim, spacedim> feq(FE_Q<dim, spacedim>(degree), spacedim);
-        DoFHandlerType<dim, spacedim> dhq(dh.get_triangulation());
+        FESystem<dim, spacedim>   feq(FE_Q<dim, spacedim>(degree), spacedim);
+        DoFHandler<dim, spacedim> dhq(dh.get_triangulation());
         dhq.distribute_dofs(feq);
         Vector<double>      eulerq(dhq.n_dofs());
         const ComponentMask maskq(spacedim, true);
@@ -782,14 +775,11 @@ namespace VectorTools
       }
   }
 
-  template <int dim,
-            int spacedim,
-            typename VectorType,
-            template <int, int> class DoFHandlerType>
+  template <int dim, int spacedim, typename VectorType>
   void
   interpolate_based_on_material_id(
-    const Mapping<dim, spacedim> &       mapping,
-    const DoFHandlerType<dim, spacedim> &dof_handler,
+    const Mapping<dim, spacedim> &   mapping,
+    const DoFHandler<dim, spacedim> &dof_handler,
     const std::map<types::material_id,
                    const Function<spacedim, typename VectorType::value_type> *>
       &                  functions,
@@ -799,7 +789,7 @@ namespace VectorTools
     // Create a small lambda capture wrapping the function map and call the
     // internal implementation
     const auto function_map = [&functions](
-      const typename DoFHandlerType<dim, spacedim>::active_cell_iterator &cell)
+      const typename DoFHandler<dim, spacedim>::active_cell_iterator &cell)
       -> const Function<spacedim, typename VectorType::value_type> *
     {
       const auto function = functions.find(cell->material_id());
@@ -833,21 +823,18 @@ namespace VectorTools
     }
   } // namespace internal
 
-  template <int dim,
-            int spacedim,
-            typename VectorType,
-            template <int, int> class DoFHandlerType>
+  template <int dim, int spacedim, typename VectorType>
   void
-  interpolate_to_different_mesh(const DoFHandlerType<dim, spacedim> &dof1,
-                                const VectorType &                   u1,
-                                const DoFHandlerType<dim, spacedim> &dof2,
-                                VectorType &                         u2)
+  interpolate_to_different_mesh(const DoFHandler<dim, spacedim> &dof1,
+                                const VectorType &               u1,
+                                const DoFHandler<dim, spacedim> &dof2,
+                                VectorType &                     u2)
   {
     Assert(GridTools::have_same_coarse_mesh(dof1, dof2),
            ExcMessage("The two DoF handlers must represent triangulations that "
                       "have the same coarse meshes"));
 
-    InterGridMap<DoFHandlerType<dim, spacedim>> intergridmap;
+    InterGridMap<DoFHandler<dim, spacedim>> intergridmap;
     intergridmap.make_mapping(dof1, dof2);
 
     AffineConstraints<typename VectorType::value_type> dummy;
@@ -858,15 +845,12 @@ namespace VectorTools
 
 
 
-  template <int dim,
-            int spacedim,
-            typename VectorType,
-            template <int, int> class DoFHandlerType>
+  template <int dim, int spacedim, typename VectorType>
   void
   interpolate_to_different_mesh(
-    const DoFHandlerType<dim, spacedim> &                     dof1,
+    const DoFHandler<dim, spacedim> &                         dof1,
     const VectorType &                                        u1,
-    const DoFHandlerType<dim, spacedim> &                     dof2,
+    const DoFHandler<dim, spacedim> &                         dof2,
     const AffineConstraints<typename VectorType::value_type> &constraints,
     VectorType &                                              u2)
   {
@@ -874,26 +858,22 @@ namespace VectorTools
            ExcMessage("The two DoF handlers must represent triangulations that "
                       "have the same coarse meshes"));
 
-    InterGridMap<DoFHandlerType<dim, spacedim>> intergridmap;
+    InterGridMap<DoFHandler<dim, spacedim>> intergridmap;
     intergridmap.make_mapping(dof1, dof2);
 
     interpolate_to_different_mesh(intergridmap, u1, constraints, u2);
   }
 
-  template <int dim,
-            int spacedim,
-            typename VectorType,
-            template <int, int> class DoFHandlerType>
+  template <int dim, int spacedim, typename VectorType>
   void
   interpolate_to_different_mesh(
-    const InterGridMap<DoFHandlerType<dim, spacedim>> &       intergridmap,
+    const InterGridMap<DoFHandler<dim, spacedim>> &           intergridmap,
     const VectorType &                                        u1,
     const AffineConstraints<typename VectorType::value_type> &constraints,
     VectorType &                                              u2)
   {
-    const DoFHandlerType<dim, spacedim> &dof1 = intergridmap.get_source_grid();
-    const DoFHandlerType<dim, spacedim> &dof2 =
-      intergridmap.get_destination_grid();
+    const DoFHandler<dim, spacedim> &dof1 = intergridmap.get_source_grid();
+    const DoFHandler<dim, spacedim> &dof2 = intergridmap.get_destination_grid();
     (void)dof2;
 
     Assert(dof1.get_fe_collection() == dof2.get_fe_collection(),
@@ -915,13 +895,12 @@ namespace VectorTools
     // Therefore, loop over all cells
     // (active and inactive) of the source
     // grid ..
-    typename DoFHandlerType<dim, spacedim>::cell_iterator cell1 = dof1.begin();
-    const typename DoFHandlerType<dim, spacedim>::cell_iterator endc1 =
-      dof1.end();
+    typename DoFHandler<dim, spacedim>::cell_iterator cell1 = dof1.begin();
+    const typename DoFHandler<dim, spacedim>::cell_iterator endc1 = dof1.end();
 
     for (; cell1 != endc1; ++cell1)
       {
-        const typename DoFHandlerType<dim, spacedim>::cell_iterator cell2 =
+        const typename DoFHandler<dim, spacedim>::cell_iterator cell2 =
           intergridmap[cell1];
 
         // .. and skip if source and destination
index 998e4653fb97a63f60447cfc86887e07c7d1ea39..f4c730afd19cc27fcc20eeca95c3caa268bf5065 100644 (file)
@@ -48,13 +48,10 @@ namespace VectorTools
      * mapping here because the function we evaluate for the DoFs is zero in
      * the mapped locations as well as in the original, unmapped locations
      */
-    template <int dim,
-              int spacedim,
-              template <int, int> class DoFHandlerType,
-              typename number>
+    template <int dim, int spacedim, typename number>
     void
     interpolate_zero_boundary_values(
-      const DoFHandlerType<dim, spacedim> &      dof_handler,
+      const DoFHandler<dim, spacedim> &          dof_handler,
       std::map<types::global_dof_index, number> &boundary_values)
     {
       // loop over all boundary faces
@@ -78,7 +75,7 @@ namespace VectorTools
       // that is actually wholly on
       // the boundary, not only by
       // one line or one vertex
-      typename DoFHandlerType<dim, spacedim>::active_cell_iterator
+      typename DoFHandler<dim, spacedim>::active_cell_iterator
         cell = dof_handler.begin_active(),
         endc = dof_handler.end();
       std::vector<types::global_dof_index> face_dof_indices;
@@ -105,14 +102,13 @@ namespace VectorTools
      */
     template <int dim,
               int spacedim,
-              template <int, int> class DoFHandlerType,
               template <int, int> class M_or_MC,
               template <int> class Q_or_QC,
               typename number>
     void
     project_compute_b_v(
       const M_or_MC<dim, spacedim> &             mapping,
-      const DoFHandlerType<dim, spacedim> &      dof,
+      const DoFHandler<dim, spacedim> &          dof,
       const Function<spacedim, number> &         function,
       const bool                                 enforce_zero_boundary,
       const Q_or_QC<dim - 1> &                   q_boundary,
@@ -481,13 +477,12 @@ namespace VectorTools
     template <int dim,
               int spacedim,
               typename VectorType,
-              template <int, int> class DoFHandlerType,
               template <int, int> class M_or_MC,
               template <int> class Q_or_QC>
     void
     do_project(
       const M_or_MC<dim, spacedim> &                             mapping,
-      const DoFHandlerType<dim, spacedim> &                      dof,
+      const DoFHandler<dim, spacedim> &                          dof,
       const AffineConstraints<typename VectorType::value_type> & constraints,
       const Q_or_QC<dim> &                                       quadrature,
       const Function<spacedim, typename VectorType::value_type> &function,
index e531980e5b97e5eb244f073cb1f9382ebe1612d1..fc78ca58b57d4a773d3d730386587c13d0b75f63 100644 (file)
@@ -15,7 +15,6 @@
 
 
 for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS;
-     DH : DOFHANDLER_TEMPLATES;
      number : REAL_AND_COMPLEX_SCALARS)
   {
 #if deal_II_dimension <= deal_II_space_dimension
@@ -24,7 +23,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS;
       template void
       interpolate_boundary_values(
         const Mapping<deal_II_dimension, deal_II_space_dimension> &,
-        const DH<deal_II_dimension, deal_II_space_dimension> &,
+        const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
         const std::map<types::boundary_id,
                        const Function<deal_II_space_dimension, number> *> &,
         std::map<types::global_dof_index, number> &,
@@ -33,7 +32,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS;
       template void
       interpolate_boundary_values(
         const Mapping<deal_II_dimension, deal_II_space_dimension> &,
-        const DH<deal_II_dimension, deal_II_space_dimension> &,
+        const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
         const types::boundary_id,
         const Function<deal_II_space_dimension, number> &,
         std::map<types::global_dof_index, number> &,
@@ -41,7 +40,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS;
 
       template void
       interpolate_boundary_values(
-        const DH<deal_II_dimension, deal_II_space_dimension> &,
+        const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
         const types::boundary_id,
         const Function<deal_II_space_dimension, number> &,
         std::map<types::global_dof_index, number> &,
@@ -49,7 +48,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS;
 
       template void
       interpolate_boundary_values(
-        const DH<deal_II_dimension, deal_II_space_dimension> &,
+        const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
         const std::map<types::boundary_id,
                        const Function<deal_II_space_dimension, number> *> &,
         std::map<types::global_dof_index, number> &,
@@ -81,7 +80,6 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS;
 
 
 for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS;
-     DH : DOFHANDLER_TEMPLATES;
      number : REAL_AND_COMPLEX_SCALARS)
   {
 #if deal_II_dimension <= deal_II_space_dimension
@@ -91,7 +89,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS;
       template void
       interpolate_boundary_values(
         const Mapping<deal_II_dimension, deal_II_space_dimension> &,
-        const DH<deal_II_dimension, deal_II_space_dimension> &,
+        const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
         const std::map<types::boundary_id,
                        const Function<deal_II_space_dimension, number> *> &,
         AffineConstraints<number> &,
@@ -100,7 +98,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS;
       template void
       interpolate_boundary_values(
         const Mapping<deal_II_dimension, deal_II_space_dimension> &,
-        const DH<deal_II_dimension, deal_II_space_dimension> &,
+        const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
         const types::boundary_id,
         const Function<deal_II_space_dimension, number> &,
         AffineConstraints<number> &,
@@ -108,7 +106,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS;
 
       template void
       interpolate_boundary_values(
-        const DH<deal_II_dimension, deal_II_space_dimension> &,
+        const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
         const types::boundary_id,
         const Function<deal_II_space_dimension, number> &,
         AffineConstraints<number> &,
@@ -116,7 +114,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS;
 
       template void
       interpolate_boundary_values(
-        const DH<deal_II_dimension, deal_II_space_dimension> &,
+        const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
         const std::map<types::boundary_id,
                        const Function<deal_II_space_dimension, number> *> &,
         AffineConstraints<number> &,
index 82fd998cff688ca7392db5b87a0769f3fc9884e3..8382367142f7d2f1f1c9a65ba5029745bad482c2 100644 (file)
@@ -17,8 +17,7 @@
 // TODO[SP]: replace <deal_II_dimension> by <deal_II_dimension,
 // deal_II_space_dimension>
 // where applicable and move to codimension cases above also when applicable
-for (DoFHandler : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENSIONS;
-     deal_II_space_dimension : SPACE_DIMENSIONS)
+for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
   {
     namespace VectorTools
     \{
index a5cdeaa6adf01e26f5ced33b600407c1094990d4..a99aeb90183fa73437debbc794e3d76998af64e5 100644 (file)
@@ -81,8 +81,7 @@ for (VEC : VECTOR_TYPES; deal_II_dimension : DIMENSIONS;
   }
 
 
-for (DoFHandler : DOFHANDLER_TEMPLATES; VEC : VECTOR_TYPES;
-     deal_II_dimension : DIMENSIONS;
+for (VEC : VECTOR_TYPES; deal_II_dimension : DIMENSIONS;
      deal_II_space_dimension : SPACE_DIMENSIONS)
   {
 #if deal_II_dimension <= deal_II_space_dimension

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.