Skip to content

Commit

Permalink
Merge pull request #16812 from tamiko/fix_tests_avx_05
Browse files Browse the repository at this point in the history
Test grid/closest_point: guard against roundoff error
  • Loading branch information
kronbichler committed Mar 29, 2024
2 parents a4b8d95 + 7499497 commit 36f1906
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/grid/closest_point.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<dim>(vertex_no)),
reference_cell.template vertex<dim>(vertex_no)) *
(1. + 2. * std::numeric_limits<double>::epsilon()),
ExcInternalError());

// Also generate a lot of points in the unit cell - we should be closer than
Expand Down

0 comments on commit 36f1906

Please sign in to comment.