From cd1530901abf6f3aac4f0769b5803ebfddb234d6 Mon Sep 17 00:00:00 2001 From: Dominic Kempf <dominic.kempf@iwr.uni-heidelberg.de> Date: Mon, 5 Feb 2018 12:04:14 +0100 Subject: [PATCH] Fix recursiveness of index push down --- python/dune/perftool/ufl/transformations/indexpushdown.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/dune/perftool/ufl/transformations/indexpushdown.py b/python/dune/perftool/ufl/transformations/indexpushdown.py index 1dd7139d..73b8d73a 100644 --- a/python/dune/perftool/ufl/transformations/indexpushdown.py +++ b/python/dune/perftool/ufl/transformations/indexpushdown.py @@ -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. -- GitLab