///////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////  NACA012 //////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////



///////////////
// Notations //
///////////////
//Line             100
//Line Loop        200
//Circle           300
//Spline           500
//Plane Surface   1000

poids1= 5.E-03;
poids2= 1.E+00;



///////////////////////////// 
// Sharp NACA 0012 Profile //
// Angle of attack : 2.0   // 
/////////////////////////////
Point(1)   = { 1.000000000000000E+00, 0.000000000000000E+00, 0., poids1};
Point(2)   = { 9.970300197601318E-01,-4.207300080452114E-04, 0., poids1};
Point(3)   = { 9.937499761581421E-01,-8.835400221869349E-04, 0., poids1};
Point(4)   = { 9.901300072669983E-01,-1.392400008626282E-03, 0., poids1};
Point(5)   = { 9.861299991607666E-01,-1.951699960045516E-03, 0., poids1};
Point(6)   = { 9.817100167274475E-01,-2.566199982538819E-03, 0., poids1};
Point(7)   = { 9.768300056457520E-01,-3.240799997001886E-03, 0., poids1};
Point(8)   = { 9.714400172233582E-01,-3.981099929660559E-03, 0., poids1};
Point(9)   = { 9.654899835586548E-01,-4.792999941855669E-03, 0., poids1};
Point(10)  = { 9.589200019836426E-01,-5.682699847966433E-03, 0., poids1};
Point(11)  = { 9.516599774360657E-01,-6.657199934124947E-03, 0., poids1};
Point(12)  = { 9.436399936676025E-01,-7.723500020802021E-03, 0., poids1};
Point(13)  = { 9.347800016403198E-01,-8.889400400221348E-03, 0., poids1};
Point(14)  = { 9.250000119209290E-01,-1.016299985349178E-02, 0., poids1};
Point(15)  = { 9.142000079154968E-01,-1.155200041830540E-02, 0., poids1};
Point(16)  = { 9.022700190544128E-01,-1.306699961423874E-02, 0., poids1};
Point(17)  = { 8.890900015830994E-01,-1.471399981528521E-02, 0., poids1};
Point(18)  = { 8.745399713516235E-01,-1.650499925017357E-02, 0., poids1};
Point(19)  = { 8.584600090980530E-01,-1.844800077378750E-02, 0., poids1};
Point(20)  = { 8.416299819946289E-01,-2.044299989938736E-02, 0., poids1};
Point(21)  = { 8.249099850654602E-01,-2.238800004124641E-02, 0., poids1};
Point(22)  = { 8.082900047302246E-01,-2.428100071847439E-02, 0., poids1};
Point(23)  = { 7.917699813842773E-01,-2.612599916756153E-02, 0., poids1};
Point(24)  = { 7.753499746322632E-01,-2.792399935424328E-02, 0., poids1};
Point(25)  = { 7.590299844741821E-01,-2.967499941587448E-02, 0., poids1};
Point(26)  = { 7.428100109100342E-01,-3.138099983334541E-02, 0., poids1};
Point(27)  = { 7.266700267791748E-01,-3.304199874401093E-02, 0., poids1};
Point(28)  = { 7.106199860572815E-01,-3.465899825096130E-02, 0., poids1};
Point(29)  = { 6.946499943733215E-01,-3.623199835419655E-02, 0., poids1};
Point(30)  = { 6.787599921226501E-01,-3.776200115680695E-02, 0., poids1};
Point(31)  = { 6.629499793052673E-01,-3.924899920821190E-02, 0., poids1};
Point(32)  = { 6.472100019454956E-01,-4.069200158119202E-02, 0., poids1};
Point(33)  = { 6.315400004386902E-01,-4.209100082516670E-02, 0., poids1};
Point(34)  = { 6.159300208091736E-01,-4.344699904322624E-02, 0., poids1};
Point(35)  = { 6.003900170326233E-01,-4.475900158286095E-02, 0., poids1};
Point(36)  = { 5.849099755287170E-01,-4.602500051259995E-02, 0., poids1};
Point(37)  = { 5.694800019264221E-01,-4.724600166082382E-02, 0., poids1};
Point(38)  = { 5.541099905967712E-01,-4.842000082135201E-02, 0., poids1};
Point(39)  = { 5.387799739837646E-01,-4.954700171947479E-02, 0., poids1};
Point(40)  = { 5.235000252723694E-01,-5.062500014901161E-02, 0., poids1};
Point(41)  = { 5.082700252532959E-01,-5.165300145745277E-02, 0., poids1};
Point(42)  = { 4.930700063705444E-01,-5.262900143861771E-02, 0., poids1};
Point(43)  = { 4.778999984264374E-01,-5.355200171470642E-02, 0., poids1};
Point(44)  = { 4.627699851989746E-01,-5.441899970173836E-02, 0., poids1};
Point(45)  = { 4.476700127124786E-01,-5.522900074720383E-02, 0., poids1};
Point(46)  = { 4.325900077819824E-01,-5.597800016403198E-02, 0., poids1};
Point(47)  = { 4.175300002098083E-01,-5.666499957442284E-02, 0., poids1};
Point(48)  = { 4.024899899959564E-01,-5.728600174188614E-02, 0., poids1};
Point(49)  = { 3.874700069427490E-01,-5.783800035715103E-02, 0., poids1};
Point(50)  = { 3.724600076675415E-01,-5.831800028681755E-02, 0., poids1};
Point(51)  = { 3.574599921703339E-01,-5.872299894690514E-02, 0., poids1};
Point(52)  = { 3.424600064754486E-01,-5.904699862003326E-02, 0., poids1};
Point(53)  = { 3.274700045585632E-01,-5.928599834442139E-02, 0., poids1};
Point(54)  = { 3.124699890613556E-01,-5.943400040268898E-02, 0., poids1};
Point(55)  = { 2.974700033664703E-01,-5.948600172996521E-02, 0., poids1};
Point(56)  = { 2.824699878692627E-01,-5.943600088357925E-02, 0., poids1};
Point(57)  = { 2.674500048160553E-01,-5.927500128746033E-02, 0., poids1};
Point(58)  = { 2.524299919605255E-01,-5.899700149893761E-02, 0., poids1};
Point(59)  = { 2.373899966478348E-01,-5.859300121665001E-02, 0., poids1};
Point(60)  = { 2.223400026559830E-01,-5.804999917745590E-02, 0., poids1};
Point(61)  = { 2.072599977254868E-01,-5.735800042748451E-02, 0., poids1};
Point(62)  = { 1.921699941158295E-01,-5.650499835610390E-02, 0., poids1};
Point(63)  = { 1.770599931478500E-01,-5.547099933028221E-02, 0., poids1};
Point(64)  = { 1.619299948215485E-01,-5.423900112509727E-02, 0., poids1};
Point(65)  = { 1.467899978160858E-01,-5.278500169515610E-02, 0., poids1};
Point(66)  = { 1.322900056838989E-01,-5.116200074553490E-02, 0., poids1};
Point(67)  = { 1.190399974584579E-01,-4.945399984717369E-02, 0., poids1};
Point(68)  = { 1.069300025701523E-01,-4.768000170588493E-02, 0., poids1};
Point(69)  = { 9.586799889802933E-02,-4.585599899291992E-02, 0., poids1};
Point(70)  = { 8.577000349760056E-02,-4.399599879980087E-02, 0., poids1};
Point(71)  = { 7.655599713325500E-02,-4.211099818348885E-02, 0., poids1};
Point(72)  = { 6.815300136804581E-02,-4.021200165152550E-02, 0., poids1};
Point(73)  = { 6.049599871039391E-02,-3.830600157380104E-02, 0., poids1};
Point(74)  = { 5.352399870753288E-02,-3.640000149607658E-02, 0., poids1};
Point(75)  = { 4.718200117349625E-02,-3.449999913573265E-02, 0., poids1};
Point(76)  = { 4.142000153660774E-02,-3.260999917984009E-02, 0., poids1};
Point(77)  = { 3.619199991226196E-02,-3.073300048708916E-02, 0., poids1};
Point(78)  = { 3.145699948072433E-02,-2.887200005352497E-02, 0., poids1};
Point(79)  = { 2.717700041830540E-02,-2.702900022268295E-02, 0., poids1};
Point(80)  = { 2.331699989736080E-02,-2.520499937236309E-02, 0., poids1};
Point(81)  = { 1.984800025820732E-02,-2.340300008654594E-02, 0., poids1};
Point(82)  = { 1.673999987542629E-02,-2.162200026214123E-02, 0., poids1};
Point(83)  = { 1.396999973803759E-02,-1.986500062048435E-02, 0., poids1};
Point(84)  = { 1.151499990373850E-02,-1.813299953937531E-02, 0., poids1};
Point(85)  = { 9.355300106108189E-03,-1.642799936234951E-02, 0., poids1};
Point(86)  = { 7.471399847418070E-03,-1.475299987941980E-02, 0., poids1};
Point(87)  = { 5.847000051289797E-03,-1.311200018972158E-02, 0., poids1};
Point(88)  = { 4.466100130230188E-03,-1.151099987328053E-02, 0., poids1};
Point(89)  = { 3.312600078061223E-03,-9.954700246453285E-03, 0., poids1};
Point(90)  = { 2.369200112298131E-03,-8.452000096440315E-03, 0., poids1};
Point(91)  = { 1.617899979464710E-03,-7.011000066995621E-03, 0., poids1};
Point(92)  = { 1.039199996739626E-03,-5.639600101858377E-03, 0., poids1};
Point(93)  = { 6.129799876362085E-04,-4.344400018453598E-03, 0., poids1};
Point(94)  = { 3.168400144204497E-04,-3.131099976599216E-03, 0., poids1};
Point(95)  = { 1.291899970965460E-04,-2.002600114792585E-03, 0., poids1};
Point(96)  = { 2.965000021504238E-05,-9.594199946150184E-04, 0., poids1};
Point(97)  = { 0.000000000000000E+00, 0.000000000000000E+00, 0., poids1};
Point(98)  = { 2.965000021504238E-05, 9.594199946150184E-04, 0., poids1};
Point(99)  = { 1.291899970965460E-04, 2.002600114792585E-03, 0., poids1};
Point(100) = { 3.168400144204497E-04, 3.131099976599216E-03, 0., poids1};
Point(101) = { 6.129799876362085E-04, 4.344400018453598E-03, 0., poids1};
Point(102) = { 1.039199996739626E-03, 5.639600101858377E-03, 0., poids1};
Point(103) = { 1.617899979464710E-03, 7.011000066995621E-03, 0., poids1};
Point(104) = { 2.369200112298131E-03, 8.452000096440315E-03, 0., poids1};
Point(105) = { 3.312600078061223E-03, 9.954700246453285E-03, 0., poids1};
Point(106) = { 4.466100130230188E-03, 1.151099987328053E-02, 0., poids1};
Point(107) = { 5.847000051289797E-03, 1.311200018972158E-02, 0., poids1};
Point(108) = { 7.471399847418070E-03, 1.475299987941980E-02, 0., poids1};
Point(109) = { 9.355300106108189E-03, 1.642799936234951E-02, 0., poids1};
Point(110) = { 1.151499990373850E-02, 1.813299953937531E-02, 0., poids1};
Point(111) = { 1.396999973803759E-02, 1.986500062048435E-02, 0., poids1};
Point(112) = { 1.673999987542629E-02, 2.162200026214123E-02, 0., poids1};
Point(113) = { 1.984800025820732E-02, 2.340300008654594E-02, 0., poids1};
Point(114) = { 2.331699989736080E-02, 2.520499937236309E-02, 0., poids1};
Point(115) = { 2.717700041830540E-02, 2.702900022268295E-02, 0., poids1};
Point(116) = { 3.145699948072433E-02, 2.887200005352497E-02, 0., poids1};
Point(117) = { 3.619199991226196E-02, 3.073300048708916E-02, 0., poids1};
Point(118) = { 4.142000153660774E-02, 3.260999917984009E-02, 0., poids1};
Point(119) = { 4.718200117349625E-02, 3.449999913573265E-02, 0., poids1};
Point(120) = { 5.352399870753288E-02, 3.640000149607658E-02, 0., poids1};
Point(121) = { 6.049599871039391E-02, 3.830600157380104E-02, 0., poids1};
Point(122) = { 6.815300136804581E-02, 4.021200165152550E-02, 0., poids1};
Point(123) = { 7.655599713325500E-02, 4.211099818348885E-02, 0., poids1};
Point(124) = { 8.577000349760056E-02, 4.399599879980087E-02, 0., poids1};
Point(125) = { 9.586799889802933E-02, 4.585599899291992E-02, 0., poids1};
Point(126) = { 1.069300025701523E-01, 4.768000170588493E-02, 0., poids1};
Point(127) = { 1.190399974584579E-01, 4.945399984717369E-02, 0., poids1};
Point(128) = { 1.322900056838989E-01, 5.116200074553490E-02, 0., poids1};
Point(129) = { 1.467899978160858E-01, 5.278500169515610E-02, 0., poids1};
Point(130) = { 1.619299948215485E-01, 5.423900112509727E-02, 0., poids1};
Point(131) = { 1.770599931478500E-01, 5.547099933028221E-02, 0., poids1};
Point(132) = { 1.921699941158295E-01, 5.650499835610390E-02, 0., poids1};
Point(133) = { 2.072599977254868E-01, 5.735800042748451E-02, 0., poids1};
Point(134) = { 2.223400026559830E-01, 5.804999917745590E-02, 0., poids1};
Point(135) = { 2.373899966478348E-01, 5.859300121665001E-02, 0., poids1};
Point(136) = { 2.524299919605255E-01, 5.899700149893761E-02, 0., poids1};
Point(137) = { 2.674500048160553E-01, 5.927500128746033E-02, 0., poids1};
Point(138) = { 2.824699878692627E-01, 5.943600088357925E-02, 0., poids1};
Point(139) = { 2.974700033664703E-01, 5.948600172996521E-02, 0., poids1};
Point(140) = { 3.124699890613556E-01, 5.943400040268898E-02, 0., poids1};
Point(141) = { 3.274700045585632E-01, 5.928599834442139E-02, 0., poids1};
Point(142) = { 3.424600064754486E-01, 5.904699862003326E-02, 0., poids1};
Point(143) = { 3.574599921703339E-01, 5.872299894690514E-02, 0., poids1};
Point(144) = { 3.724600076675415E-01, 5.831800028681755E-02, 0., poids1};
Point(145) = { 3.874700069427490E-01, 5.783800035715103E-02, 0., poids1};
Point(146) = { 4.024899899959564E-01, 5.728600174188614E-02, 0., poids1};
Point(147) = { 4.175300002098083E-01, 5.666499957442284E-02, 0., poids1};
Point(148) = { 4.325900077819824E-01, 5.597800016403198E-02, 0., poids1};
Point(149) = { 4.476700127124786E-01, 5.522900074720383E-02, 0., poids1};
Point(150) = { 4.627699851989746E-01, 5.441899970173836E-02, 0., poids1};
Point(151) = { 4.778999984264374E-01, 5.355200171470642E-02, 0., poids1};
Point(152) = { 4.930700063705444E-01, 5.262900143861771E-02, 0., poids1};
Point(153) = { 5.082700252532959E-01, 5.165300145745277E-02, 0., poids1};
Point(154) = { 5.235000252723694E-01, 5.062500014901161E-02, 0., poids1};
Point(155) = { 5.387799739837646E-01, 4.954700171947479E-02, 0., poids1};
Point(156) = { 5.541099905967712E-01, 4.842000082135201E-02, 0., poids1};
Point(157) = { 5.694800019264221E-01, 4.724600166082382E-02, 0., poids1};
Point(158) = { 5.849099755287170E-01, 4.602500051259995E-02, 0., poids1};
Point(159) = { 6.003900170326233E-01, 4.475900158286095E-02, 0., poids1};
Point(160) = { 6.159300208091736E-01, 4.344699904322624E-02, 0., poids1};
Point(161) = { 6.315400004386902E-01, 4.209100082516670E-02, 0., poids1};
Point(162) = { 6.472100019454956E-01, 4.069200158119202E-02, 0., poids1};
Point(163) = { 6.629499793052673E-01, 3.924899920821190E-02, 0., poids1};
Point(164) = { 6.787599921226501E-01, 3.776200115680695E-02, 0., poids1};
Point(165) = { 6.946499943733215E-01, 3.623199835419655E-02, 0., poids1};
Point(166) = { 7.106199860572815E-01, 3.465899825096130E-02, 0., poids1};
Point(167) = { 7.266700267791748E-01, 3.304199874401093E-02, 0., poids1};
Point(168) = { 7.428100109100342E-01, 3.138099983334541E-02, 0., poids1};
Point(169) = { 7.590299844741821E-01, 2.967499941587448E-02, 0., poids1};
Point(170) = { 7.753499746322632E-01, 2.792399935424328E-02, 0., poids1};
Point(171) = { 7.917699813842773E-01, 2.612599916756153E-02, 0., poids1};
Point(172) = { 8.082900047302246E-01, 2.428100071847439E-02, 0., poids1};
Point(173) = { 8.249099850654602E-01, 2.238800004124641E-02, 0., poids1};
Point(174) = { 8.416299819946289E-01, 2.044299989938736E-02, 0., poids1};
Point(175) = { 8.584600090980530E-01, 1.844800077378750E-02, 0., poids1};
Point(176) = { 8.745399713516235E-01, 1.650499925017357E-02, 0., poids1};
Point(177) = { 8.890900015830994E-01, 1.471399981528521E-02, 0., poids1};
Point(178) = { 9.022700190544128E-01, 1.306699961423874E-02, 0., poids1};
Point(179) = { 9.142000079154968E-01, 1.155200041830540E-02, 0., poids1};
Point(180) = { 9.250000119209290E-01, 1.016299985349178E-02, 0., poids1};
Point(181) = { 9.347800016403198E-01, 8.889400400221348E-03, 0., poids1};
Point(182) = { 9.436399936676025E-01, 7.723500020802021E-03, 0., poids1};
Point(183) = { 9.516599774360657E-01, 6.657199934124947E-03, 0., poids1};
Point(184) = { 9.589200019836426E-01, 5.682699847966433E-03, 0., poids1};
Point(185) = { 9.654899835586548E-01, 4.792999941855669E-03, 0., poids1};
Point(186) = { 9.714400172233582E-01, 3.981099929660559E-03, 0., poids1};
Point(187) = { 9.768300056457520E-01, 3.240799997001886E-03, 0., poids1};
Point(188) = { 9.817100167274475E-01, 2.566199982538819E-03, 0., poids1};
Point(189) = { 9.861299991607666E-01, 1.951699960045516E-03, 0., poids1};
Point(190) = { 9.901300072669983E-01, 1.392400008626282E-03, 0., poids1};
Point(191) = { 9.937499761581421E-01, 8.835400221869349E-04, 0., poids1};
Point(192) = { 9.970300197601318E-01, 4.207300080452114E-04, 0., poids1};

