From: hartmann Date: Thu, 11 May 2000 08:39:24 +0000 (+0000) Subject: fix bug with missing min(...,n) X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb3aacf3380526d7434abc2696a37922b26eee17;p=dealii-svn.git fix bug with missing min(...,n) git-svn-id: https://svn.dealii.org/trunk@2837 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/source/sparsity_pattern.cc b/deal.II/lac/source/sparsity_pattern.cc index 49ac236548..8876b4dfa9 100644 --- a/deal.II/lac/source/sparsity_pattern.cc +++ b/deal.II/lac/source/sparsity_pattern.cc @@ -296,7 +296,7 @@ SparsityPattern::reinit (const unsigned int m, // set the rowstart array rowstart[0] = 0; for (unsigned int i=1; i<=rows; ++i) - rowstart[i] = rowstart[i-1]+row_lengths[i-1]; + rowstart[i] = rowstart[i-1]+min(row_lengths[i-1],n); Assert (rowstart[rows]==vec_len, ExcInternalError()); // preset the column numbers by a