/usr/share/doc/freefem++/examples/examples++-3d/TruncLac.edp is in freefem++-doc 3.19.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | load "msh3"
load "medit"
int nn=10;
border cc(t=0,2*pi){x=cos(t);y=sin(t);label=1;}
mesh Th2= buildmesh(cc(100));
fespace Vh2(Th2,P2);
Vh2 ux,uz,p2;
int[int] rup=[0,2], rdown=[0,1], rmid=[1,1,2,1,3,1,4,1];
func zmin= 2-sqrt(4-(x*x+y*y));
func zmax= 2-sqrt(3.);
mesh3 Th=buildlayers(Th2,nn,
coef= max( (zmax-zmin)/zmax, 1./(nn*2) ),
zbound=[zmin,zmax],
labelmid=rmid,
reffaceup = rup,
reffacelow = rdown);
func u=x^2+y^2;
mesh3 Th3=trunc(Th,(u-0.5)>1.e-10,split=1,label=135);
medit("Lac",wait=1,Th);
medit("LacTruncated",Th3,wait=1);
|