// Gmsh project created on Wed May 16 18:02:24 2012

// Gmsh project created on Fri May 04 14:04:57 2012


//infittimento alto --> numero basso


Merge "reticula_part.msh";

//CreateTopology;


dk = 0.7;
dk_med = 0.7;
dk_v_low = 1;
dk_high = 0.5;
dk_v_high = 0.1;



Point(1) = {-10.5, -5, 0, dk};
Point(2) = {10.5, -5, 0, dk};
Point(3) = {10.5, 0, 0, dk};
Point(4) = {10.5, -0.4, 0, dk};
Point(5) = {10.5, 10, 0, dk};
Point(6) = {-10.5, 10, 0, dk};
Point(7) = {-10.5, -0.4, 0, dk};
Point(8) = {-10.5, 0, 0, dk};

Point(9) = {0, 0.5, 0, dk};
Point(10) = {3.5, 4.0, 0, dk};
Point(11) = {0, 7.5, 0, dk};
Point(12) = {-3.5, 4.0, 0, dk};
Point(13) = {0, 0.9, 0, dk};
Point(14) = {3.1, 4.0, 0, dk};
Point(15) = {0, 7.1, 0, dk};
Point(16) = {-3.1, 4.0, 0, dk};

Point(17) = {-13.5, -5, 0, dk};
Point(18) = {13.5, -5, 0, dk};
//Point(19) = {-13.5, -7.5, 0, dk};
Point(20) = {-13.5, -7.5, 0, dk};
Point(21) = {-10.5, -7.5, 0, dk};
Point(22) = {10.5, -7.5, 0, dk};
Point(23) = {13.5, -7.5, 0, dk};

Point(24) = {-13.5, 10, 0, dk};
Point(25) = {13.5, 10, 0, dk};
Point(26) = {-13.5, 12.5, 0, dk};
Point(27) = {-10.5, 12.5, 0, dk};
Point(28) = {10.5, 12.5, 0, dk};
Point(29) = {13.5, 12.5, 0, dk};

Point(30) = {-13.5, 0, 0, dk};
Point(31) = {-13.5, -0.4, 0, dk};
Point(32) = {13.5, 0, 0, dk};
Point(33) = {13.5, -0.4, 0, dk};

//Point(34) = {-3.5, -7.5, 0, dk_med};
//Point(35) = {3.5, -7.5, 0, dk_med};
//Point(36) = {-3.5, -5, 0, dk_med};
//Point(37) = {3.5, -5, 0, dk_med};

Point(38) = {-7, 0, 0, dk_high};
Point(39) = {-7, 10, 0, dk_high};
Point(40) = {7, 0, 0, dk_high};
Point(41) = {7, 10, 0, dk_high};

//Point(42) = {-3.5,-0.4, 0, dk_med};
//Point(43) = {3.5,-0.4, 0, dk_med};
//Point(44) = {-3.5,0, 0, dk_med};
//Point(45) = {3.5,0, 0, dk_med};

//Point(46) = {-7, 8.5, 0, dk};
//Point(47) = {7, 8.5, 0, dk};
//Point(48) = {-4.5, 0, 0, dk_med};
//Point(49) = {4.5, 0, 0, dk_med};
//Point(50) = {-4.5, 10, 0, dk};
//Point(51) = {4.5, 10, 0, dk};

Point(52) = {-7,-0.4,0,dk_high};
Point(53) = {-7,-5,0,dk_high};
Point(54) = {-7,-7.5,0,dk_high};

Point(55) = {7,-0.4,0,dk_high};
Point(56) = {7,-5,0,dk_high};
Point(57) = {7,-7.5,0,dk_high};

Point(58) = {-7,12.5,0,dk_high};
Point(59) = {7,12.5,0,dk_high};





Line(1) = {20, 21};
Line(2) = {21, 1};
Line(3) = {1, 17};
Line(4) = {17, 20};
Line(5) = {21, 54};
Line(6) = {54, 53};
Line(7) = {53, 1};
Line(8) = {54, 57};
Line(9) = {57, 56};
Line(10) = {56, 53};
Line(11) = {57, 22};
Line(12) = {22, 2};
Line(13) = {2, 56};
Line(14) = {22, 23};
Line(15) = {23, 18};
Line(16) = {18, 2};
Line(17) = {1, 7};
Line(18) = {7, 31};
Line(19) = {31, 17};
Line(20) = {53, 52};
Line(21) = {52, 7};
Line(22) = {56, 55};
Line(23) = {55, 52};
Line(24) = {2, 4};
Line(25) = {4, 55};
Line(26) = {18, 33};
Line(27) = {33, 4};
Line(28) = {7, 8};
Line(29) = {8, 30};
Line(30) = {30, 31};
Line(31) = {52, 38};
Line(32) = {38, 8};
Line(33) = {55, 40};
Line(34) = {40, 38};
Line(35) = {4, 3};
Line(36) = {3, 40};
Line(37) = {33, 32};
Line(38) = {32, 3};
Line(39) = {8, 6};
Line(40) = {6, 24};
Line(41) = {24, 30};
Line(42) = {38, 39};
Line(43) = {39, 6};
Line(44) = {40, 41};
Line(45) = {41, 39};
Line(46) = {3, 5};
Line(47) = {5, 41};
Line(48) = {32, 25};
Line(49) = {25, 5};
Line(50) = {6, 27};
Line(51) = {27, 26};
Line(52) = {26, 24};
Line(53) = {39, 58};
Line(54) = {58, 27};
Line(55) = {41, 59};
Line(56) = {59, 58};
Line(57) = {5, 28};
Line(58) = {28, 59};
Line(59) = {25, 29};
Line(60) = {29, 28};

