[Gmsh] Local refinement via embedded points

Christophe Geuzaine cgeuzaine at uliege.be
Sat Nov 23 09:46:38 CET 2019



> On 23 Nov 2019, at 09:19, Ryan Huechteman <rdh.aerospace at gmail.com> wrote:
> 
> Hi community,
> 
> Can someone assist me with local refinement. I had a more complex 3D problem that didn't work so I attempted the following toy:
> 
> lc = 1;
> lc_fine = 0.005;
> Point(1) = {-1.0, -1.0, 0.0, lc};
> Point(2) = {-1.0, 1.0, 0.0, lc};
> Point(3) = {1.0, -1.0, 0.0, lc};
> Point(4) = {1.0, 1.0, 0.0, lc};
> //+
> Line(1) = {2, 4};
> //+
> Line(2) = {4, 3};
> //+
> Line(3) = {3, 1};
> //+
> Line(4) = {1, 2};
> //+
> Curve Loop(1) = {4, 1, 2, 3};
> //+
> Plane Surface(1) = {1};
> Point(5) = {0.0, 0.0, 0.0, lc_fine};
> Point{5} In Surface{1};
> 
> which also does not work. What gives?
> 

When the surrounding mesh size is very large (here lc = 1) the meshing algorithm will not sample the constraint "close enough" during the iterative mesh construction and the final triangle edge lengths will be satisfactory without the local refinement.

You could use a field instead, and make sure that the "action" extends above the largest mesh size (Field[2].DistMax = lc):

lc = 1;
lc_fine = 0.005;
Point(1) = {-1.0, -1.0, 0.0, lc};
Point(2) = {-1.0, 1.0, 0.0, lc};
Point(3) = {1.0, -1.0, 0.0, lc};
Point(4) = {1.0, 1.0, 0.0, lc};
Line(1) = {2, 4};
Line(2) = {4, 3};
Line(3) = {3, 1};
Line(4) = {1, 2};
Curve Loop(1) = {4, 1, 2, 3};
Plane Surface(1) = {1};
Point(5) = {0.0, 0.0, 0.0, lc_fine};

Field[1] = Distance;
Field[1].NodesList = {5};
Field[2] = Threshold;
Field[2].IField = 1;
Field[2].LcMin = lc_fine;
Field[2].LcMax = lc;
Field[2].DistMin = lc/100;
Field[2].DistMax = lc;
Background Field = 2;



> Thank you kindly,
> Ryan
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine






More information about the gmsh mailing list