Hi there!
I’m trying to model some cylinders thanks to FreeFem++. I did following:
0/ Define some constant values
1/ Define borders
border S1(parametre=0,2pi){ x=rinfinicos(parametre); y=rinfinisin(parametre); label=FirstBorder;}
border S2(parametre=0,2pi){ x=rbcos(parametre); y=rbsin(parametre); label=SecondBorder; }
2/ Mesh 2D
mesh Thdeuxdim=buildmesh( S1(maillage)+S2(maillage) )
3/ Apply buildlayers
mesh3 Th=buildlayers(Thdeuxdim, nombreextrusions, zbound=[fond,surface]);
fespace Vh(Th,P03d);
If I want to get the region number knowing some coordinates (x,y,z), for example (1.,2.,0.) I can do following:
Vh regions=region;
int labelcylindre=regions(1., 2., 0.)
labelcylindre is an integer with the number of a cylinder.
Now, I’d like to apply a boundary condition on a face of the cylinder, let’s say the bottom face z=fond.
Is there a similar method to get the number of the face ? Maybe something like following?
Vh faces=border;
int labelface=faces(1.,2.,fond)
Thank you for your help, have a good evening!
Xavier