How to identify the boundary label for an import mesh

Here is one way to do it.

mesh Th = square(10, 10);
int[int] lab = labels(Th);
varf onG(u, v) = on(lab, u = label);
fespace Vh(Th, P1);
Vh u;
u[] = onG(0, Vh, tgv = -1);
plot(u);
3 Likes