# [Gmsh] structured mesh

Luc Berger-Vergiat lb2653 at columbia.edu
Wed Jun 3 01:05:18 CEST 2015

```Hi all I attached a .geo that describes a simple geometry.
I would like to have the central part structured while the two outer
parts can be unstructured.
I also want to have less elements in the outer parts since they are less
relevant to my simulation.
Finally I am using quads only to run my simulation so I need the mesh to
be fully recombined.

I am almost there except for the full recombination, the two outer
rectangles are not well recombined.
Is there a way to get a mesh with quads only?
My guess is that other algorithm can be used to get a better
recombination, I just don't know which one will provide a correct mesh.

Thanks!

--
Best,
Luc

-------------- next part --------------
Mesh.RecombineAll=1;
//Mesh.RecombinationAlgorithm=1;
//Mesh.Algorithm=8;
//Mesh.SubdivisionAlgorithm=1;
Mesh.ColorCarousel=0;

L  = 500.0;
W  = 250.0;
ln =  10.0;
lr =  70.0;

h1=10.0;
h2=25.0;

Point(1) = {(L-lr)/2, 0, 0, h1};
Point(2) = {(L-ln)/2, 0, 0, h1};
Point(3) = {(L+ln)/2, 0, 0, h1};
Point(4) = {(L+lr)/2, 0, 0, h1};
Point(5) = {(L+lr)/2, W-ln, 0, h1};
Point(6) = {(L+lr)/2, W, 0, h1};
Point(7) = {(L+ln)/2, W, 0, h1};
Point(8) = {(L+ln)/2, W-ln, 0, h1};
Point(9) = {(L-ln)/2, W-ln, 0, h1};
Point(10) = {(L-ln)/2, W, 0, h1};
Point(11) = {(L-lr)/2, W, 0, h1};
Point(12) = {(L-lr)/2, W-ln, 0, h1};
Point(13) = {0, W, 0, h2};
Point(14) = {0, 0, 0, h2};
Point(15) = {L, 0, 0, h2};
Point(16) = {L, W, 0, h2};

Line(1) = {1, 2};
Line(2) = {2, 3};
Line(3) = {3, 4};
Line(4) = {4, 5};
Line(5) = {5, 6};
Line(6) = {6, 7};
Line(7) = {7, 8};
Line(8) = {8, 9};
Line(9) = {9, 10};
Line(10) = {10, 11};
Line(11) = {11, 12};
Line(12) = {12, 1};
Line(13) = {12, 9};
Line(14) = {9, 2};
Line(15) = {3, 8};
Line(16) = {8, 5};
Line(17) = {11, 13};
Line(18) = {13, 14};
Line(19) = {14, 1};
Line(20) = {4, 15};
Line(21) = {15, 16};
Line(22) = {16, 6};
Transfinite Line {1, 3, 6, 10, 13, 16} = Ceil((lr-ln)/(2*h1))+1;
Transfinite Line {2, 5, 7, 8, 9, 11} = Ceil(ln/h1)+1;
Transfinite Line {4, 12, 14, 15} = Ceil((W-ln)/h1)+1;

Line Loop(1) = {1, -14, -13, 12};
Line Loop(2) = {2, 15, 8, 14};
Line Loop(3) = {3, 4, -16, -15};
Line Loop(4) = {5, 6, 7, 16};
Line Loop(5) = {9, 10, 11, 13};
Line Loop(6) = {-12, -11, 17, 18, 19};
Line Loop(7) = {20, 21, 22, -5, -4};
Plane Surface(1) = {1};
Plane Surface(2) = {2};
Plane Surface(3) = {3};
Plane Surface(4) = {4};
Plane Surface(5) = {5};
Plane Surface(6) = {6};
Plane Surface(7) = {7};
Transfinite Surface{1, 2, 3, 4, 5};

Physical Surface(20) = {1, 2, 3, 4, 5, 6, 7};
```