Skip to content

Commit 989e21c

Browse files
committed
k
1 parent 24fdc98 commit 989e21c

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

tsfc/fem.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -597,15 +597,28 @@ def translate_cellorigin(terminal, mt, ctx):
597597
return context.translator(expression)
598598

599599

600+
class CellVerticesKernelInterface(ProxyKernelInterface):
601+
# Since CellVolume is evaluated as a cell integral, we must ensure
602+
# that the right restriction is applied when it is used in an
603+
# interior facet integral. This proxy diverts coefficient
604+
# translation to use a specified restriction.
605+
606+
def __init__(self, wrapee):
607+
ProxyKernelInterface.__init__(self, wrapee)
608+
609+
def entity_ids(self, domain):
610+
return (0,)
611+
612+
600613
@translate.register(CellVertices)
601614
def translate_cell_vertices(terminal, mt, ctx):
602615
coords = SpatialCoordinate(extract_unique_domain(terminal))
603616
ufl_expr = construct_modified_terminal(mt, coords)
604617
ps = PointSet(numpy.array(ctx.fiat_cell.get_vertices()))
605-
618+
interface = CellVerticesKernelInterface(ctx)
606619
config = {name: getattr(ctx, name)
607620
for name in ["ufl_cell", "index_cache", "scalar_type", "domain_integral_type_map"]}
608-
config.update(interface=ctx, point_set=ps, use_canonical_quadrature_point_ordering=False)
621+
config.update(interface=interface, point_set=ps, use_canonical_quadrature_point_ordering=False)
609622
context = PointSetContext(**config)
610623
expr = context.translator(ufl_expr)
611624

0 commit comments

Comments
 (0)