]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix make_cell_patches 2919/head
authorTimo Heister <timo.heister@gmail.com>
Thu, 4 Aug 2016 20:01:16 +0000 (22:01 +0200)
committerTimo Heister <timo.heister@gmail.com>
Fri, 5 Aug 2016 16:49:29 +0000 (12:49 -0400)
- fix instantiation to match declaration
- remove spacedim default value
- instantiate also for codim

include/deal.II/dofs/dof_tools.h
source/dofs/dof_tools.cc
source/dofs/dof_tools.inst.in

index b599fe4f35606e7337e3d8b322edc42e06eb8961..ef07a0983958cdb63040a0020563f23c7fc5f167 100644 (file)
@@ -1718,12 +1718,12 @@ namespace DoFTools
    * into the block list which are selected. This allows for instance
    * the exclusion of components or of dofs on the boundary.
    */
-  template <int dim, int spacedim=dim>
+  template <int dim, int spacedim>
   void make_cell_patches(SparsityPattern         &block_list,
                          const DoFHandler<dim,spacedim> &dof_handler,
                          const unsigned int       level,
                          const std::vector<bool> &selected_dofs = std::vector<bool>(),
-                         types::global_dof_index  offset        = 0);
+                         const types::global_dof_index  offset        = 0);
 
   /**
    * Create an incidence matrix that for every vertex on a given level of a
index b71591635cd00abd948b2870e2abeff2550879c0..bb1b516de4b8d73d87ef012136b9b69ea51a2ae4 100644 (file)
@@ -2055,15 +2055,15 @@ namespace DoFTools
 
 
 
-  template <typename DoFHandlerType>
-  void make_cell_patches(SparsityPattern         &block_list,
-                         const DoFHandlerType    &dof_handler,
-                         const unsigned int       level,
-                         const std::vector<bool> &selected_dofs,
-                         types::global_dof_index  offset)
+  template <int dim, int spacedim>
+  void make_cell_patches(SparsityPattern                &block_list,
+                         const DoFHandler<dim,spacedim> &dof_handler,
+                         const unsigned int             level,
+                         const std::vector<bool>        &selected_dofs,
+                         const types::global_dof_index  offset)
   {
-    typename DoFHandlerType::level_cell_iterator cell;
-    typename DoFHandlerType::level_cell_iterator endc = dof_handler.end(level);
+    typename DoFHandler<dim,spacedim>::level_cell_iterator cell;
+    typename DoFHandler<dim,spacedim>::level_cell_iterator endc = dof_handler.end(level);
     std::vector<types::global_dof_index> indices;
 
     unsigned int i=0;
index 236ba18697d7d5a6060db4f27779e626814e5ba0..2fca0bb11ed32bd3c183e4b93c05d429786ac5c8 100644 (file)
@@ -33,10 +33,6 @@ for (deal_II_dimension : DIMENSIONS)
    IndexSet & dof_set);
 #endif
 
-  template void
-  DoFTools::make_cell_patches<DoFHandler<deal_II_dimension> >
-  (SparsityPattern&, const DoFHandler<deal_II_dimension>&, const unsigned int, const std::vector<bool>&, types::global_dof_index);
   template
   std::vector<unsigned int>
   DoFTools::make_vertex_patches (SparsityPattern&, const DoFHandler<deal_II_dimension>&,
@@ -836,6 +832,14 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : DIMENSIONS)
          const BlockMask &,
          std::vector<bool>&);
 
+       template
+       void
+       make_cell_patches<deal_II_dimension,deal_II_space_dimension>
+       (SparsityPattern&, 
+        const DoFHandler<deal_II_dimension, deal_II_space_dimension>&,
+        const unsigned int, const std::vector<bool>&, 
+        const types::global_dof_index);
+
       \}
     #endif
 }

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.