From 74994975c77dd4d5a56b2b90b60ff2f697fb8a76 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Thu, 28 Mar 2024 19:15:40 -0500 Subject: [PATCH] Test grid/closest_point: guard against roundoff error --- tests/grid/closest_point.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/grid/closest_point.cc b/tests/grid/closest_point.cc index 9ab7ad648a..0413c08509 100644 --- a/tests/grid/closest_point.cc +++ b/tests/grid/closest_point.cc @@ -24,7 +24,8 @@ test(const ReferenceCell &reference_cell, for (const unsigned int vertex_no : reference_cell.vertex_indices()) AssertThrow(distance_square <= p.distance_square( - reference_cell.template vertex(vertex_no)), + reference_cell.template vertex(vertex_no)) * + (1. + 2. * std::numeric_limits::epsilon()), ExcInternalError()); // Also generate a lot of points in the unit cell - we should be closer than -- 2.39.5