// Imports --------------------------------------------------------- //
Include "Test_coupe.par";

// Paramètres ------------------------------------------------------ //
Rbarre = 0.1;
Rair = 1.;
LcBarre = (Pi * Rbarre) / (2 * 10.);
LcAir = (Pi * Rair) / (2. * 10.);

// Centre ---------------------------------------------------------- //
pc = newp; Point(pc) = { 0., 0., 0., LcAir};

// Barre ----------------------------------------------------------- //
pb1 = newp; Point(pb1) = { -Rbarre/2.,  0.       , 0., LcBarre };
pb2 = newp; Point(pb2) = {  0.       , -Rbarre/2., 0., LcBarre };
pb3 = newp; Point(pb3) = {  Rbarre/2.,  0.       , 0., LcBarre };
pb4 = newp; Point(pb4) = {  0.       ,  Rbarre/2., 0., LcBarre };

lb1 = newl; Circle(lb1) = { pb1, pc, pb2 };
lb2 = newl; Circle(lb2) = { pb2, pc, pb3 };
lb3 = newl; Circle(lb3) = { pb3, pc, pb4 };
lb4 = newl; Circle(lb4) = { pb4, pc, pb1 };
llb = newll; Line Loop(llb) = {lb1, lb2, lb3, lb4};

sb = news; Plane Surface(sb) = { llb };

// Air ------------------------------------------------------------- //
pa1 = newp; Point(pa1) = { -Rair/2.,  0.     , 0., LcAir };
pa2 = newp; Point(pa2) = {  0.     , -Rair/2., 0., LcAir };
pa3 = newp; Point(pa3) = {  Rair/2.,  0.     , 0., LcAir };
pa4 = newp; Point(pa4) = {  0.     ,  Rair/2., 0., LcAir };

la1 = newl; Circle(la1) = { pa1, pc, pa2 };
la2 = newl; Circle(la2) = { pa2, pc, pa3 };
la3 = newl; Circle(la3) = { pa3, pc, pa4 };
la4 = newl; Circle(la4) = { pa4, pc, pa1 };
lla = newll; Line Loop(lla) = { la1, la2, la3, la4 };

sa = news; Plane Surface(sa) = { lla, llb };

// Coupe ----------------------------------------------------------- //
lc = newl; Line(lc) = { pa1, pb1 };

// Tags des régions physiques -------------------------------------- //
Physical Surface(DOMAINC) = { sb };
Physical Surface(DOMAINCC) = { sa };
Physical Line(SKINDOMAINC) = { lb1, lb2, lb3, lb4 };
Physical Line(CUT) = { lc };
