Skip to content
Snippets Groups Projects
Commit cd153090 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

Fix recursiveness of index push down

parent d7b4601b
No related branches found
No related tags found
No related merge requests found
......@@ -16,9 +16,9 @@ class IndexPushDown(MultiFunction):
terms = [uc.Indexed(self(term), idx) for term in get_operands(expr)]
return construct_binary_operator(terms, uc.Sum)
elif isinstance(expr, uc.Conditional):
return uc.Conditional(expr.ufl_operands[0],
uc.Indexed(self(expr.ufl_operands[1]), idx),
uc.Indexed(self(expr.ufl_operands[2]), idx)
return uc.Conditional(self(expr.ufl_operands[0]),
self(uc.Indexed(expr.ufl_operands[1], idx)),
self(uc.Indexed(expr.ufl_operands[2], idx))
)
else:
# This is a normal indexed, we treat it as any other.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment