Hello all,

I would like to know, if it is possible to apply Dirichlet boundary conditions to a mixed problem after assembly. I’ve seen this tutorial Application of Dirichlet boundary conditions — FEniCS Tutorial @ Sorbonne, where the identity row approach is described. I would like to do something like the non-blocked direct solver in this demo Stokes equations with Taylor-Hood elements — DOLFINx 0.6.0 documentation (I’m using v0.6.0), but also manually apply Dirichlet BC after assembly.

The reason is I’m using the Customquad library, where I cannot pass boundary conditions for assembly. A level set function defines two subdomains, for each I want to define a test and trial function (linear scalar Lagrange). On the interface I want to set conditions to couple both. Since I’m using the Cut FEM method, the functions should ideally be restricted to their subdomain, so the current approach would be to manually set zero Dirichlet bc on all respective outside dofs.

Would this be possible? Would it work in parallel?

I appreciate any help!