]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix warning by removing unused code 669/head
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Tue, 17 Mar 2015 06:58:23 +0000 (07:58 +0100)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Tue, 17 Mar 2015 06:58:23 +0000 (07:58 +0100)
source/lac/chunk_sparsity_pattern.cc

index b4b63b5af5c2be24a584a55012d927d6ea7a33f7..02330e458a4d264e337beab638ca5f398fac574f 100644 (file)
@@ -179,43 +179,6 @@ ChunkSparsityPattern::compress ()
 
 
 
-namespace internal
-{
-  namespace
-  {
-    /**
-     * Declare type for container size.
-     */
-    typedef types::global_dof_index size_type;
-
-    // distinguish between compressed sparsity types that define row_begin()
-    // and SparsityPattern that uses begin() as iterator type
-    template <typename Sparsity>
-    void copy_row (const Sparsity                  &csp,
-                   const size_type                  row,
-                   const unsigned int               chunk_size,
-                   CompressedSimpleSparsityPattern &dst)
-    {
-      typename Sparsity::row_iterator col_num = csp.row_begin (row);
-      const size_type reduced_row = row/chunk_size;
-      for (; col_num != csp.row_end (row); ++col_num)
-        dst.add (reduced_row, *col_num/chunk_size);
-    }
-
-    void copy_row (const SparsityPattern           &csp,
-                   const size_type                  row,
-                   const unsigned int               chunk_size,
-                   CompressedSimpleSparsityPattern &dst)
-    {
-      SparsityPattern::iterator col_num = csp.begin (row);
-      const size_type reduced_row = row/chunk_size;
-      for (; col_num != csp.end (row); ++col_num)
-        dst.add (reduced_row, col_num->column()/chunk_size);
-    }
-  }
-}
-
-
 template <typename SparsityType>
 void
 ChunkSparsityPattern::copy_from (const SparsityType &csp,
@@ -226,7 +189,7 @@ ChunkSparsityPattern::copy_from (const SparsityType &csp,
   rows = csp.n_rows();
   cols = csp.n_cols();
 
-  // simple case: just use the other sparsity pattern
+  // simple case: just use the given sparsity pattern
   if (chunk_size == 1)
     {
       sparsity_pattern.copy_from (csp);
@@ -241,7 +204,12 @@ ChunkSparsityPattern::copy_from (const SparsityType &csp,
   CompressedSimpleSparsityPattern temporary_sp(m_chunks, n_chunks);
 
   for (size_type row = 0; row<csp.n_rows(); ++row)
-    internal::copy_row(csp, row, chunk_size, temporary_sp);
+    {
+      typename SparsityType::row_iterator col_num = csp.row_begin (row);
+      const size_type reduced_row = row/chunk_size;
+      for (; col_num != csp.row_end (row); ++col_num)
+        temporary_sp.add (reduced_row, *col_num/chunk_size);
+    }
 
   sparsity_pattern.copy_from (temporary_sp);
 }

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.