How to apply boundary condition with a function in another function space?

Hello everyone! Here is the statement of my problem.
There are two domains sharing the same interface. The calculation on the two domains is seperated. However, Dirichlet boundary conditions on the interface should be imposed with the function that each domain caIculated. I know I can use the interpolation function, but I doubt the correctness in this situation, because it is not in the same mesh.

Hello,
One option would be to use a Lagrange multiplier living on the interface to impose your boundary condition. Mixed-dimensional features allowing to do that have recently been included in FEniCS (master branches), and are also available in a dedicated Docker container ceciledc/fenics_mixed_dimensional

Thank you very much!
I have looked into this branch and found a useful class which is MixedFunctionSpace. In my opinion, it can be used to deal with the immersed boundary method. However, I read the change log and found the MixedFunctionSpace was desperated years ago. It seems that MixedFunctionSpace can be replaced by “suitable UFL element”. Is there a way to construct a mixed function space in two meshes, P1XP2 element in one mesh and P2 element in the other, without the use of MixedFunctionSpace?

Indeed, MixedFunctionSpace had been deprecated a few years ago. It has recently been reintroduced in the context of the mixed-dimensional framework in a more generic way i.e. it can now be used to build product of function spaces built from different meshes (possibly of different dimensions).
You can build your two FunctionSpace as usual : one (say V1) for P1 x P2 on one mesh, and another (say V2) for P2 on the other mesh, and then build the product V = MixedFunctionSpace(V1, V2).

Thanks for the answer, I am not confused about it anymore!

1 Like