// use gmsh >= 2.16.0
SetFactory("OpenCASCADE");

Point(1) = {0, 0, 0, 0.125};
Point(2) = {0, 0, 0.5, 0.125};
Cylinder(4) = {0,0,0, 0,0,0.5, 1};

// embed both centers in the surfaces
Point{1} In Surface{3};
Point{2} In Surface{2};

// mesh size
Mesh.CharacteristicLengthMin = 0.8*0.125;
Mesh.CharacteristicLengthMax = 1.2*0.125;
Mesh.CharacteristicLengthExtendFromBoundary = 0;

// optimization
Mesh.Lloyd = 1;
Mesh.HighOrderOptimize = 1;
Mesh.Optimize = 1;
Mesh.OptimizeNetgen = 1;


Physical Point("origin") = {1};
Physical Point("up") = {2};

Physical Surface("lat") = {1};
Physical Surface("sup") = {2};
Physical Surface("inf") = {3};

Physical Volume("bulk") = {4};
