]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix an oversight in a previous patch for DynamicSparsityPattern iterators. 865/head
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 23 Apr 2015 11:25:58 +0000 (06:25 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 23 Apr 2015 11:25:58 +0000 (06:25 -0500)
include/deal.II/lac/dynamic_sparsity_pattern.h

index 21400616d0298dc06ca2402096060bb7decfc597..6d1cb08a378da15c999df351d347eee3939ed74d 100644 (file)
@@ -1073,18 +1073,18 @@ DynamicSparsityPattern::end (const size_type r) const
   // iterator to it. also skip rows for which we do not have
   // store anything based on the IndexSet given to the sparsity
   // pattern
+  //
+  // note: row_length(row) returns zero if the row is not locally stored
   unsigned int row = r+1;
   while ((row<n_rows())
          &&
-         ((row_length(row)==0)
-          ||
-          ((rowset.size() != 0) &&
-           (rowset.is_element(row) == false))))
-
-    if (row == n_rows())
-      return iterator(this);
-    else
-      return iterator(this, row, 0);
+         (row_length(row)==0))
+    ++row;
+
+  if (row == n_rows())
+    return iterator(this);
+  else
+    return iterator(this, row, 0);
 }
 
 

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.