// Define points
p0 = newp; Point(p0) = {-2.0, -1.0, 0.0, 0.5 };
p1 = newp; Point(p1) = {1.0, -1.0, 0.0, 0.5 };
p2 = newp; Point(p2) = {1.0, 1.0, 0.0, 0.5 };
p3 = newp; Point(p3) = {-2.0, 1.0, 0.0, 0.5 };
p4 = newp; Point(p4) = {-1.0, 0.0, -1.0, 0.5 };
p5 = newp; Point(p5) = {1.0, 0.0, -1.0, 0.5 };
p6 = newp; Point(p6) = {1.0, 0.0, 1.0, 0.5 };
p7 = newp; Point(p7) = {-1.0, 0.0, 1.0, 0.5 };
p8 = newp; Point(p8) = {0.0, -1.0, 1.0, 0.5 };
p9 = newp; Point(p9) = {0.0, -1.0, -1.0, 0.5 };
p10 = newp; Point(p10) = {0.0, 1.0, -1.0, 0.5 };
p11 = newp; Point(p11) = {0.0, 1.0, 1.0, 0.5 };
p12 = newp; Point(p12) = {1.0, 0.0, 0.0, 0.5 };
p13 = newp; Point(p13) = {-1.0, 0.0, 0.0, 0.5 };
p14 = newp; Point(p14) = {0.0, -1.0, 0.0, 0.5 };
p15 = newp; Point(p15) = {0.0, 1.0, 0.0, 0.5 };
p16 = newp; Point(p16) = {0.0, 0, -1.0, 0.5 };
p17 = newp; Point(p17) = {0.0, 0, 1.0, 0.5 };
p18 = newp; Point(p18) = {0.0, 0.0, 0.0, 0.5 };
// End of point specification

// Define lines 
frac_line_0= newl; Line(frac_line_0) = {p0, p3};
Physical Line("FRACTURE_TIP_0") = {frac_line_0};

frac_line_1= newl; Line(frac_line_1) = {p0, p14};
Physical Line("FRACTURE_TIP_1") = {frac_line_1};

frac_line_2= newl; Line(frac_line_2) = {p1, p12};
Physical Line("FRACTURE_TIP_2") = {frac_line_2};

frac_line_3= newl; Line(frac_line_3) = {p1, p14};
Physical Line("FRACTURE_TIP_3") = {frac_line_3};

frac_line_4= newl; Line(frac_line_4) = {p2, p12};
Physical Line("FRACTURE_TIP_4") = {frac_line_4};

frac_line_5= newl; Line(frac_line_5) = {p2, p15};
Physical Line("FRACTURE_TIP_5") = {frac_line_5};

frac_line_6= newl; Line(frac_line_6) = {p3, p15};
Physical Line("FRACTURE_TIP_6") = {frac_line_6};

frac_line_7= newl; Line(frac_line_7) = {p4, p13};
Physical Line("FRACTURE_TIP_7") = {frac_line_7};

frac_line_8= newl; Line(frac_line_8) = {p4, p16};
Physical Line("FRACTURE_TIP_8") = {frac_line_8};

frac_line_9= newl; Line(frac_line_9) = {p5, p12};
Physical Line("FRACTURE_TIP_9") = {frac_line_9};

frac_line_10= newl; Line(frac_line_10) = {p5, p16};
Physical Line("FRACTURE_TIP_10") = {frac_line_10};

frac_line_11= newl; Line(frac_line_11) = {p6, p12};
Physical Line("FRACTURE_TIP_11") = {frac_line_11};

frac_line_12= newl; Line(frac_line_12) = {p6, p17};
Physical Line("FRACTURE_TIP_12") = {frac_line_12};

frac_line_13= newl; Line(frac_line_13) = {p7, p13};
Physical Line("FRACTURE_TIP_13") = {frac_line_13};

frac_line_14= newl; Line(frac_line_14) = {p7, p17};
Physical Line("FRACTURE_TIP_14") = {frac_line_14};

