From e408c2d4af7181e1c695dacbd6d3c0b1ddba6520 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Thu, 18 Jul 2019 16:29:15 +0200 Subject: [PATCH] Make assertion robust w.r.t. vectorization width --- tests/base/point_03.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/base/point_03.cc b/tests/base/point_03.cc index 921d54d252..efb9d9452d 100644 --- a/tests/base/point_03.cc +++ b/tests/base/point_03.cc @@ -51,7 +51,9 @@ check() for (unsigned int v = 0; v < VectorizedArray::n_array_elements; ++v) diff += std::abs(distance_vec[v]); - AssertThrow(diff < 100 * std::numeric_limits::epsilon(), + AssertThrow(diff < 2 * std::numeric_limits::epsilon() * + VectorizedArray::n_array_elements * + VectorizedArray::n_array_elements, ExcMessage("diff is " + std::to_string(diff))); deallog << "Ok" << std::endl; -- 2.39.5