How to define the label of boundary(3D cylinder with hole)

Hi,

I have question towards 3d mesh.
I want to build a mesh of 3d cylinder with a hole. So I build a 2d mesh of the circle with a hole first and then use buildlayers() to expand it to 3d.

how to define the label of boundary?

Here is my code.

load “msh3”
load “medit”
load “tetgen”
//--------------------------------------------------------------------
//Builds a mesh on 3d cylinder with a hole.
real cx1 = 0.0;
real cy1 = 0.0;
real r1 = 1.0;
real cx2 = 0.5;
real cy2 = 0.0;
real r2 = 0.1;
real zmin=0,zmax=1;
int[int] rup=[0,1], rdown=[0,2], rmid=[1,3];
border C1(t1=0,2pi){x=cx1+r1cos(t1);y=cy1+r1sin(t1);};
border C2(t1=0,2
pi){x=cx2+r2cos(t1);y=cy2+r2sin(t1);};

int m=5;
mesh Thcercle = buildmesh(C1(4*m)+C2(-m));
//plot(Thcercle,wait =1);

mesh3 ThF=buildlayers(Thcercle,
4*m,
zbound=[zmin,zmax],
labelmid=rmid,
labelup = rup,
labeldown = rdown);

hello
I have the same question as you.Have you solved this question?

a solution: put label 3 on circle C1 and label 4 on circle C2.

cyl-hole.edp (655 Bytes)

Thank you.But I got more questions.
1.Why the label of C2 is 4,I don’t see the label of C2 defined in rmid.
2.In my understanding, the label on the upper surface is 1 and the label on the lower surface is 2,is my understanding correct?

rmid=[1,3,2,4];
border C1(t1=0,2*pi){x=cx1+r1*cos(t1);y=cy1+r1*sin(t1);label=1;};
border C2(t1=0,2*pi){x=cx2+r2*cos(t1);y=cy2+r2*sin(t1);;label=2;};

in array mid say 1 become 3 and 2 become 4. on vertical face of the 3d object.
See page 140 of the documentation. on The command buildlayers

Thank you very much.I got it.