From: Wolfgang Bangerth Date: Thu, 7 May 2015 16:47:54 +0000 (-0500) Subject: Make a couple of tolerances relative to the size of the object. X-Git-Tag: v8.3.0-rc1~189^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F913%2Fhead;p=dealii.git Make a couple of tolerances relative to the size of the object. --- 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))