From 966c2960fb216e373689b8a737792522be6d4de5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Sch=C3=B6berl?= Date: Thu, 7 Feb 2019 23:09:34 +0100 Subject: [PATCH] rounding num segments per edge --- libsrc/geom2d/genmesh2d.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libsrc/geom2d/genmesh2d.cpp b/libsrc/geom2d/genmesh2d.cpp index b42440ce..b5e5000a 100644 --- a/libsrc/geom2d/genmesh2d.cpp +++ b/libsrc/geom2d/genmesh2d.cpp @@ -55,7 +55,8 @@ namespace netgen sum += dt / fun; } - int nel = int (sum+1); + int nel = int (sum+0.5); + if (nel == 0) nel = 1; fperel = sum / nel; points.Append (0); @@ -129,6 +130,7 @@ namespace netgen Point3d oldmark3(oldmark(0), oldmark(1), 0); double h = mesh.GetH (Point<3> (oldmark(0), oldmark(1), 0)); + cout << "edge h = " << h << endl; Vec<3> v (1e-4*h, 1e-4*h, 1e-4*h); searchtree.GetIntersecting (oldmark3 - v, oldmark3 + v, locsearch);