Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrubeck committed Dec 21, 2024
1 parent a86f3f5 commit 337d087
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions firedrake/assemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -817,8 +817,8 @@ def restructure_base_form(expr, visited=None):
return ufl.action(expr, ustar)

# -- Case (6) -- #
if isinstance(expr, ufl.FormSum) and all(not isinstance(c, ufl.form.BaseForm) for c in expr.components()):
# Return ufl.Sum
if isinstance(expr, ufl.FormSum) and all(ufl.duals.is_dual(a.function_space()) for a in expr.arguments()):
# Return ufl.Sum if we are assembling a FormSum with Coarguments (a primal expression)
return sum(w*c for w, c in zip(expr.weights(), expr.components()))
return expr

Expand Down

0 comments on commit 337d087

Please sign in to comment.