]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make assertion robust w.r.t. vectorization width 8393/head
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Thu, 18 Jul 2019 14:29:15 +0000 (16:29 +0200)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Thu, 18 Jul 2019 15:05:34 +0000 (17:05 +0200)
tests/base/point_03.cc

index 921d54d252a67751b6ba9735ff1931e73bf99a3f..efb9d9452d170c80b7d8246a7c3c009ae3c1f27a 100644 (file)
@@ -51,7 +51,9 @@ check()
   for (unsigned int v = 0; v < VectorizedArray<number>::n_array_elements; ++v)
     diff += std::abs(distance_vec[v]);
 
-  AssertThrow(diff < 100 * std::numeric_limits<number>::epsilon(),
+  AssertThrow(diff < 2 * std::numeric_limits<number>::epsilon() *
+                       VectorizedArray<number>::n_array_elements *
+                       VectorizedArray<number>::n_array_elements,
               ExcMessage("diff is " + std::to_string(diff)));
 
   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.