/usr/share/doc/freefem++/examples/examples++-tutorial/glumesh.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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | mesh Th1=square(10,10);
mesh Th2=square(20,10,[x+1,y]);
verbosity=3;
int[int] r1=[2,18], r2=[4,0];
savemesh(Th1,"meshTh1_av.mesh");
Th1=change(Th1,refe=r1);
savemesh(Th1,"meshTh1_ap.mesh");
Th2=change(Th2,refe=r2);
mesh Th=Th1+Th2;
cout << " nb ref = " << int1d(Th1,1,3,4)(1./lenEdge)+int1d(Th2,1,2,3)(1./lenEdge)
<< " == " << int1d(Th,1,2,3,4)(1./lenEdge) <<" == " << ((10+20)+10)*2 << endl;
plot(Th,wait=1);
fespace Vh(Th,P1);
macro Grad(u) [dx(u),dy(u)]//
Vh u,v;
solve P(u,v)=int2d(Th)(Grad(u)'*Grad(v))-int2d(Th)(v)+on(1,3,u=0);
plot(u,wait=1);
{
// ---------------
real R=50.*sqrt(2.); // theta =
//un quart du paraboloide
border t1(t=0,R) {x=t;y=0; label=1;}
border t2(t=0,R) {x=(R-t);y=t;label=2;}
border t3(t=R,0) {x=0;y=t; label=3;}
int nn=3;
mesh Th= buildmesh(t1(5*nn)+t2(5*sqrt(2.)*nn)+t3(5*nn));
plot(Th,wait=0);
mesh Th4;
mesh th1=movemesh(Th,[x,-y]);
mesh th2=movemesh(Th,[-x,-y]);
mesh th3=movemesh(Th,[-x,y]);
plot(Th,th1,th2,th3,wait=1);
Th4=Th+th1+th2+th3;
plot(Th4,wait=1);
Th=Th4;
}
|