[Gmsh] Structured mesh for a 5-vertices polygon

Pollyana Rosa pollyana.rosa at techcon.eng.br
Wed Jan 8 14:46:30 CET 2020


Hi everyone,

I want to generate a structured mesh for a 5 vertices polygon as the
attached picture.
[image: image.png]


I used the code below to specify the points, lines and generate the
surface, but I need a structured mesh.
I know that I can reach this dividing the polygon in two polygons with 4
vertices each. However, I'm looking for other solutions.


SetFactory("OpenCASCADE");
//+
Point(1) = {0, 0, 0, 1.0};
//+
Point(2) = {0, 200, 0, 1.0};
//+
Point(3) = {100, 200, 0, 1.0};
//+
Point(4) = {100, 100, 0, 1.0};
//+
Point(5) = {50, 0, 0, 1.0};

Point(6) = {100, 0, 0, 1.0};


Line(1) = {1, 2};
//+
Line(2) = {2, 3};
//+
Line(3) = {3, 4};
//+

Line(4) = {4, 5};
//+
Line(5) = {5, 1};

//+

//+
Transfinite Curve {1, 2} =5;
Transfinite Curve {3 : 5} = 3;

//+
Curve Loop(1) = {1, 2, 3, 4, 5};
//+
Surface(1) = {1};
//+
Transfinite Surface {1} = {1,2,3,6};
//+
Recombine Surface {1};

Thanks,

Pollyana.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20200108/5488c101/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 16748 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20200108/5488c101/attachment.png>


More information about the gmsh mailing list