Preferred way to construct block matrices with exact Dirichlet BC (tgv = -1)?

What bookkeeping are you talking about? We could add a new tgv = -3 to handle this (I wanted to do this for a long time), but in the meantime, you can just impose on your off-diagonal blocks something like:

varf vGamma(u, v) = on(gamma, u = 1);
real[int] marker = vGamma(0, Vh, tgv = -1);
for[i,j,v : offdiagonal] if(marker[i] > 0.1)) v = 0.0;
1 Like