Skip to content

Commit

Permalink
fem: Really fix CoordinateMapping changes for interpolation
Browse files Browse the repository at this point in the history
Provide a cell integral_type for interpolation. This part needs bigger
refactoring if we want interpolation onto faces (say).
  • Loading branch information
wence- committed May 4, 2021
1 parent f6bdf1e commit 49bbcff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 3 additions & 0 deletions tsfc/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,9 @@ def compile_expression_dual_evaluation(expression, to_element, *,
# Translate to GEM
kernel_cfg = dict(interface=builder,
ufl_cell=domain.ufl_cell(),
# FIXME: change if we ever implement
# interpolation on facets.
integral_type="cell",
argument_multiindices=argument_multiindices,
index_cache={},
scalar_type=parameters["scalar_type"])
Expand Down
5 changes: 2 additions & 3 deletions tsfc/fem.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,9 @@ def preprocess(self, expr, context):
:arg context: The translation context.
:returns: A new UFL expression
"""
is_facet = (self.interface.integration_dim !=
self.interface.fiat_cell.get_dimension())
ifacet = self.interface.integral_type.startswith("interior_facet")
return preprocess_expression(expr, complex_mode=context.complex_mode,
do_apply_restrictions=is_facet)
do_apply_restrictions=ifacet)

@property
def config(self):
Expand Down

0 comments on commit 49bbcff

Please sign in to comment.