]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
correction of the linfty_norm
authorhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 21 Dec 1998 18:42:39 +0000 (18:42 +0000)
committerhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 21 Dec 1998 18:42:39 +0000 (18:42 +0000)
git-svn-id: https://svn.dealii.org/trunk@719 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/source/dvector.cc

index c033fe6fd76416b45e37e9bcab97cf60d1ffefc2..481bf5ffc908195b7ee52fa96af3d1d20ef0387b 100644 (file)
@@ -252,8 +252,8 @@ double dVector::linfty_norm () const {
     };
                                   // add up remaining elements
   for (unsigned int i=(dim/4)*4; i<dim; ++i)
-    if (max0<val[i])
-      max0 = val[i];
+    if (max0<fabs(val[i]))
+      max0 = fabs(val[i]);
 
   return max (max(max0, max1),
              max(max2, max3));

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.