@@ -597,15 +597,28 @@ def translate_cellorigin(terminal, mt, ctx):
597
597
return context .translator (expression )
598
598
599
599
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
+
600
613
@translate .register (CellVertices )
601
614
def translate_cell_vertices (terminal , mt , ctx ):
602
615
coords = SpatialCoordinate (extract_unique_domain (terminal ))
603
616
ufl_expr = construct_modified_terminal (mt , coords )
604
617
ps = PointSet (numpy .array (ctx .fiat_cell .get_vertices ()))
605
-
618
+ interface = CellVerticesKernelInterface ( ctx )
606
619
config = {name : getattr (ctx , name )
607
620
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 )
609
622
context = PointSetContext (** config )
610
623
expr = context .translator (ufl_expr )
611
624
0 commit comments