Two imported mesh domains

Hello everyone,
I try to solve two different PDEs in two 3D domains separated by a shared interface. The two problems are coupled through this interface. The two domains are realistic so I need to import them as .msh.

If I import the the two domains in one global mesh (Th) I can define the interface of coupling but I can not separate the two domains and define the correspondant PDE for each mesh. In the oter hand, if I import each domain as an independant mesh (Th1 and Th2), I can define a PDE for each mesh but I can’t impose that the surface located between the two meshes is a shared surface that belongs to Th1 and Th2 in the same time.

Can someone help me to find a solution for this issue?
Thank you.

Did you try to define a global mesh Th and next split it into two meshes Th1 and Th2 by using the comand trunc?

Take a look at the page 146, Section The command trunc. The link to access the pdf file is: https://doc.freefem.org/pdf/FreeFEM-documentation.pdf

Hello Lucas,
Thank you for your answer. My geometry is not regular, there is no condition based on spatial coordinates that permit sto split the two meshes. Here the used geometry:.

You could trunc based on the region indicator of your mesh, e.g. for a mesh with regions 23 and 42:
mesh3 Th1 = trunc(Th, region == 23); mesh3 Th2 = trunc(Th, region == 42);

Thank you Henkel, That’s why I’m trying to find as function.