added option to weakly impose Dirichlet BC