Spline(500) = {
  1,  2,  3,  4,  5,  6,  7,  8,
  9, 10, 11, 12, 13, 14, 15, 16,
 17, 18, 19, 20, 21, 22, 23, 24,
 25, 26, 27, 28, 29, 30, 31, 32,
 33, 34, 35, 36, 37, 38, 39, 40,
 41, 42};

Spline(501) = {
 42, 43, 44, 45, 46, 47, 48, 49,
 50, 51, 52, 53, 54, 55, 56, 57,
 58, 59, 60, 61, 62, 63, 64, 65,
 66, 67, 68, 69, 70, 71, 72, 73,
 74, 75, 76, 77, 78, 79, 80, 81,
 82, 83, 84, 85, 86, 87, 88, 89,
 90, 91, 92, 93, 94, 95, 96, 97};
 
Spline(502) = {
 97, 98, 99,100,101,102,103,104,
105,106,107,108,109,110,111,112,
113,114,115,116,117,118,119,120,
121,122,123,124,125,126,127,128,
129,130,131,132,133,134,135,136,
137,138,139,140,141,142,143,144,
145,146,147,148,149,150,151,152};

Spline(503) = {
152,
153,154,155,156,157,158,159,160,
161,162,163,164,165,166,167,168,
169,170,171,172,173,174,175,176,
177,178,179,180,181,182,183,184,
185,186,187,188,189,190,191,192,
1};



