Restricting a quadrature function to a submesh

I need to integrate a function from the quadrature space

W = df.FunctionSpace(mesh, df.VectorElement('Quadrature', mesh.ufl_cell(), degree = 2, quad_scheme = 'default'))

against a test function from

V = df.FunctionSpace(df.SubMesh(mesh, subdomains, 1), 'CG', 2),

where subdomains is a suitable meshfunction. However, this yields an error since those two functions are defined on different meshes. Hence, it seems that I have to restrict the quadrature function to the submesh. How can this be done?

Hello,

A mixed-dimensional framework has recently been developed in FEniCS, that could be suitable to your case. If you’re interested in giving it a try, you can find more details in this preprint (the framework is available in the last version of FEniCS, or in the dedicated Docker container)

1 Like