//---------------------
// Factory
//---------------------

//SetFactory("OpenCASCADE");

//---------------------
// Geo preferences: http://gmsh.info/doc/texinfo/gmsh.html#Geometry-options-list
//---------------------

Geometry.AutoCoherence = 2;

//---------------------
// Points
//---------------------

Point(1) = {0.0,0.0,0.0};
Physical Point(1) = {1};
Point(2) = {10.0,0.0,0.0};
Physical Point(2) = {2};
Point(3) = {0.0,0.0,0.0};
Physical Point(3) = {3};
Point(4) = {10.0,0.0,0.0};
Physical Point(4) = {4};
Point(5) = {10.0,10.0,0.0};
Physical Point(5) = {5};
Point(6) = {0.0,10.0,0.0};
Physical Point(6) = {6};
Point(7) = {0.0,0.0,-10.0};
Physical Point(7) = {7};
Point(8) = {10.0,0.0,-10.0};
Physical Point(8) = {8};
Point(9) = {10.0,10.0,-10.0};
Physical Point(9) = {9};
Point(10) = {0.0,10.0,-10.0};
Physical Point(10) = {10};
Point(11) = {5.0,-19.364916731037084,0.0};
Point(12) = {5.0,-19.364916731037084,0.0};
Point(13) = {5.0,29.364916731037084,0.0};
Point(14) = {5.0,-19.364916731037084,-10.0};
Point(15) = {5.0,29.364916731037084,-10.0};

//---------------------
// Lines
//---------------------

Circle(1) = {1,11,2};
Transfinite Line {1} = 11 Using Progression 0.8572439828530729;
Physical Line(1) = {1};
Line(2) = {4,5};
Transfinite Line {2} = 11 Using Progression 0.8572439828530729;
Physical Line(2) = {2};
Line(3) = {6,3};
Transfinite Line {3} = 11 Using Progression 1.1665290395761165;
Physical Line(3) = {3};
Line(4) = {8,9};
Transfinite Line {4} = 11 Using Progression 0.8572439828530729;
Physical Line(4) = {4};
Line(5) = {10,7};
Transfinite Line {5} = 11 Using Progression 1.1665290395761165;
Physical Line(5) = {5};
Line(6) = {3,7};
Physical Line(6) = {6};
Line(7) = {4,8};
Physical Line(7) = {7};
Line(8) = {5,9};
Physical Line(8) = {8};
Line(9) = {6,10};
Physical Line(9) = {9};
Circle(10) = {3,12,4};
Transfinite Line {10} = 11 Using Progression 0.8572439828530729;
Physical Line(10) = {10};
Circle(11) = {5,13,6};
Transfinite Line {11} = 11 Using Progression 0.8572439828530729;
Physical Line(11) = {11};
Circle(12) = {7,14,8};
Transfinite Line {12} = 11 Using Progression 0.8572439828530729;
Physical Line(12) = {12};
Circle(13) = {9,15,10};
Transfinite Line {13} = 11 Using Progression 1.1665290395761165;
Physical Line(13) = {13};

//---------------------
// Surfaces
//---------------------

Line Loop(1) = {10,2,11,3};
Surface(1) = {1};
Transfinite Surface(1) = {};
Recombine Surface(1) = 60.0;
Physical Surface(1) = {1};
Line Loop(2) = {12,4,13,5};
Surface(2) = {2};
Transfinite Surface(2) = {};
Recombine Surface(2) = 60.0;
Physical Surface(2) = {2};
Line Loop(3) = {10,7,-12,-6};
Surface(3) = {3};
Transfinite Surface(3) = {};
Recombine Surface(3) = 60.0;
Physical Surface(3) = {3};
Line Loop(4) = {2,8,-4,-7};
Surface(4) = {4};
Transfinite Surface(4) = {};
Recombine Surface(4) = 60.0;
Physical Surface(4) = {4};
Line Loop(5) = {11,9,-13,-8};
Surface(5) = {5};
Transfinite Surface(5) = {};
Recombine Surface(5) = 60.0;
Physical Surface(5) = {5};
Line Loop(6) = {-3,9,5,-6};
Surface(6) = {6};
Transfinite Surface(6) = {};
Recombine Surface(6) = 60.0;
Physical Surface(6) = {6};

//---------------------
// Volumes
//---------------------

Surface Loop(1) = {1,2,3,4,5,6};
Volume(1) = {1};
Transfinite Volume(1) = {};
Recombine Volume(1);
Physical Volume(1) = {1};

//---------------------
// Mesh preferences: http://gmsh.info/doc/texinfo/gmsh.html#Mesh-options-list
//---------------------

Mesh.Algorithm = 2; // (default)
Mesh.Algorithm3D = 2; // (default)
Mesh.RecombinationAlgorithm = 1; // (default)
Mesh.Recombine3DLevel = 0; // (default)
Mesh.SubdivisionAlgorithm = 0; // (default)
