]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Simplify the instantiations of DoFTools::count_dofs_per_block().
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 8 Jan 2020 03:39:43 +0000 (20:39 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 8 Jan 2020 03:39:43 +0000 (20:39 -0700)
source/dofs/dof_tools.inst.in

index 4f8a57dec229d28446112efa93f8bfc67d105f8d..15c788aa66def8f967172ec01891e936fd71368b 100644 (file)
@@ -18,38 +18,59 @@ for (DoFHandler : DOFHANDLER_TEMPLATES;
      deal_II_dimension, deal_II_space_dimension : DIMENSIONS)
   {
 #if deal_II_dimension <= deal_II_space_dimension
-    template void DoFTools::extract_locally_relevant_dofs<
-      DoFHandler<deal_II_dimension, deal_II_space_dimension>>(
-      const DoFHandler<deal_II_dimension, deal_II_space_dimension> &dof_handler,
-      IndexSet &                                                    dof_set);
-
-    template void DoFTools::extract_locally_relevant_level_dofs<
-      DoFHandler<deal_II_dimension, deal_II_space_dimension>>(
-      const DoFHandler<deal_II_dimension, deal_II_space_dimension> &dof_handler,
-      const unsigned int                                            level,
-      IndexSet &                                                    dof_set);
-
-    template void DoFTools::extract_locally_owned_dofs<
-      DoFHandler<deal_II_dimension, deal_II_space_dimension>>(
-      const DoFHandler<deal_II_dimension, deal_II_space_dimension> &dof_handler,
-      IndexSet &                                                    dof_set);
-
-    template void DoFTools::extract_locally_active_dofs<
-      DoFHandler<deal_II_dimension, deal_II_space_dimension>>(
-      const DoFHandler<deal_II_dimension, deal_II_space_dimension> &dof_handler,
-      IndexSet &                                                    dof_set);
-
-    template std::vector<IndexSet> DoFTools::locally_owned_dofs_per_component<
-      DoFHandler<deal_II_dimension, deal_II_space_dimension>>(
-      const DoFHandler<deal_II_dimension, deal_II_space_dimension> &dof_handler,
-      const ComponentMask &                                         components);
-
-    template void DoFTools::count_dofs_per_component<
-      DoFHandler<deal_II_dimension, deal_II_space_dimension>>(
-      const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
-      std::vector<types::global_dof_index> &,
-      const bool,
-      const std::vector<unsigned int> &);
+    namespace DoFTools
+    \{
+      template void
+      extract_locally_relevant_dofs<
+        DoFHandler<deal_II_dimension, deal_II_space_dimension>>(
+        const DoFHandler<deal_II_dimension, deal_II_space_dimension>
+          &       dof_handler,
+        IndexSet &dof_set);
+
+      template void
+      extract_locally_relevant_level_dofs<
+        DoFHandler<deal_II_dimension, deal_II_space_dimension>>(
+        const DoFHandler<deal_II_dimension, deal_II_space_dimension>
+          &                dof_handler,
+        const unsigned int level,
+        IndexSet &         dof_set);
+
+      template void
+      extract_locally_owned_dofs<
+        DoFHandler<deal_II_dimension, deal_II_space_dimension>>(
+        const DoFHandler<deal_II_dimension, deal_II_space_dimension>
+          &       dof_handler,
+        IndexSet &dof_set);
+
+      template void
+      extract_locally_active_dofs<
+        DoFHandler<deal_II_dimension, deal_II_space_dimension>>(
+        const DoFHandler<deal_II_dimension, deal_II_space_dimension>
+          &       dof_handler,
+        IndexSet &dof_set);
+
+      template std::vector<IndexSet>
+      locally_owned_dofs_per_component<
+        DoFHandler<deal_II_dimension, deal_II_space_dimension>>(
+        const DoFHandler<deal_II_dimension, deal_II_space_dimension>
+          &                  dof_handler,
+        const ComponentMask &components);
+
+      template void
+      count_dofs_per_component<
+        DoFHandler<deal_II_dimension, deal_II_space_dimension>>(
+        const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
+        std::vector<types::global_dof_index> &,
+        const bool,
+        const std::vector<unsigned int> &);
+
+      template void
+      count_dofs_per_block<
+        DoFHandler<deal_II_dimension, deal_II_space_dimension>>(
+        const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
+        std::vector<types::global_dof_index> &,
+        const std::vector<unsigned int> &);
+    \}
 #endif
   }
 
@@ -372,18 +393,6 @@ for (deal_II_dimension : DIMENSIONS)
                             std::vector<unsigned int> &);
 #endif
 
-
-    template void DoFTools::count_dofs_per_block<DoFHandler<deal_II_dimension>>(
-      const DoFHandler<deal_II_dimension> &,
-      std::vector<types::global_dof_index> &,
-      const std::vector<unsigned int> &);
-
-    template void
-    DoFTools::count_dofs_per_block<hp::DoFHandler<deal_II_dimension>>(
-      const hp::DoFHandler<deal_II_dimension> &,
-      std::vector<types::global_dof_index> &,
-      const std::vector<unsigned int> &);
-
     template void DoFTools::map_dof_to_boundary_indices<
       DoFHandler<deal_II_dimension>>(const DoFHandler<deal_II_dimension> &,
                                      const std::set<types::boundary_id> &,
@@ -407,37 +416,6 @@ for (deal_II_dimension : DIMENSIONS)
       std::vector<types::global_dof_index> &);
 
 
-#if deal_II_dimension < 3
-
-    template void DoFTools::count_dofs_per_block<
-      DoFHandler<deal_II_dimension, deal_II_dimension + 1>>(
-      const DoFHandler<deal_II_dimension, deal_II_dimension + 1> &,
-      std::vector<types::global_dof_index> &,
-      const std::vector<unsigned int> &);
-
-    template void DoFTools::count_dofs_per_block<
-      hp::DoFHandler<deal_II_dimension, deal_II_dimension + 1>>(
-      const hp::DoFHandler<deal_II_dimension, deal_II_dimension + 1> &,
-      std::vector<types::global_dof_index> &,
-      const std::vector<unsigned int> &);
-
-#endif
-
-
-#if deal_II_dimension == 3
-
-    template void DoFTools::count_dofs_per_block<DoFHandler<1, 3>>(
-      const DoFHandler<1, 3> &,
-      std::vector<types::global_dof_index> &,
-      const std::vector<unsigned int> &);
-
-    template void DoFTools::count_dofs_per_block<hp::DoFHandler<1, 3>>(
-      const hp::DoFHandler<1, 3> &,
-      std::vector<types::global_dof_index> &,
-      const std::vector<unsigned int> &);
-
-#endif
-
     template void DoFTools::write_gnuplot_dof_support_point_info(
       std::ostream &,
       const std::map<types::global_dof_index, Point<deal_II_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.