Real elements with one degree of freedom

Hello all

I am trying to adapt some code from FEniCS to the newer FEniCSx. The issue is as follows. In FEniCS a real element with one degree of freedom could be created via

from dolfin import *
domain = UnitSquareMesh(32,32)
R = FunctionSpace(domain, "R", 0) 

When adapting to FEniCSx, I tried

from dolfinx import fem, mesh
from mpi4py import MPI
domain = mesh.create_unit_square(MPI.COMM_SELF, 32, 32)
R = fem.FunctionSpace(domain, ("R", 0))

But this gives a ValueError: Unknown element family: Real with cell type triangle. I would like to know the correct way of defining such an element.

Also, for FEniCS, there is an overview of the supported families here. I was wondering if something similar is available for FEniCSx?

Many thanks in advance!

Real elements are not yet supported in FEniCSx, see this issue: Missing Real finite element · Issue #225 · FEniCS/dolfinx · GitHub.

The current best documentation of which elements are currently supported is probably the Basix README file.

1 Like

Thanks a lot for the quick response!