Point without mesh size still forcing a local mesh density?
Hello,
First let me present that simple case here that I built to convince myself of the behavior:
- I create two rectangles, both sharing points 2 and 3 (= line 2)
- points 1 and 4 have a mesh size of lc1 on the left
- points 5 and 6 have a mesh size of lc2 on the right
- points 2 and 3 have no mesh size prescribed
lc1 = 1e-2;
lc2 = 1e-3;
Point(1) = {0, 0, 0, lc1};
Point(2) = {.1, 0, 0};
Point(3) = {.1, .3, 0};
Point(4) = {0, .3, 0, lc1};
Line(1) = {1, 2};
Line(2) = {2, 3};
Line(3) = {3, 4};
Line(4) = {4, 1};
Curve Loop(1) = {1, 2, 3, 4};
Plane Surface(1) = {1};
Point(5) = {.2, 0, 0, lc2};
Point(6) = {.2, .3, 0, lc2};
Line(5) = {2, 5};
Line(6) = {5, 6};
Line(7) = {6, 3};
Curve Loop (2) = {5, 6, 7, -2};
Plane Surface(2) = {2};
I get the following 2D mesh:
When I first started using Gmsh, I was under the impression that points that wouldn't have a mesh size set would just be the slaves of the other points for the construction of the gradient mesh size while it seems to be enforcing a default mesh size. In this present case, the behavior I expected was for points 2 and 3 to have a local mesh size of (lc1+lc2)/2
.
Is there a way to relax that behavior and let the mesher behave as in point 2 and point 3 were not locally driving anything and just have a mesh size gradient from the locations where the mesh size is specified?
In the current example it would be quite easy to directly enforce (lc1+lc2)/2
but in most cases those points are generated by geometrical operations (intersections etc) and it's not obvious to find what the local mesh size should be set at (still, I've identified I could collect those points with gmsh.model.getAdjacencies
and then gmsh.model.mesh.setSize
but far from great and smooth mesh gradient)
Thanks,