// Gmsh project created on Thu Oct 13 17:23:29 2011
//unit:m
lc = 5e-3;
lc1 = 1e-3;

L = 100e-3;
W = 100e-3;
H = 100e-3;
r1 = 3e-3;
r2 = 6e-3;

Lpml = 100e-3;
Wpml = 100e-3;
Hpml = 50e-3;

h1 = 50e-3;

pos_x1 = L/2;
pos_y1 = W/2; 

//type PEC = 100, type PMC = 1, source1 = 11;
TP_PEC = 100;
TP_PMC = 1;
TP_SRC1= 11;
TP_SRC2 = 12;

Point(1) = {0, 0, 0, lc1};
Point(2) = {L, 0, 0, lc1};
Point(3) = {L, W, 0, lc1};
Point(4) = {0, W, 0, lc1};

Point(5) = {0, 0, H, lc};
Point(6) = {L, 0, H, lc};
Point(7) = {L, W, H, lc};
Point(8) = {0, W, H, lc};

Point(9) = {pos_x1, pos_y1, 0, lc1};
Point(10) = {pos_x1, pos_y1, h1,lc1};

Point(11) = {pos_x1+r1, pos_y1, 0, lc1};
Point(12) = {pos_x1-r1, pos_y1, 0,lc1};

Point(13) = {pos_x1+r1, pos_y1, h1, lc1};
Point(14) = {pos_x1-r1, pos_y1, h1,lc1};

Point(15) = {pos_x1+r2, pos_y1, 0, lc1};
Point(16) = {pos_x1-r2, pos_y1, 0,lc1};


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



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

Circle(13) = {11, 9, 12};
Circle(14) = {12, 9, 11};
Circle(15) = {15, 9, 16};
Circle(16) = {16, 9, 15};
Circle(17) = {13, 10, 14};
Circle(18) = {14, 10, 13};

Line(19) = {13, 11};
Line(20) = {12, 14};
Line Loop(21) = {18, 19, -14, 20};
Ruled Surface(22) = {21};
Line Loop(23) = {13, 20, -17, 19};
Ruled Surface(24) = {23};


Line Loop(25) = {18, 17};
Plane Surface(26) = {25};

Line Loop(27) = {16, 15};
Line Loop(28) = {14, 13};
Plane Surface(29) = {27, 28};
Line Loop(30) = {4, 10, -8, -9};
Plane Surface(31) = {30};
Line Loop(32) = {1, 11, -5, -10};
Plane Surface(33) = {32};
Line Loop(34) = {11, 6, -12, -2};
Plane Surface(35) = {34};
Line Loop(36) = {3, 9, -7, -12};
Plane Surface(37) = {36};


Line Loop(38) = {2, 3, 4, 1};
Plane Surface(39) = {38};

Line Loop(40) = {6, 7, 8, 5};
Plane Surface(41) = {27, 40};

Extrude {0, 0, 10e-3} {
  Surface{39};
}
