From 9e3b53090f55c48caf8cca71a07413b595ca521e Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 7 May 2015 11:47:54 -0500 Subject: [PATCH] Make a couple of tolerances relative to the size of the object. --- source/grid/grid_generator.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/grid/grid_generator.cc b/source/grid/grid_generator.cc index 2c16bbd2dc..fa7fe4c3ce 100644 --- a/source/grid/grid_generator.cc +++ b/source/grid/grid_generator.cc @@ -2056,7 +2056,7 @@ namespace GridGenerator continue; // If x is zero, then this is part of the plane - if (cell->face(i)->center()(0) < p(0)+1.e-5) + if (cell->face(i)->center()(0) < p(0)+1.e-5 * radius) cell->face(i)->set_boundary_id(1); } ++cell; @@ -3112,7 +3112,7 @@ namespace GridGenerator = cell->face(i); const Point<3> face_center (face->center()); - if (std::abs(face_center(0)-center(0)) > 1.e-6) + if (std::abs(face_center(0)-center(0)) > 1.e-6 * face_center.norm()) { if (std::abs((face_center-center).norm()-inner_radius) < std::abs((face_center-center).norm()-outer_radius)) -- 2.39.5