Restriction of FiniteElement spaces to facets

Dear all,

I would like to use function spaces restricted to facets like
V = FunctionSpace (mesh, “BDM”, 1, restriction =“facet”)

in a mixed setting. This means I would like to use the syntax with FiniteElement such that then I can construct a MixedFiniteElement space. Could you point me to the right syntax?

Thank you for your help!

For your example of BDM1 elements i guess there will be no difference, as all dofs are located on facets, for higher orders you might try

from dolfin import *

mesh = UnitSquareMesh(10,10)

order = 3

V1_ele = FiniteElement('BDM', mesh.ufl_cell(), order)
V2_ele = FiniteElement('BDM', mesh.ufl_cell(), order)['facet']

V1 = FunctionSpace(mesh, V1_ele)
V2 = FunctionSpace(mesh, V2_ele)

assert(V1.dim() != V2.dim())
assert(V2.dim() == mesh.num_facets()*(order+1))
1 Like

this is perfect, thank you!