// halfmodel.geo
// PARAMS: 
// 1. R1: inner sphere radius
// 2. R2: outer sphere radius
// ---------------------------------------------
//
Mesh.CharacteristicLengthExtendFromBoundary = 0;
Mesh.CharacteristicLengthFromPoints = 0;
Mesh.CharacteristicLengthFromCurvature = 0;
Mesh.CharacteristicLengthMax = helem;
//
R1 = 1.0;
R2 = 2.0;
//
x0=0;
y0=0;
z0=0;
//
Point(10001) = {x0, y0, z0, 1.0};
Point(10002) = {x0+R1, y0, z0, 1.0};
Point(10003) = {x0, y0+R1, z0, 1.0};
Point(10004) = {x0, y0, z0+R1, 1.0};
Point(10006) = {x0, y0-R1, z0, 1.0};
Point(10007) = {x0, y0, z0-R1, 1.0};

Circle(10002) = {10002, 10001, 10003};
Circle(10003) = {10002, 10001, 10004};
Circle(10004) = {10003, 10001, 10004};
Circle(10007) = {10002, 10001, 10006};
Circle(10008) = {10006, 10001, 10004};
Circle(10009) = {10007, 10001, 10002};
Circle(10010) = {10007, 10001, 10003};
Circle(10012) = {10007, 10001, 10006};

Line Loop(20015) = {10002, 10004, -10003};
Ruled Surface(20015) = {20015};
Line Loop(20017) = {-10009, 10010, -10002};
Ruled Surface(20017) = {20017};
Line Loop(20019) = {10009, 10007, -10012};
Ruled Surface(20019) = {20019};
Line Loop(20021) = {10003, -10008, -10007};
Ruled Surface(20021) = {20021};




Point(20002) = {x0+R2, y0, z0, 1.0};
Point(20003) = {x0, y0+R2, z0, 1.0};
Point(20004) = {x0, y0, z0+R2, 1.0};
Point(20006) = {x0, y0-R2, z0, 1.0};
Point(20007) = {x0, y0, z0-R2, 1.0};

Circle(20002) = {20002, 10001, 20003};
Circle(20003) = {20002, 10001, 20004};
Circle(20004) = {20003, 10001, 20004};
Circle(20007) = {20002, 10001, 20006};
Circle(20008) = {20006, 10001, 20004};
Circle(20009) = {20007, 10001, 20002};
Circle(20010) = {20007, 10001, 20003};
Circle(20012) = {20007, 10001, 20006};

Line Loop(30015) = {20002, 20004, -20003};
Ruled Surface(30015) = {30015};
Line Loop(30017) = {-20009, 20010, -20002};
Ruled Surface(30017) = {30017};
Line Loop(30019) = {20009, 20007, -20012};
Ruled Surface(30019) = {30019};
Line Loop(30021) = {20003, -20008, -20007};
Ruled Surface(30021) = {30021};
//+
Line Loop(30022) = {20010, 20004, -20008, -20012};
//+
Line Loop(30023) = {10010, 10004, -10008, -10012};
//+
Plane Surface(30022) = {30022, 30023};
//+
Surface Loop(1) = {30015, 30017, 30019, 30021, 30022, 20019, 20017, 20015, 20021};
//+
Volume(1) = {1};
//+
Physical Point("all_pts") = {20004, 10004, 20003, 10003, 10001, 10006, 10002, 20006, 20002, 10007, 20007};
//+
Physical Line("all_lines") = {20004, 20008, 20003, 10004, 10008, 10003, 10002, 20002, 10007, 10010, 20007, 10012, 10009, 20010, 20012, 20009};
//+
Physical Surface("outer") = {30017, 30015, 30019, 30021};
//+
Physical Surface("inner") = {20017, 20015, 20021, 20019};
//+
Physical Surface("slicing_plane") = {30022};
//+
Physical Volume("air") = {1};
//+
Physical Surface("all_srf") = {30021, 30015, 20021, 20015, 30022, 20019, 20017, 30019, 30017};
