[Gmsh] Transfinite interpolation cuts through the boundary.
Christophe Geuzaine
cgeuzaine at ulg.ac.be
Thu Jan 31 20:27:09 CET 2008
Maka Mohu wrote:
> If you try to run the following example and then zoom in near the
> highest point in the curved boundary you will see that the faces of the
> element cuts through the boundary. Is there a way to control that. Thanks.
>
Add more points: if the curve gets sampled left and right of the max,
there is no way a straight line will not intersect it... You should also
descrease the number of smoothing steps, which could make the mesh
invalid in such highly distorted cases:
lc = 0.1;
Point(1) = {0, 0, 0, lc};
Point(2) = {.1, 0, 0, lc} ;
Point(3) = {.1, .3, 0, lc} ;
Point(4) = {0, .3, 0, lc} ;
Point(5) = {.05, .15, 0, lc};
Spline(1) = {1,5,2} ;
Line(2) = {3,2} ;
Line(3) = {3,4} ;
Line(4) = {4,1} ;
Line Loop(5) = {4,1,-2,3} ;
Plane Surface(6) = {5} ;
Transfinite Line{4} = 21 ;
Transfinite Line{2} = 21 ;//Using Bump 0.05;
Transfinite Line{-1,3} = 21 ;// Using Progression 1.2;
Transfinite Surface{6} = {1,2,3,4};
Mesh.ElementOrder = 1;
// Recombine the triangles into quads
Recombine Surface{6};
// Apply an elliptic smoother to the grid
Mesh.Smoothing = 2;
--
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine