li = 0.01; lo = 0.2;

r = 0.1; l1 = 20*r;

Point(1) = {0,0,0};
Point(2) = {r,0,0,li};
Point(3) = {0,r,0,li};
Point(4) = {-r,0,0,li};
Point(5) = {0,-r,0,li};

Circle(1) = {2,1,3};
Circle(2) = {3,1,4};
Circle(3) = {4,1,5};
Circle(4) = {5,1,2};

Point(6) = {l1,0,0,lo};
Point(7) = {0,l1,0,lo};
Point(8) = {-l1,0,0,lo};
Point(9) = {0,-l1,0,lo};

Circle(5) = {6,1,7};
Circle(6) = {7,1,8};
Circle(7) = {8,1,9};
Circle(8) = {9,1,6};

Line Loop(1) = {1,2,3,4};
Line Loop(2) = {5,6,7,8};

Plane Surface(10) = {2,1};

Extrude {0,0,-10.0}
{
Surface{10};
Layers{100};
//Recombine;
}

Surface Loop(50) = {10,52,23,27,31,35,39,43,47,51};
Volume(50) = {50};
Physical Volume(50) = {50};

Physical Surface(10) = {10};
Physical Surface(52) = {52};
Physical Surface(23) = {23};
Physical Surface(27) = {27};
Physical Surface(31) = {31};
Physical Surface(35) = {35};
Physical Surface(39) = {39};
Physical Surface(43) = {43};
Physical Surface(47) = {47};
Physical Surface(51) = {51};

Periodic Surface 52 {-19,-18,-17,-16,12,13,14,15} = 10 {1,2,3,4,5,6,7,8};

Mesh.Algorithm = 2;
Mesh.Algorithm3D = 4;
