From a440928fd8c84167bc131eecfeb136355329f8a4 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 19 May 1998 19:21:45 +0000 Subject: [PATCH] Small readability changes in advance of bigger performance changes. git-svn-id: https://svn.dealii.org/trunk@318 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/source/dsmatrix.cc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/deal.II/lac/source/dsmatrix.cc b/deal.II/lac/source/dsmatrix.cc index 972864c4df..4ecbafdb51 100644 --- a/deal.II/lac/source/dsmatrix.cc +++ b/deal.II/lac/source/dsmatrix.cc @@ -405,12 +405,13 @@ dSMatrix::vmult (dVector& dst, const dVector& src) const Assert(m() == dst.size(), ExcDimensionsDontMatch(m(),dst.size())); Assert(n() == src.size(), ExcDimensionsDontMatch(n(),src.size())); - for (unsigned int i=0; irowstart[i]; jrowstart[i+1]; ++j) + for (unsigned int j=cols->rowstart[row]; jrowstart[row+1]; ++j) s += val[j] * src(cols->colnums[j]); - dst(i) = s; + dst(row) = s; } } @@ -422,11 +423,9 @@ dSMatrix::Tvmult (dVector& dst, const dVector& src) const Assert(n() == dst.size(), ExcDimensionsDontMatch(n(),dst.size())); Assert(m() == src.size(), ExcDimensionsDontMatch(m(),src.size())); - unsigned int i; - - for (i=0;irowstart[i]; jrowstart[i+1] ;j++) { -- 2.39.5