Replacement of MixedFunctionSpace

I wonder if MixedFunctionSpace based on submeshes can still be supported in some way. I tried import from UFL and define Function on that but it fails.

MixedFunctionSpace is for now deprecated, in favor of FunctionSpace built from a MixedElement.
As an example :

V = FiniteElement("CG", mesh.ufl_cell(), 2)
Q = FiniteElement("CG", mesh.ufl_cell(), 1)
VQ = FunctionSpace(mesh, MixedElement(V, Q))
3 Likes

@cdaversin Thanks for the attention. The real problem is how to define functionspace on submeshes. MixedFunctionSpace allowed one to do that before.

Indeed, using MixedElement implies the function spaces to be defined on the same (sub)mesh.
We are working on a new version of MixedFunctionSpace allowing to define product of function spaces from various submeshes, which can eventually have different topological dimensions.
This feature will be available soon, in a next release.
In the meanwhile you can give a try to the development version using the Docker image : https://hub.docker.com/r/ceciledc/fenics_mixed_dimensional

3 Likes

@cdaversin Cool. Could you let me know how to keep updated on new releases?

New releases are advertised on the FEniCS website https://fenicsproject.org/download/

Does MixedElement work with, say, three spaces V,Q and X? I mean this

VQX = FunctionSpace(mesh, MixedElement(V,Q,X))

I gave the docker version a try. It seems that there are still bugs like _repr or _cpp_object is missing for some classes. What is the estimated release cycle?

Yes. They need to be defined on the same mesh. Put them in a list: MixedElement([V, Q, X])

1 Like