]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix error with IndexSet.
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Tue, 8 Dec 2009 17:07:06 +0000 (17:07 +0000)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Tue, 8 Dec 2009 17:07:06 +0000 (17:07 +0000)
git-svn-id: https://svn.dealii.org/trunk@20214 0785d39b-7218-0410-832d-ea1e28bc413d

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

index e3bde0a2a39978846b92336d34e285ae9a634ed0..678ababbc38b94e5dd184379b4841abf2f60cef1 100644 (file)
@@ -511,7 +511,7 @@ CompressedSimpleSparsityPattern::add (const unsigned int i,
     return;
 
   const unsigned int rowindex = 
-    rowset.size()==0 ? i : rowset.nth_index_in_set(i);
+    rowset.size()==0 ? i : rowset.index_within_set(i);
   lines[rowindex].add (j);
 }
 
@@ -531,7 +531,7 @@ CompressedSimpleSparsityPattern::add_entries (const unsigned int row,
     return;
 
   const unsigned int rowindex = 
-    rowset.size()==0 ? row : rowset.nth_index_in_set(row);
+    rowset.size()==0 ? row : rowset.index_within_set(row);
   lines[rowindex].add_entries (begin, end, indices_are_sorted);
 }
 
@@ -552,7 +552,7 @@ CompressedSimpleSparsityPattern::row_length (const unsigned int row) const
     return 0;
 
   const unsigned int rowindex = 
-    rowset.size()==0 ? row : rowset.nth_index_in_set(row);
+    rowset.size()==0 ? row : rowset.index_within_set(row);
   return lines[rowindex].entries.size();
 }
 
index 224f760178dc41a0476edc6a6719ef34699e50e5..100e7a57bd9f7f8cb6b5569fe54fd953b29824fd 100644 (file)
@@ -388,7 +388,7 @@ CompressedSimpleSparsityPattern::print (std::ostream &out) const
 void
 CompressedSimpleSparsityPattern::print_gnuplot (std::ostream &out) const
 {
-  for (unsigned int row=0; row<rows; ++row)
+  for (unsigned int row=0; row<lines.size(); ++row)
     {
       const unsigned int rowindex =
        rowset.size()==0 ? row : rowset.nth_index_in_set(row);
@@ -416,7 +416,7 @@ unsigned int
 CompressedSimpleSparsityPattern::bandwidth () const
 {
   unsigned int b=0;
-  for (unsigned int row=0; row<rows; ++row)
+  for (unsigned int row=0; row<lines.size(); ++row)
     {
       const unsigned int rowindex =
        rowset.size()==0 ? row : rowset.nth_index_in_set(row);
@@ -437,7 +437,7 @@ unsigned int
 CompressedSimpleSparsityPattern::n_nonzero_elements () const
 {
   unsigned int n=0;
-  for (unsigned int i=0; i<rows; ++i)
+  for (unsigned int i=0; i<lines.size(); ++i)
     {
       n += lines[i].entries.size();
     }

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.