]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix test codim_one/error_estimator_02 2102/head
authorTimo Heister <timo.heister@gmail.com>
Sat, 23 Jan 2016 10:56:27 +0000 (11:56 +0100)
committerTimo Heister <timo.heister@gmail.com>
Sat, 23 Jan 2016 10:56:27 +0000 (11:56 +0100)
fixes dealii/tests/codim_one/error_estimator_02.cc:75:9: warning: using
integer absolute value function 'abs' when argument is of floating point
type [-Wabsolute-value]
    if (abs(p(1)-1.0)<1e-5)

tests/codim_one/error_estimator_02.cc

index d4cfb46f98df6e81b92b19694d184d087b45f760..f79059a0ecb0bb723846ff8dfc95d0c8a67918ec 100644 (file)
@@ -72,7 +72,7 @@ public:
                         const unsigned int  component) const
   {
     double val = 0.0;
-    if (abs(p(1)-1.0)<1e-5)
+    if (std::abs(p(1)-1.0)<1e-5)
       val = 2.0;
 
     deallog << "evaluate normal derivative at " << p << " with value " << val << std::endl;

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.