This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Find 'facet' DOFs of DG space

0 votes

Having some DG space V, interior facet f and its adjacent cell c, say

from dolfin import *

mesh = UnitSquareMesh(1, 1)
V = FunctionSpace(mesh, 'DRT', 2)

mesh.init(1, 2)
interior_facets = [f for f in facets(mesh) if not f.exterior()]
f = interior_facets[0]
c = Cell(mesh, f.entities(2)[0])

how can I check which DOFs of V of cell c are located on facet f? Both DOLFIN and UFC DofMap interface does not seem to make this information available, although one may infer it by looking into figures in generated code.

Equivalently, one would like to efficiently implement new method DirichleBC::compute_bc_foo which would be able to apply BC for DG space on interior facet, just on one side of the facet. Existing geometric method would apply the BC to both sides.

asked Mar 7, 2014 by Jan Blechta FEniCS Expert (51,420 points)
edited Mar 7, 2014 by Jan Blechta

1 Answer

+3 votes

Ok, I inferred from DirichletBC::compute_bc_geometric that such an information is not available and is reconstructed by DirichletBC::on_facet (roughly said) by computing distance of DOF from facet.

It's a pitty that such an information is not supplied by FIAT. It defines topological membership of DOFs (which is only thing making a difference between an element ant its discontinuous variant) but does not provide supports of every basis function (which would be the same for continuous and discontinuous variant of the element). This would eliminate these expensive and ill-conditioning-prone calculations in compute_bc_geometric and other routines where support of basis function must be computed.

answered Mar 7, 2014 by Jan Blechta FEniCS Expert (51,420 points)
...