Skip to content

Commit

Permalink
Merge pull request #14126 from kronbichler/adjust_tolerance
Browse files Browse the repository at this point in the history
Ensure to look at square of tolerances
  • Loading branch information
tamiko committed Jul 16, 2022
2 parents 8940de0 + 5a8b7b6 commit e2d8251
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions source/fe/mapping_cartesian.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,11 @@ is_cartesian(const CellType &cell)
if (!cell->reference_cell().is_hyper_cube())
return false;

const double abs_tol = 1e-15;
const double rel_tol = 1e-14;
// The tolerances here are somewhat larger than the square of the machine
// epsilon, because we are going to compare the square of distances (to
// avoid computing square roots).
const double abs_tol = 1e-30;
const double rel_tol = 1e-28;
const auto bounding_box = cell->bounding_box();
const auto & bounding_vertices = bounding_box.get_boundary_points();
const auto bb_diagonal_length_squared =
Expand Down

0 comments on commit e2d8251

Please sign in to comment.