]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make the sparsity pattern a template arg of make_sparsity_pattern.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 15 May 2000 11:06:38 +0000 (11:06 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 15 May 2000 11:06:38 +0000 (11:06 +0000)
git-svn-id: https://svn.dealii.org/trunk@2852 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/dofs/dof_tools.h
deal.II/deal.II/source/dofs/dof_tools.cc
deal.II/doc/news/2000/c-3-0.html

index 4ddd49adccfe185da0ba8271987c9618cf952611..33b45a5946ac8bf737d0f29d5160c8ffb2647fc4 100644 (file)
@@ -98,8 +98,15 @@ class DoFTools
                                      * Remember using
                                      * #SparsityPattern::compress()#
                                      * after generating the pattern.
+                                     *
+                                     * The actual type of the
+                                     * sparsity pattern may be
+                                     * #SparsityPattern#,
+                                     * #BlockSparsityPattern#, or any
+                                     * other class that satisfies
+                                     * similar requirements.
                                      */
-    template<int dim>
+    template <int dim, class SparsityPattern>
     static void make_sparsity_pattern (const DoFHandler<dim> &dof,
                                       SparsityPattern       &sparsity_pattern);
 
@@ -157,8 +164,15 @@ class DoFTools
                                      * the matrix structure just like the
                                      * previous function, but does not create
                                      * elements if not specified by the mask.
+                                     *
+                                     * The actual type of the
+                                     * sparsity pattern may be
+                                     * #SparsityPattern#,
+                                     * #BlockSparsityPattern#, or any
+                                     * other class that satisfies
+                                     * similar requirements.
                                      */
-    template<int dim>
+    template<int dim, class SparsityPattern>
     static void make_sparsity_pattern (const DoFHandler<dim>       &dof,
                                       const vector<vector<bool> > &mask,
                                       SparsityPattern             &sparsity_pattern);
index 42a8edc3ac15d7ef106779bcb0135ce199c77a7c..80b2b24b2b69f9c5ccc861452f4e6fd8acd438f8 100644 (file)
 #include <fe/fe_system.h>
 #include <dofs/dof_tools.h>
 #include <lac/sparsity_pattern.h>
+#include <lac/block_sparsity_pattern.h>
 #include <lac/vector.h>
 
 #include <algorithm>
 
 
-template <int dim>
+template <int dim, class SparsityPattern>
 void
 DoFTools::make_sparsity_pattern (const DoFHandler<dim> &dof,
                                 SparsityPattern       &sparsity)
@@ -57,7 +58,7 @@ DoFTools::make_sparsity_pattern (const DoFHandler<dim> &dof,
 }
 
 
-template <int dim>
+template <int dim, class SparsityPattern>
 void
 DoFTools::make_sparsity_pattern (const DoFHandler<dim>       &dof,
                                 const vector<vector<bool> > &mask,
@@ -1414,13 +1415,30 @@ DoFTools::make_boundary_sparsity_pattern (const DoFHandler<deal_II_dimension>& d
 
 template void
 DoFTools::make_sparsity_pattern (const DoFHandler<deal_II_dimension>& dof,
-                                              SparsityPattern    &sparsity);
+                                SparsityPattern    &sparsity);
+
+template void
+DoFTools::make_sparsity_pattern (const DoFHandler<deal_II_dimension> &dof,
+                                BlockSparsityPattern<2,2>    &sparsity);
+template void
+DoFTools::make_sparsity_pattern (const DoFHandler<deal_II_dimension> &dof,
+                                BlockSparsityPattern<3,3>    &sparsity);
 
 template void 
 DoFTools::make_sparsity_pattern (const DoFHandler<deal_II_dimension>& dof,
                                 const vector<vector<bool> > &mask,
                                 SparsityPattern             &sparsity);
 
+template void 
+DoFTools::make_sparsity_pattern (const DoFHandler<deal_II_dimension>& dof,
+                                const vector<vector<bool> > &mask,
+                                BlockSparsityPattern<2,2>   &sparsity);
+
+template void 
+DoFTools::make_sparsity_pattern (const DoFHandler<deal_II_dimension>& dof,
+                                const vector<vector<bool> > &mask,
+                                BlockSparsityPattern<3,3>   &sparsity);
+
 template
 void
 DoFTools::distribute_cell_to_dof_vector (const DoFHandler<deal_II_dimension> &dof_handler,
index 2308caf7dfa158cea633229cedb29321685b1cca..24942a0c1b812963e62efbf1a27f3e29e053694c 100644 (file)
        New: <code class="member">DoFRenumbering::sort_selected_dofs_back ()</code>
        sorts selected degrees of freedom to the end of the index range.
        </p>
+
+  <li> <p> 
+       Extended: <code class="member">DoFTools::make_sparsity_pattern ()</code>
+       now accepts a template parameter as sparsity pattern. This
+       allows to use this function for the usual 
+       <code class="class">SparsityPattern</code>, or for 
+       <code class="class">BlockSparsityPattern</code> arguments.
+       </p>
 </ol>
 
 <hr>

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.