]> https://gitweb.dealii.org/ - dealii.git/commitdiff
add template parameter to DynamicSparsityPattern::compute_Tmmult_pattern()
authorDenis Davydov <davydden@gmail.com>
Thu, 25 Oct 2018 07:10:30 +0000 (09:10 +0200)
committerDenis Davydov <davydden@gmail.com>
Thu, 25 Oct 2018 10:11:31 +0000 (12:11 +0200)
include/deal.II/lac/dynamic_sparsity_pattern.h
source/lac/dynamic_sparsity_pattern.cc

index c33fe8edcbe34b33e76a1566cd727a8d86ef3543..40ad75005e9cd7305aaabb2435d1ccfd1aed7e65 100644 (file)
@@ -32,7 +32,6 @@
 DEAL_II_NAMESPACE_OPEN
 
 class DynamicSparsityPattern;
-class SparsityPattern;
 
 /*! @addtogroup Sparsity
  *@{
@@ -450,9 +449,10 @@ public:
    * Construct and store in this object the sparsity pattern corresponding to
    * the product of transposed @p left and and non-transpose @p right sparsity pattern.
    */
+  template <typename SparsityPatternTypeLeft, typename SparsityPatternTypeRight>
   void
-  compute_Tmmult_pattern(const SparsityPattern &left,
-                         const SparsityPattern &right);
+  compute_Tmmult_pattern(const SparsityPatternTypeLeft & left,
+                         const SparsityPatternTypeRight &right);
 
   /**
    * Print the sparsity pattern. The output consists of one line per row of
index 62ca57ff7375616c47dc97e0d2af68c70848ba43..712e4706eb1e575c84bc15b1756011573f0cc33d 100644 (file)
@@ -405,9 +405,11 @@ DynamicSparsityPattern::symmetrize()
 
 
 
+template <typename SparsityPatternTypeLeft, typename SparsityPatternTypeRight>
 void
-DynamicSparsityPattern::compute_Tmmult_pattern(const SparsityPattern &sp_A,
-                                               const SparsityPattern &sp_B)
+DynamicSparsityPattern::compute_Tmmult_pattern(
+  const SparsityPatternTypeLeft & sp_A,
+  const SparsityPatternTypeRight &sp_B)
 {
   Assert(sp_A.n_rows() == sp_B.n_rows(),
          ExcDimensionMismatch(sp_A.n_rows(), sp_B.n_rows()));
@@ -604,4 +606,8 @@ template void
 DynamicSparsityPattern::compute_mmult_pattern(const SparsityPattern &,
                                               const SparsityPattern &);
 
+template void
+DynamicSparsityPattern::compute_Tmmult_pattern(const SparsityPattern &,
+                                               const SparsityPattern &);
+
 DEAL_II_NAMESPACE_CLOSE

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.