lc = 0.05;
//
Point(1) = {0, 0.1, 0, lc};
Point(2) = {0.1, 0.0,  0.0, lc} ;
Point(3) = {0.5, 0.,  0.0, lc} ;
Point(4) = {0.7, 0.2 , 0.0, lc} ;
Point(5) = {0.85, 0.3, 0.0, lc} ;
Point(6) = {0.65, 0.45, 0, lc};
Point(7) = {0.30, 0.45, 0, lc};
Point(8) = {0.15, 0.4, 0, lc};
Point(9) = {0.0, 0.25 , 0, lc};
//
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,1} ;
// Create surface
Line Loop(1) = {1,2,3,4,5,6,7,8,9};
Plane Surface(1) = {1};

p1 = 10;
p2 = 10;

// horiz:
n2 = 3 * (p1 - 1) + 1;
n5 = p1;
n6 = p1;
n7 = p1;

// vertical:
n8 = p2 ;
n9 = p2 ;
n1 = p2 ;
n3 = p2 + p2 - 1;
n4 = p2;

//
Transfinite Line{1} = n1 ;
Transfinite Line{9} = n9 ;

Transfinite Line{2} = n2 ;

Transfinite Line{3} = n3 ;
Transfinite Line{4} = n4 ;

Transfinite Line{5} = n5;
Transfinite Line{6} = n6;
Transfinite Line{7} = n7;

Transfinite Line{8} = n8;
//
Transfinite Surface{1} = { 2,3,5,8 };
//
Recombine Surface{1};
Mesh.Smoothing = 15;
