Skip to content

Commit

Permalink
Fix analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
nbouziani committed Sep 12, 2023
1 parent 7467299 commit d39c06f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ufl/algorithms/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,10 @@ def extract_type(a, ufl_types):
# Extracting BaseArguments of an object of which a Coargument is an argument,
# then we just return the dual argument of the Coargument and not its primal argument.
if isinstance(ai, Coargument):
ufl_types = tuple(Coargument if t is BaseArgument else t for t in ufl_types)
base_form_objects += tuple(extract_type(ai, ufl_types))
new_types = tuple(Coargument if t is BaseArgument else t for t in ufl_types)
base_form_objects += tuple(extract_type(ai, new_types))
else:
base_form_objects += tuple(extract_type(ai, ufl_types))
# Look for BaseArguments in BaseFormOperator's argument slots only since that's where they are by definition.
# Don't look into operands, which is convenient for external operator composition, e.g. N1(N2; v*)
# where N2 is seen as an operator and not a form.
Expand Down

0 comments on commit d39c06f

Please sign in to comment.