[Gmsh] Refining only near the boundary of a closed surface

Pierre Marchand pierre.marchand at inria.fr
Tue Jan 15 13:57:06 CET 2019


Hello,

I am trying to refine near the boundary of a L-shape domain using field, but without success. Let us take a simpler geometry as a rectangle (same as in the example https://gitlab.onelab.info/gmsh/gmsh/blob/master/tutorial/t10.geo <https://gitlab.onelab.info/gmsh/gmsh/blob/master/tutorial/t10.geo>), I am trying to use Distance and Threshold as follows:
// Definition of the geometry
lc = .15;
Point(1) = {0.0,0.0,0,lc}; Point(2) = {1,0.0,0,lc};
Point(3) = {1,1,0,lc};     Point(4) = {0,1,0,lc};
Point(5) = {0.2,.5,0,lc};
Line(1) = {1,2}; Line(2) = {2,3}; Line(3) = {3,4}; Line(4) = {4,1};
Curve Loop(5) = {1,2,3,4}; Plane Surface(6) = {5};

// Definition of the distance function
Field[1] = Distance;
Field[1].NNodesByEdge = 100;
Field[1].EdgesList = {2};

// Threshold
Field[2] = Threshold;
Field[2].IField = 1;
Field[2].LcMin = lc / 30;
Field[2].LcMax = lc;
Field[2].DistMin = 0.15;
Field[2].DistMax = 0.5;

If I take only one, two or three curves with Field[1].EdgesList = {1}, Field[1].EdgesList = {1,2} or Field[1].EdgesList = {1,2,3}, it works as expected but if I take instead Field[1].EdgesList = {1,2,3,4}, then the mesh is uniform everywhere, there is no more threshold. What am I doing wrong ? 


Thank you in advance,
Pierre Marchand
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20190115/830f8e66/attachment.html>


More information about the gmsh mailing list