Skip to content

Commit c87fd8e

Browse files
committed
fixup
1 parent d363cb0 commit c87fd8e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

firedrake/interpolation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import finat.ufl
1313
from ufl.algorithms import extract_arguments, extract_coefficients
1414
from ufl.domain import as_domain, extract_unique_domain
15-
from ufl.duals import is_dual
1615

1716
from pyop2 import op2
1817
from pyop2.caching import memory_and_disk_cache
@@ -95,8 +94,9 @@ def __init__(self, expr, V,
9594
"""
9695
expr = ufl.as_ufl(expr)
9796
if isinstance(V, functionspaceimpl.WithGeometry):
97+
expr_args = expr.arguments()[1:] if isinstance(expr, ufl.BaseForm) else extract_arguments(expr)
98+
expr_arg_numbers = {arg.number() for arg in expr_args}
9899
# Need to create a Firedrake Argument so that it has a .function_space() method
99-
expr_arg_numbers = {arg.number() for arg in extract_arguments(expr) if not is_dual(arg)}
100100
V = Argument(V.dual(), 1 if expr_arg_numbers == {0} else 0)
101101

102102
target_shape = V.arguments()[0].function_space().value_shape

0 commit comments

Comments
 (0)