Get labels of boundary nodes for P2 elements

This is a little bit more complexe because a node could be on more the 1 boundary (corner ponts
for examples).

mesh Th=square (10,10);
fespace Vh(Th,P2);

Vh l2 = label;
plot(l2, wait=1);

// it is correct expect on corner ..

// border l;
for(int l=1; l<=4; ++l)
{
varf vb1(u,v)= on(l,u=1);
Vh l1;
l1[] = vb1(0,Vh,tgv=1);// 1 on l border ..
plot(l1,wait=1,cmm=" border l="+l);
}
2 Likes