Hdiv-Trace elements

Hello,

within Fenics it was possible to define Lagrangian function spaces restricted onto the facets of elements. I had in mind, that this is also possible in FenicsX but the code below gives the following error:

‘Unknown element family: HDiv Trace with cell type triangle’

Did the naming convention of these kind of elements changed or are they not supported within FenicsX? If the second is the case, is there a possible workaround to mimic these elements?

Kind regards,
Maximilian

import numpy as np
from mpi4py import MPI

import dolfinx.fem
from dolfinx.mesh import create_rectangle
import ufl

mesh = create_rectangle(MPI.COMM_WORLD, [np.array([0, 0]), np.array([1,1])], [5,5])
elmt = ufl.FiniteElement('DGT', mesh.ufl_cell(), 1)
fspace = dolfinx.fem.FunctionSpace(mesh, elmt)

I’m somewhat sure these haven’t been implemented yet, but are high priority on the roadmap. @mscroggs and @jpdean hopefully know more.

Hello Nate,

thanks for your quick reply. As it seems that the Hdiv-Trace space is currently not supported, is there any timeline for it’s implementation?

Kind regards,
Maximilian

Hi Maximilian,

As Nate mentioned, these elements are not currently supported in FEniCSx, but we are working on it. Keep an eye on Sub-mesh support · GitHub. The idea is to support the creation of function spaces on a subset of mesh entities (i.e. the facets of the mesh, in your case). It’s hard to judge how long the implementation will take, but hopefully it will be working in a couple of months or so.

Thanks,

Joe

2 Likes

Hello Joe,

thanks for your answer. I’ll follow the progress on Github and looking foreword to the final implementation.

Kind regards,
Maximilian

1 Like

Hi @mbr,

I want to use the same kind of facet spaces, did you manage to implement them on FEniCSx? I couldn’t find much information online on that subject.

Thanks in advance,
Giovanni

In multiphenicsx (see https://multiphenics.github.io/, disclaimer: I am the author of that) we are able to restrict unknowns to facets for certain spaces (but not the Hdiv-trace elements in this topic). Otherwise, keep in touch with @jpdean for updates on his work!

1 Like

Hi Giovanni,

These spaces are working in a branch of FEniCSx (see mixed_domain_demos/hdg_poisson.py at main · jpdean/mixed_domain_demos · GitHub for a demo), I just haven’t yet found the time to get the branch merged into main.

I am currently busy wrapping up my PhD thesis, but once it is submitted, I’ll work on getting the branches merged.

Thanks,

Joe

2 Likes