lx = 10.0;
ly = 5.0;
lz = -0.1;

Point(1) = { 0, -ly, 0};
Point(2) = { lx, -ly, 0};
Point(3) = { lx,  ly, 0};
Point(4) = { 0,  ly, 0};
Point(5) = { 0, -ly, 0.1};
Point(6) = { lx, -ly, 0.1};
Point(7) = { lx,  ly, 0.1};
Point(8) = { 0,  ly, 0.1};

Line(1) = {1, 2};
Line(2) = {2, 3};
Line(3) = {3, 4};
Line(4) = {4, 1};
Line(5) = {5, 6};
Line(6) = {6, 7};
Line(7) = {7, 8};
Line(8) = {8, 5};
Line(9) = {1, 5};
Line(10) = {2, 6};
Line(11) = {3, 7};
Line(12) = {4, 8};

Line Loop(1) = {1,2,3,4};
Plane Surface(1) = {1};
Line Loop(2) = {5,6,7,8};
Plane Surface(2) = {2};
Line Loop(3) = {1,10,-5,-9};
Plane Surface(3) = {3};
Line Loop(4) = {2,11,-6,-10};
Plane Surface(4) = {4};
Line Loop(5) = {3,12,-7,-11};
Plane Surface(5) = {5};
Line Loop(6) = {4,9,-8,-12};
Plane Surface(6) = {6};

Surface Loop(1) = {1, 2, 3, 4, 5, 6};

Volume(1) = {1};

Transfinite Line {9,10,11,12} = 1;
Transfinite Line {1,2,3,4,5,6,7,8} = np; 
//Transfinite Surface "*";
//Recombine Surface "*";
//Transfinite Volume "*";

Periodic Surface 4 {2,11,-6,-10} = 6 {-4,12,8,-9};
Periodic Surface 3 {1,10,-5,-9} = 5 {-3,11,7,-12};
Periodic Surface 1 {1,2,3,4} = 2 {5,6,7,8};

Physical Volume(1) = {1};
Physical Surface(103) = {4};
Physical Surface(104) = {6};
Physical Surface(105) = {3};
Physical Surface(106) = {5};
Physical Surface(101) = {1};
Physical Surface(102) = {2};
