Different subdomains and different function spaces!

Hi guys, my question is that if the computation domain is separated into several parts, like 3 parts, I want to use P1 on the 1rt part, P2 on the 2nd part and DG on the 3rd part, and implement interface conditions among them. How should I do that? Can anybody give some tips or demos?

I have tried the below method but not work.
mixedfunctionspace-on-two-different-submeshes;

I want to try the below method but I cannot install fenics_ii correctly.
fenics_ii and multifunctionspaces

Actually, I want to achieve functionality same with BlockFunctionSpace.

Note: it seems I cannot implement mixedfunctionspace. If I do that, I can not implement boundary conditions correctly.

Thanks in advance!

Hi ronghong,
Could you be a little bit more specific on the problems you have with the mentioned examples? What FEniCS version are you using? In the latest versions of FEniCS, the “MixedFunctionSpace” is assembled differently, for instance:

Create function space on mesh.

#V_phi = FunctionSpace(mesh, ‘CG’, 2)
#V_u = VectorFunctionSpace(mesh, ‘DG’, 1)
#W = MixedFunctionSpace([V_phi, V_u])
deg_el1 = 2
deg_el2 = 1
el1 = FiniteElement(‘CG’, mesh.ufl_cell(), deg_el1)
el2 = VectorElement(‘DG’, mesh.ufl_cell(), deg_el2)
Elem = MixedElement([el1, el2])
W = FunctionSpace(mesh, Elem)

Hi Alban, sorry about unclear.
I know MixedFunctionSpace can assemble for different finite elements, but must based on the exactly same mesh. Am I right? I want to assemble on different meshes.