l = 1;
r1 = 0.5;
r2 = 1;
n = 10;
r3=1.224744871391589;

// interior cube
Point(1) = {0,0,0,l};
Point(2) = {r1,r1,-r1,l};
Point(3) = {-r1,r1,-r1,l};
Point(4) = {-r1,-r1,-r1,l};
Point(5) = {r1,-r1,-r1,l};
Line(1) = {2,3};
Line(2) = {3,4};
Line(3) = {4,5};
Line(4) = {5,2};
Line Loop(5) = {4,1,2,3};
Plane Surface(6) = {5};
Extrude Surface {6, {0.0,0.0,r1}};

// exterior shell
Point(102) = {r2,-r2,-r2,l};
Point(103) = {-r2,-r2,-r2,l};
Point(104) = {-r3,-r3,-0,l};
Point(105) = {r3,-r3,-0,l};
Circle(29) = {103,1,102};
Circle(30) = {102,1,105};
Circle(31) = {105,1,104};
Circle(32) = {104,1,103};
Line Loop(33) = {29,30,31,32};
Ruled Surface(45) = {33};
Rotate { {0,0,1},{0,0,0}, Pi/2 } { Duplicata{ Surface{45}; } }
Rotate { {0,0,1},{0,0,0}, Pi } { Duplicata{ Surface{45}; } }
Rotate { {0,0,1},{0,0,0}, 3*Pi/2 } { Duplicata{ Surface{45}; } }


Line Loop(58) = {51, 55, 29, 47};
Ruled Surface(59) = {58};
Line(60) = {11, 121};
Line(61) = {116, 3};
Line(62) = {15, 104};
Line(63) = {103, 4};
Line(64) = {6, 105};
Line(65) = {102, 5};
Line(66) = {7, 113};
Line(67) = {108, 2};
Line Loop(68) = {61, 18, 60, -52};
Plane Surface(69) = {68};
Line Loop(70) = {67, 14, 66, -48};
Plane Surface(71) = {70};
Line Loop(72) = {65, 13, 64, -30};
Plane Surface(73) = {72};
Line Loop(74) = {22, 62, 32, 63};
Plane Surface(75) = {74};
Line Loop(76) = {10, 62, 57, -60};
Plane Surface(77) = {76};
Line Loop(78) = {9, 60, 53, -66};
Plane Surface(79) = {78};
Line Loop(80) = {8, 66, 49, -64};
Plane Surface(81) = {80};
Line Loop(82) = {4, -67, -47, 65};
Plane Surface(83) = {82};
Line Loop(84) = {29, 65, -3, -63};
Plane Surface(85) = {84};
Line Loop(86) = {2, -63, -55, 61};
Plane Surface(87) = {86};
Line Loop(88) = {51, 61, -1, -67};
Plane Surface(89) = {88};
Line Loop(91) = {11, 64, 31, -62};
Plane Surface(92) = {91};


Surface Loop(93) = {50, 79, 89, 19, 71, 69};
Volume(94) = {93};
Surface Loop(95) = {81, 46, 71, 73, 15, 83};
Volume(96) = {95};
Surface Loop(97) = {92, 45, 73, 75, 85, 27};
Volume(98) = {97};
Surface Loop(99) = {77, 54, 75, 69, 23, 87};
Volume(100) = {99};
Surface Loop(101) = {59, 85, 83, 89, 87, 6};
Volume(102) = {101};

// Transfinite
Transfinite Line{1:4} = n;
Transfinite Line {3,22,11,13,8,4,14,9,1,18,10,2} = n;
Transfinite Line {49,31,32,53,8,9,10,11,47,51,57,29,55,30,48,52,32,65,64,63,62,60,61,66,67} = n;

Transfinite Surface "*" ;
Recombine Surface "*";
Transfinite Volume "*";

Physical Volume(1) = {1, 94:102:2};
Mesh 3;
