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,2*pi){x=cx1+r1*cos(t1);y=cy1+r1*sin(t1);};
border C2(t1=0,2*pi){x=cx2+r2

*cos(t1);y=cy2+r2*sin(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);