/usr/share/doc/freefem++/examples/examples++-load/thresholdings.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 | load "thresholdings"
mesh Th = square(2,2);
fespace Xh(Th,P1);
Xh u,v;
macro grad(u)[dx(u),dy(u)] // EOM
func f=1;
varf Lapl(u,v) = int2d(Th)( grad(u)'*grad(v) ) + int2d(Th)( f*v ); // ' for emacs
matrix M=Lapl(Xh,Xh);
cout << M << endl;
M.thresholding(0.7);// remove all term less then 0.7
cout << M << endl;
|