Skip to content

Commit e8fd26f

Browse files
authored
Update firedrake/assemble.py
1 parent a95a136 commit e8fd26f

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

firedrake/assemble.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -574,11 +574,7 @@ def base_form_assembly_visitor(self, expr, tensor, *args):
574574
# Dual interpolation into mixed target
575575
if is_adjoint and len(arg_expression[0].function_space()) > 1 and rank == 1:
576576
V = arg_expression[0].function_space()
577-
if tensor is not None:
578-
assert tensor.function_space() == V.dual()
579-
tensor.zero()
580-
else:
581-
tensor = firedrake.Cofunction(V.dual())
577+
tensor = tensor or firedrake.Cofunction(V.dual())
582578

583579
# Argument-split of the Interpolate gets assembled into the corresponding sub-tensor
584580
for (i,), sub_interp in split_form(expr):

0 commit comments

Comments
 (0)