Skip to content

Commit

Permalink
WIP: fixes to assemble complicated BaseForms
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrubeck committed Jul 29, 2024
1 parent 934d109 commit d515444
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ufl/adjoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ def form(self):

def _analyze_form_arguments(self):
"""The arguments of adjoint are the reverse of the form arguments."""
self._arguments = self._form.arguments()[::-1]
reversed_args = self._form.arguments()[::-1]
# Canonical numbering for arguments that is consistent with other BaseForm objects.
self._arguments = tuple(
type(arg)(arg.ufl_function_space(), number=i) for i, arg in enumerate(reversed_args)
)
self._coefficients = self._form.coefficients()

def _analyze_domains(self):
Expand Down

0 comments on commit d515444

Please sign in to comment.