///////////////////////
// External boundary //
///////////////////////

Point(193) = {   0.00000E+00,  10.00000E+00, 0., poids2}; 
Point(194) = {   0.00000E+00, -10.00000E+00, 0., poids2};
Point(195) = {  10.00000E+00, -10.00000E+00, 0., poids2};
Point(196) = {  10.00000E+00,  10.00000E+00, 0., poids2}; 
Point(197) = {  10.00000E+00,   0.00000E+00, 0., poids2}; 

Circle(300) = {193,97,194}; // Circle //
Line(101)   = {194,195};    // Bottom //
Line(102)   = {195,197};    // Right Bottom //
Line(103)   = {197,196};    // Right Top    //
Line(104)   = {196,193};    // Top    //



///////////////////////
// Middle boundary   //
///////////////////////

Point(210) = {   0.00000E+00,   5.00000E+00, 0., poids2}; 
Point(211) = {   0.00000E+00, - 5.00000E+00, 0., poids2}; 
Point(212) = {   5.00000E+00, - 5.00000E+00, 0., poids2}; 
Point(213) = {   5.00000E+00,   5.00000E+00, 0., poids2}; 
Point(214) = {   5.00000E+00,   0.00000E+00, 0., poids2}; 

Circle(301) = {210,97,211}; // Circle //
Line(106)   = {211,212};    // Bottom //
Line(107)   = {212,214};    // Right Bottom //
Line(108)   = {214,213};    // Right Top    //
Line(109)   = {213,210};    // Top    //



