R = 1 ;
Ri = R*3/4;
//
lcyl = R/10 ;

ndelta = 10 ;
nangle = 10 ;
val_prog = 0.9 ;

//-----------------------------------------------------------
//-----------------------------------------------------------
cen = newp ;
Point(cen)  = {0, 0, 0, lcyl};

Point(newp) = {R, 0, 0, lcyl};
Point(newp) = {0, R, 0, lcyl};
Point(newp) = {-R, 0, 0, lcyl};
Point(newp) = {0, -R, 0, lcyl};
pntcout[] = {newp-4:newp-1};

Ri = .6*R ;
Point(newp) = {Ri, 0, 0, lcyl};
Point(newp) = {0, Ri, 0, lcyl};
Point(newp) = {-Ri, 0, 0, lcyl};
Point(newp) = {0, -Ri, 0, lcyl};
pntcin[] = {newp-4:newp-1};

loopCylOut[] = {};
loopCylIn[] = {};
lCyl[] = {};

For i In {0:#pntcout[]-1}
  j = (i == #pntcout[]-1) ? 0 : i+1 ;
  Circle(newl) = {pntcout[i], cen, pntcout[j]};
  loopCylOut[] += {newl-1};
  Circle(newl) = {pntcin[i], cen, pntcin[j]};
  loopCylIn[] += {newl-1};
  Line(newl) = {pntcin[i], pntcout[i]};
  lCyl[] += {newl-1};
EndFor


llcylout = newll;
Line Loop(llcylout) = {loopCylOut[]} ;
llcylin = newll;
Line Loop(llcylin) = {loopCylIn[]} ;
surfCylIn = news ;
Plane Surface(surfCylIn) = {newll-1};

Transfinite Line{lCyl[]} = ndelta Using Progression val_prog;
Transfinite Line{loopCylIn[], loopCylOut[] } = nangle ;
Transfinite Surface{surfCylIn};

For i In {0:#lCyl[]-1}
 j = (i == #lCyl[]-1) ? 0 : i+1 ;
 Line Loop(newll) = {lCyl[i],loopCylOut[i],-lCyl[j],-loopCylIn[i]} ;
 surfCylOut[i] = news ;
 Plane Surface(surfCylOut[i]) = {newll-1};
 Transfinite Surface{surfCylOut[i]};
EndFor




