// all meshes
Merge "e.msh";

// ellipsoid + hole
//~ Merge "e2.msh";

CreateTopology;

ll3[] = Line "*";
For j In {0 : #ll3[]-1}
  Compound Line(newl) = ll3[j];
EndFor
ss3[] = Surface "*";
s = news;
For i In {0 : #ss3[]-1}
  Compound Surface(s+i) = ss3[i];
EndFor

// all meshes
Surface Loop(1) = {s+2 : s+#ss3[]-1};
Volume(1) = {1};
Surface Loop(2) = {s, s+1, -(s+2), -(s+3)};
Volume(2) = {2};
Physical Surface(1) = {s+2 : s+#ss3[]-1};
Physical Volume(1) = 1;
Physical Surface(2) = {s, s+1, -(s+2), -(s+3)};
Physical Volume(2) = 2;

// ellipsoid + hole
//~ Surface Loop(1) = {s : s+#ss3[]-1};
//~ Volume(1) = {1};
//~ Physical Surface(1) = {s : s+#ss3[]-1};
//~ Physical Volume(1) = 1;

Mesh.CharacteristicLengthMax=1.5;
Mesh.Algorithm = 2; //2D mesh algorithm (1=MeshAdapt, 2=Automatic, 5=Delaunay, 6=Frontal, 7=bamg, 8=delquad)
Mesh.RemeshAlgorithm = 1; // (0) no split (1) automatic (2) automatic only with metis
Mesh.RemeshParametrization = 7; // (0) harmonic (1) conformal
Geometry.HideCompounds = 1; // don't hide the compound entities

Mesh.SurfaceFaces=1;
Mesh.Lines=1;