]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Small changes.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 22 May 1998 07:44:15 +0000 (07:44 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 22 May 1998 07:44:15 +0000 (07:44 +0000)
git-svn-id: https://svn.dealii.org/trunk@332 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/source/dfmatrix.cc

index b2b3340f76ce88d47c1092f579343cd7dad55acf..2d9d23f37d074afd4dd54d79de35d4713e9dea7e 100644 (file)
@@ -42,7 +42,7 @@ void dFMatrix::reinit (const unsigned int mm, const unsigned int nn)
       dim_range = nn;
       dim_image = mm;
 //      memset(val, 0, sizeof(double)*nn*mm);
-      for (unsigned int i=0; i<nn*mm; ++i) val[i] = 0;
+      clear ();
     }
 }
 
@@ -925,8 +925,10 @@ double dFMatrix::determinant () const {
 
 
 void dFMatrix::clear () {
-  for (unsigned int i=0; i<val_size; ++i)
-    val[i] = 0.;
+  double       *val_ptr = &val[0];
+  const double *end_ptr = &val[n()*m()];
+  while (val_prt != end_ptr)
+    *val_ptr++ = 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.