Line Loop(61) = {1, 2, 3, 4};
Plane Surface(62) = {61};
Line Loop(63) = {5, 6, 7, -2};
Plane Surface(64) = {63};
Line Loop(65) = {8, 9, 10, -6};
Plane Surface(66) = {65};
Line Loop(67) = {11, 12, 13, -9};
Plane Surface(68) = {67};
Line Loop(69) = {14, 15, 16, -12};
Plane Surface(70) = {69};
Line Loop(71) = {3, -19, -18, -17};
Plane Surface(72) = {71};
Line Loop(73) = {7, 17, -21, -20};
Plane Surface(74) = {73};
Line Loop(75) = {10, 20, -23, -22};
Plane Surface(76) = {75};
Line Loop(77) = {13, 22, -25, -24};
Plane Surface(78) = {77};
Line Loop(79) = {16, 24, -27, -26};
Plane Surface(80) = {79};
Line Loop(81) = {18, -30, -29, -28};
Plane Surface(82) = {81};
Line Loop(83) = {21, 28, -32, -31};
Plane Surface(84) = {83};
Line Loop(85) = {23, 31, -34, -33};
Plane Surface(86) = {85};
Line Loop(87) = {25, 33, -36, -35};
Plane Surface(88) = {87};
Line Loop(89) = {27, 35, -38, -37};
Plane Surface(90) = {89};
Line Loop(91) = {29, -41, -40, -39};
Plane Surface(92) = {91};
Line Loop(93) = {32, 39, -43, -42};
Plane Surface(94) = {93};
//Line Loop(95) = {34, 42, -45, -44};
//Plane Surface(96) = {95};
Line Loop(97) = {36, 44, -47, -46};
Plane Surface(98) = {97};
Line Loop(99) = {38, 46, -49, -48};
Plane Surface(100) = {99};
Line Loop(101) = {40, -52, -51, -50};
Plane Surface(102) = {101};
Line Loop(103) = {43, 50, -54, -53};
Plane Surface(104) = {103};
Line Loop(105) = {45, 53, -56, -55};
Plane Surface(106) = {105};
Line Loop(107) = {47, 55, -58, -57};
Plane Surface(108) = {107};
Line Loop(109) = {49, 57, -60, -59};
Plane Surface(110) = {109};


//Already reticula meshed surface
//Line Loop(111) = {-34, 44, 45, -42};
//Plane Surface(112) = {111};



Coherence Mesh;

//Physical Line(111) = {1, 3, 18, 29, 40, 51, 14, 16, 27, 38, 49, 60};
//Physical Line(112) = {5, 7, 21, 32, 43, 54, 11, 13, 25, 36, 47, 58};
//Physical Line(113) = {8, 10, 23, 34, 45, 56};
//Physical Line(114) = {4, 2, 6, 9, 12, 15};
//Physical Line(115) = {52, 50, 53, 55, 57, 59};
//Physical Line(116) = {19, 17, 20, 22, 24, 26};
//Physical Line(117) = {30, 28, 31, 33, 35, 37};
//Physical Line(118) = {41, 39, 42, 44, 46, 48};
Physical Line(9998) = {42, 34, 44, 45};


Transfinite Line{1, 3, 18, 29, 40, 51, 14, 16, 27, 38, 49, 60} = 4;
Transfinite Line{5, 7, 21, 32, 43, 54, 11, 13, 25, 36, 47, 58} = 5;
Transfinite Line{8, 10, 23, 34, 45, 56} = 50;
Transfinite Line{4, 2, 6, 9, 12, 15} = 4;
Transfinite Line{52, 50, 53, 55, 57, 59} = 4;
Transfinite Line{19, 17, 20, 22, 24, 26} = 6;
Transfinite Line{30, 28, 31, 33, 35, 37} = 4;
Transfinite Line{41, 39, 42, 44, 46, 48} = 12;



Transfinite Surface {62} = {20, 21, 1, 17};
Transfinite Surface {64} = {21, 54, 53, 1};
Transfinite Surface {66} = {54, 57, 56, 53};
Transfinite Surface {68} = {57, 22, 2, 56};
Transfinite Surface {70} = {22, 23, 18, 2};
Transfinite Surface {72} = {17, 1, 7, 31};
Transfinite Surface {74} = {1, 53, 52, 7};
Transfinite Surface {76} = {53, 56, 55, 52};
Transfinite Surface {78} = {56, 2, 4, 55};
Transfinite Surface {80} = {2, 18, 33, 4};
Transfinite Surface {82} = {31, 7, 8, 30};
Transfinite Surface {84} = {7, 52, 38, 8};
Transfinite Surface {86} = {52, 55, 40, 38};
Transfinite Surface {88} = {55, 4, 3, 40};
Transfinite Surface {90} = {4, 33, 32, 3};
Transfinite Surface {92} = {30, 8, 6, 24};
Transfinite Surface {94} = {8, 38, 39, 6};
Transfinite Surface {98} = {40, 3, 5, 41};
Transfinite Surface {100} = {3, 32, 25, 5};
Transfinite Surface {102} = {24, 6, 27, 26};
Transfinite Surface {104} = {6, 39, 58, 27};
Transfinite Surface {106} = {39, 41, 59, 58};
Transfinite Surface {108} = {41, 5, 28, 59};
Transfinite Surface {110} = {5, 25, 29, 28};
Recombine Surface {62, 64, 66, 68, 70, 80, 78, 76, 74, 72, 82, 84, 86, 88, 90, 92, 94, 98, 100, 102, 104, 106, 108, 110};

//Test periodic function
//Periodic Surface 86 {38, 40} =  112 {38, 40};

//Test In
//Line {34} In Surface{86};



