/usr/include/freefem++/idp/ExtractDofsonBorder.idp is in libfreefem++-dev 3.47+dfsg1-2build1.
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 | // Usage:
/*
extract the list of degre of freedom of 2d finite elemnt
on connect boundary given by a list of label or on label
the list is sort in direction of the +/- tangent
the orientation 1: direct or -1 clockwise
The parameter are:
- labs : int[int] ou int to defined the boundary (in)
- Wh the fespace (in)
- int[int] doflabs (resize array) (out)
- int orient : orientation of the border direct (1) or in direct -1 (in)
*/
macro ExtractDofsonBorder(labs,Wh,doflabs,orient)
{
mesh Th=Wh.Th;
fespace VhExtractDofsonBorder(Th,P1);
VhExtractDofsonBorder abslabs,onlon,atest;
solve Pbabciss(abslabs,atest)
= int2d(Th,qft=qf1pTlump)(abslabs*atest*1e-10)
+ int1d(Th,labs,qfe=qf1pElump)([dx(abslabs),dy(abslabs)]'*[-N.y,+N.x]*atest)
- int1d(Th,labs,qfe=qf1pElump)(orient*atest);
real abslabsmax = 2*abslabs[].max;
varf vlabsneg(u,v) = on(labs,u=abslabs-abslabsmax);
if(1) plot(abslabs,wait=1);
real[int] absc=vlabsneg(0,Wh);
doflabs.resize(Wh.ndof);
doflabs=0:Wh.ndof-1;
sort(absc,doflabs);
absc= absc? 1:0;
doflabs.resize(absc.sum+0.5);
}
//
|