From: Matthias Maier Date: Fri, 29 Mar 2024 00:15:40 +0000 (-0500) Subject: Test grid/closest_point: guard against roundoff error X-Git-Tag: v9.6.0-rc1~432^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74994975c77dd4d5a56b2b90b60ff2f697fb8a76;p=dealii.git Test grid/closest_point: guard against roundoff error --- 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