/* --------------------------------------------------------------------------
    This is a gmsh geometry file
    Written by Lars Rindorf, 3/1 2008
   --------------------------------------------------------------------------*/


/* --------------------------------------------------------------------------*/
/* Physical parameters */
/* --------------------------------------------------------------------------*/
W = 1.1; // Width
H = 1.0; // Height

/* --------------------------------------------------------------------------*/
/* Resolution */
/* --------------------------------------------------------------------------*/
res = 0.01;  // Initialize resolution variable 

/* --------------------------------------------------------------------------*/
/* Points */
/* --------------------------------------------------------------------------*/

p1 = newp; Point(p1) = {-W/2,-H/2,0,res}; //  Lower left
p2 = newp; Point(p2) = {0,-H/2,0,res};  // Lower center
p3 = newp; Point(p3) = {W/2*0.9,-H/2,0,res};   // lower right
p4 = newp; Point(p4) = {W/2,H/2,0,res};  // Upper right
p5 = newp; Point(p5) = {0,H/2,0,res};   // Upper center
p6 = newp; Point(p6) = {-W/2,H/2,0,res};  // Upper left
w = newp; Point(w) = {0,-H/8,0,res/3};  // Wire

/* --------------------------------------------------------------------------*/
/* Line */
/* --------------------------------------------------------------------------*/
// Boundaries

// Domains
line1 = newl; Line(line1) = {p5,p6};
line2 = newl; Line(line2) = {p6,p1};
line3 = newl; Line(line3) = {p1,p2};
line4 = newl; Line(line4) = {p2,p3};
line5 = newl; Line(line5) = {p3,p4};
line6 = newl; Line(line6) = {p4,p5};

iline1 = newl; Line(iline1) = {p2,w};
iline2 = newl; Line(iline2) = {w,p5};


/* --------------------------------------------------------------------------*/
/* Inner domains */
/* --------------------------------------------------------------------------*/
// Left
loop_L = newll; Line Loop(loop_L) = {line3,iline1,iline2,line1,line2}; // Make loop
domL = news; Plane Surface(domL) = loop_L ;
// Right
loop_R = newll; Line Loop(loop_R) = {line4,line5,line6,-iline2,-iline1}; // Make loop
domR = news; Plane Surface(domR) = loop_R ;
// Combine

/* --------------------------------------------------------------------------*/
/* Physical entities */
/* --------------------------------------------------------------------------*/
Physical Surface(1001) = {domR,domL};
Physical Line(10001) = {line1,line2,line3,line4,line5,line6};
Physical Line(10003) = {iline1,iline2};
Physical Point(101) = {w};



