How to define mixedfunctionspace when submesh exist

I am learning to use mixed element.
In general, function spaces are defined in the same mesh as in Mixed formulation for the Poisson equation:

Q_el = element("BDMCF", msh.basix_cell(), k)
P_el = element("DG", msh.basix_cell(), k - 1)
V_el = mixed_element([Q_el, P_el])
V = fem.functionspace(msh, V_el)

I was wondering how to define mixedfunctionspace when one field is solved in the entire mesh and the other field is solved only in the submesh.
Can anyone give me some advice?

You would then use @jpdean co-dim 0 support for assembly in DOLFINx.
See for instance

1 Like

Thank you dokken. That’s very helpful.