]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove a custom implementation of abs. 1344/head
authorDavid Wells <drwells@vt.edu>
Tue, 11 Aug 2015 22:11:01 +0000 (18:11 -0400)
committerDavid Wells <drwells@vt.edu>
Wed, 12 Aug 2015 20:12:55 +0000 (16:12 -0400)
The std::abs function suffices.

source/base/quadrature_lib.cc

index 3eead3a7eab652dfcc5a8c05bad5a61db2214949..dd16fb4c72de0c96ab6f6039fe783d1eec62d11e 100644 (file)
@@ -29,15 +29,6 @@ DEAL_II_NAMESPACE_OPEN
 // for all lower dimensions as well. That is why in this file the check
 // is for deal_II_dimension >= any_number and not for ==
 
-namespace
-{
-  template <typename number>
-  number abs (const number a)
-  {
-    return ((a>0) ? a : -a);
-  }
-}
-
 
 
 template <>
@@ -158,7 +149,7 @@ QGauss<1>::QGauss (const unsigned int n)
           pp = n*(z*p1-p2)/(z*z-1);
           z = z-p1/pp;
         }
-      while (abs(p1/pp) > tolerance);
+      while (std::abs(p1/pp) > tolerance);
 
       double x = .5*z;
       this->quadrature_points[i-1] = Point<1>(.5-x);

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.