Skip to content

Commit

Permalink
Fix real return type (#728)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgensd authored Nov 25, 2024
1 parent 712a57d commit 7164d8c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ffcx/codegeneration/expression_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,13 @@ def generate_partition(self, symbol, F, mode):
vexpr = L.ufl_to_lnodes(v, *vops)

is_cond = isinstance(v, ufl.classes.Condition)
dtype = L.DataType.BOOL if is_cond else L.DataType.SCALAR
is_real = isinstance(v, ufl.classes.Real)
if is_cond:
dtype = L.DataType.BOOL
elif is_real:
dtype = L.DataType.REAL
else:
dtype = L.DataType.SCALAR

j = len(intermediates)
vaccess = L.Symbol(f"{symbol.name}_{j}", dtype=dtype)
Expand Down

0 comments on commit 7164d8c

Please sign in to comment.