Mixed function space on two meshes

Hi all,

I was wondering if FEniCS can do the following:
mesh1 = UnitCubeMesh(5,5,5)
mesh2 = UnitCubeMesh(7,7,7) % or the second mesh is a submesh of mesh1
V1 = FunctionSpace(mesh1,‘CG’,1)
V2 = FunctionSpace(mesh2,‘CG’,1)
then how to construct the mixed function space of V1*V2 and define the variational form based on this mixed function space? Thanks in advance.

JY

What are you trying to achieve with a product of function spaces on two differently sized meshes?
Have you considered https://arxiv.org/pdf/1911.01166.pdf and the corresponding code: GitHub - cdaversin/mixed-dimensional-examples: Code to reproduce numerical examples presented in "Abstractions and automated algorithms for mixed-dimensional finite element methods" (2019) ?

1 Like

Thanks for the reply, dokken. However, when i use FEniCS (version 2019.1.0) to run the code, it implies that ‘MixedFunctionSpace’ is not defined. Do I need to install some other library or this is defined in develop verision? Thanks again.

You Need to use the development version of fenics, which can be accessed through for instance docker: quay.io/fenicsproject/dev:latest

It should also be available through apt-get install on ubuntu 20.04 as far as Im aware.

Thanks for this. really appreciate that!