]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Update tests for Intel 15 1157/head
authorTimo Heister <timo.heister@gmail.com>
Sat, 18 Jul 2015 16:22:01 +0000 (12:22 -0400)
committerTimo Heister <timo.heister@gmail.com>
Sat, 18 Jul 2015 16:22:01 +0000 (12:22 -0400)
Make error checks more reliable and void == with doubles.

tests/fe/non_primitive_1.cc
tests/lac/vector_large_numbers.cc

index e6fa2beab15c7f4eedd94913a68560f3e5325b8e..88414cfbd6baa8dbc9435de330b3d4449213f2e8 100644 (file)
@@ -325,9 +325,9 @@ test ()
     {
       if (i % (dim*dim*dim) == 0)
         deallog << i << ' ' << p1->value() << std::endl;
-      AssertThrow (p1->value() == p2->value(),
+      AssertThrow (std::abs(p1->value() - p2->value())<1e-15,
                    ExcInternalError());
-      AssertThrow (p1->value() == p3->value(),
+      AssertThrow (std::abs(p1->value() - p3->value())<1e-15,
                    ExcInternalError());
     };
 }
index b72063334424dd37402aab7347e5b2a327c8b9a8..71c956633f5049876c3c058fdcc9bccc4efa2c67 100644 (file)
@@ -56,10 +56,10 @@ void check_large_numbers()
   w(4) = 3e-303;
   w(5) = -1e-303;
   const double correct4 = std::sqrt(100. + 1. + 4. + 9 + 1.) * 1e-303;
-  AssertThrow (std::abs(w.l2_norm() - correct4) < 1e-13*correct4, ExcInternalError());
+  AssertThrow (std::abs(w.l2_norm() - correct4) <= 1e-13*correct4, ExcInternalError());
 
   const double correct5 = std::pow(1000. + 1. + 8. + 27 + 1., 1./3.) * 1e-303;
-  AssertThrow (std::abs(w.lp_norm(3.) - correct5) < 1e-13*correct5, ExcInternalError());
+  AssertThrow (std::abs(w.lp_norm(3.) - correct5) <= 1e-13*correct5, ExcInternalError());
   deallog << "OK" << 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.