]> https://gitweb.dealii.org/ - dealii.git/commitdiff
address comment 2690/head
authorTimo Heister <timo.heister@gmail.com>
Tue, 21 Jun 2016 20:12:10 +0000 (13:12 -0700)
committerTimo Heister <timo.heister@gmail.com>
Tue, 21 Jun 2016 20:14:45 +0000 (13:14 -0700)
include/deal.II/lac/dynamic_sparsity_pattern.h

index c2e35819af685cbdd81b40a9cfb017cd55c8498f..c1d1d62d3950504dffdacaac3fe7d420cf5a3a88 100644 (file)
@@ -1085,10 +1085,11 @@ DynamicSparsityPattern::begin (const size_type r) const
     }
 
   // Without an index set we have to do a linear search starting at
-  // row r until we find a non-empty one
+  // row r until we find a non-empty one. We will check the lines vector
+  // directly instead of going through the slower row_length() function
   size_type row = r;
 
-  while (row<n_rows() && row_length(row)==0)
+  while (row<n_rows() && lines[row].entries.size()==0)
     {
       ++row;
     }

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.