[Gmsh] gmsh tollerance

Mikhail Artemiev artemiev.mikhail at ngs.ru
Sat Sep 1 18:32:45 CEST 2012


Hi Alex,

> Is there some parameter like Geometry Precision in gmsh ?

I guess it's Geometry.Tolerance, and you already use it. 
But I can be wrong.

This code is incorrect:

lc=50.000000000000;
Point(1) = {0.000 , 1120.0000 , 0,0.000020089286};
Point(1000) = {0.000 , 0.00 , 0,lc/100};
Point(1001) = {0.000 , 10.000 , 0,lc/1000};
Point(1005) = {0.000020089286 , 1119.999989955357 
,0,lc/100000};
Ellipse(1) = { 1005 , 1000, 1001, 1 };

> I think it's because   Point(1005)  have coordinate ~1120 
>and gmsh
> rounds it up to 1120.

No, you'll be surprised, but the reason is that "Circle or
ellipse arc 1 greater than Pi (angle=6.28319)" :)
You'll be surprised again, but the solution is to
"subdivide the arc in smaller pieces" :)

This code works perfectly:

lc=50.000000000000;
Point(1) = {0.000 , 1120.000 , 0,0.000020089286};
Point(1000) = {0.000 , 0.000 , 0,lc/100};
Point(1005) = {0.000020089286 , 1119.999989955357 , 
0,lc/100000};
Point(2) = { 1120, 0, 0, lc };
Point(3) = { 0, -1120, 0, lc };
Point(4) = { -1120, 0, 0, lc };

Ellipse(1) = { 1005 , 1000, 1, 2 };
Ellipse(2) = { 2 , 1000, 1, 3 };
Ellipse(3) = { 3 , 1000, 1, 4 };
Ellipse(4) = { 4 , 1000, 1, 1 };

Cheers,
Mikhail