]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Added constructor to CompressedSimpleSparsityPattern
authorcazamias <cazamias@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 17 Jan 2013 20:59:59 +0000 (20:59 +0000)
committercazamias <cazamias@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 17 Jan 2013 20:59:59 +0000 (20:59 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_unify_linear_algebra@28110 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/lac/compressed_simple_sparsity_pattern.h
deal.II/source/lac/compressed_simple_sparsity_pattern.cc

index 09a9bffa7abbabf6b2b66d532a33f5de1633417b..ede43fe94872ec7249a0df059435e2d3e2cf7599 100644 (file)
@@ -140,6 +140,12 @@ public:
                                    const unsigned int n,
                                    const IndexSet &rowset = IndexSet());
 
+  /**
+   * Create a square matrix using
+   * the index set.
+   */
+  CompressedSimpleSparsityPattern (const IndexSet &indexset);
+
   /**
    * Initialize a square matrix of
    * dimension @p n.
index 72e6164fa534058411879365c1c814258d36f27e..6905fe21e12eacaa3ede0b1fb6295875c3350fa0 100644 (file)
@@ -249,6 +249,15 @@ CompressedSimpleSparsityPattern::CompressedSimpleSparsityPattern (const unsigned
 }
 
 
+CompressedSimpleSparsityPattern::CompressedSimpleSparsityPattern (const IndexSet &rowset_)
+  :
+  rows(0),
+  cols(0),
+  rowset(0)
+{
+  reinit (rowset_.size(), rowset_.size(), rowset_);
+}
+
 
 CompressedSimpleSparsityPattern::CompressedSimpleSparsityPattern (const unsigned int n)
   :

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.