frac_line_15= newl; Line(frac_line_15) = {p8, p14};
Physical Line("FRACTURE_TIP_15") = {frac_line_15};

frac_line_16= newl; Line(frac_line_16) = {p8, p17};
Physical Line("FRACTURE_TIP_16") = {frac_line_16};

frac_line_17= newl; Line(frac_line_17) = {p9, p14};
Physical Line("FRACTURE_TIP_17") = {frac_line_17};

frac_line_18= newl; Line(frac_line_18) = {p9, p16};
Physical Line("FRACTURE_TIP_18") = {frac_line_18};

frac_line_19= newl; Line(frac_line_19) = {p10, p15};
Physical Line("FRACTURE_TIP_19") = {frac_line_19};

frac_line_20= newl; Line(frac_line_20) = {p10, p16};
Physical Line("FRACTURE_TIP_20") = {frac_line_20};

frac_line_21= newl; Line(frac_line_21) = {p11, p15};
Physical Line("FRACTURE_TIP_21") = {frac_line_21};

frac_line_22= newl; Line(frac_line_22) = {p11, p17};
Physical Line("FRACTURE_TIP_22") = {frac_line_22};

frac_line_23= newl; Line(frac_line_23) = {p12, p18};
Physical Line("FRACTURE_LINE_23") = {frac_line_23};

frac_line_24= newl; Line(frac_line_24) = {p13, p18};
Physical Line("FRACTURE_LINE_24") = {frac_line_24};

frac_line_25= newl; Line(frac_line_25) = {p14, p18};
Physical Line("FRACTURE_LINE_25") = {frac_line_25};

frac_line_26= newl; Line(frac_line_26) = {p15, p18};
Physical Line("FRACTURE_LINE_26") = {frac_line_26};

frac_line_27= newl; Line(frac_line_27) = {p16, p18};
Physical Line("FRACTURE_LINE_27") = {frac_line_27};

frac_line_28= newl; Line(frac_line_28) = {p17, p18};
Physical Line("FRACTURE_LINE_28") = {frac_line_28};

// End of line specification 

// Start fracture specification
frac_loop_0 = newll; 
Line Loop(frac_loop_0) = { frac_line_0, frac_line_6, -frac_line_5, frac_line_4, -frac_line_2, frac_line_3, -frac_line_1};
fracture_0 = news; Plane Surface(fracture_0) = {frac_loop_0};
Physical Surface("FRACTURE_0") = {fracture_0};
Line{frac_line_23} In Surface{fracture_0};
Line{frac_line_24} In Surface{fracture_0};
Line{frac_line_25} In Surface{fracture_0};
Line{frac_line_26} In Surface{fracture_0};

frac_loop_1 = newll; 
Line Loop(frac_loop_1) = { frac_line_7, -frac_line_13, frac_line_14, -frac_line_12, frac_line_11, -frac_line_9, frac_line_10, -frac_line_8};
fracture_1 = news; Plane Surface(fracture_1) = {frac_loop_1};
Physical Surface("FRACTURE_1") = {fracture_1};
Line{frac_line_23} In Surface{fracture_1};
Line{frac_line_24} In Surface{fracture_1};
Line{frac_line_27} In Surface{fracture_1};
Line{frac_line_28} In Surface{fracture_1};

frac_loop_2 = newll; 
Line Loop(frac_loop_2) = { frac_line_15, -frac_line_17, frac_line_18, -frac_line_20, frac_line_19, -frac_line_21, frac_line_22, -frac_line_16};
fracture_2 = news; Plane Surface(fracture_2) = {frac_loop_2};
Physical Surface("FRACTURE_2") = {fracture_2};
Line{frac_line_25} In Surface{fracture_2};
Line{frac_line_26} In Surface{fracture_2};
Line{frac_line_27} In Surface{fracture_2};
Line{frac_line_28} In Surface{fracture_2};


// Start physical point specification
Physical Point("FRACTURE_POINT_0") = {p18};
// End of physical point specification