///////////////////////
//   Ligne de Fuite  //
///////////////////////

Point(200) = {   1.20000E+00,   0.00000E+00, 0., poids1};
Point(201) = {   2.00000E+00,   0.00000E+00, 0., poids1};
Point(202) = {   3.00000E+00,   0.00000E+00, 0., poids1};

Line(111) = {  1,200};
Line(112) = {200,201};
Line(113) = {201,202};
Line(114) = {202,214};
Line(115) = {214,197};



/////////////////////////
// Mesh Specifications //
/////////////////////////

Line Loop(200) = {500,501,502,503}; // NACA              //
Line Loop(201) = {500,501,502,503,111,112,113,114,108,109,301,106,107,-114,-113,-112,-111}; // Middle boundary   //
Line Loop(202) = {115,-102,-101,-300,-104,-103,-115,108,109,301,106,107}; // External boundary //

Plane Surface(1000) = {201};
Plane Surface(1001) = {202};



///////////////////////
// Post-Processing   //
///////////////////////


// Consequently, two punctual elements will be saved in the output
// mesh file, both with the region number 1. The mechanism is
// identical for line or surface elements:

MyNaca = 599;
Physical Line(MyNaca) = {500,501,502,503};
MyExterior = 598;
Physical Line(MyExterior)= {-102,-101,-300,-104,-103};
MySurfaceOrder2 = 1998;
Physical Surface(MySurfaceOrder2) = {1000} ;
MySurfaceOrder1 = 1999;
Physical Surface(MySurfaceOrder1) = {1001} ;


Mesh.NbTriangles = 1 ;
