/usr/share/doc/freefem-examples/validsys.pde is in freefem-examples 3.5.8-5ubuntu1.
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 41 42 43 44 | changewait;
ns:=40;
border(1,0,2*pi,2*ns) begin x:= 3*cos(t); y:= 2*sin(t); end;
border(2,0,2*pi,ns) begin x:= cos(-t); y:= sin(-t); end;
buildmesh(ns*ns);
ue= sin(x+y);
ve = ue;
p = ue;
nx = -x;
ny =- y;
dxue = cos(x+y);
c = 0.2;
a1 = y;
a2 =x;
nu = 1;
nu11 = 1;
nu22 = 2;
nu21 =0.3;
nu12 =0.4;
b=1;
dnuue=dxue*(nu*(nx+ny) +
(nu11 + nu12)*nx + (nu21+ nu22)*ny);
g = ue*c+dnuue;
f = b*ue+dxue*(a1+a2) +ue*(2*nu+nu11+nu12+nu21+nu22);
solve(u,v) begin
onbdy(1) u = p;
onbdy(1) v = p;
onbdy(2)
id(u)*c/2 + id(v)*c/2 + dnu(u) = g;
onbdy(2) id(v)*c + dnu(v) = g;
pde(u) id(u)*b + dx(u)*a1 + dy(u)*a2
-laplace(u)*nu - dxx(u)*nu11 - dxy(u)*nu12 - dyx(u)*nu21 - dyy(u)*nu22 =f;
pde(v) id(v)*b/2+id(u)*b/2
+ dx(v)*a1 + dy(v)*a2 -laplace(v)*nu
- dxx(v)*nu11 - dxy(v)*nu12 -
dyx(v)*nu21 - dyy(v)*nu22 =f;
end;
plot(abs(u-ue) + abs(v-ve));
|