From e54f702c46858e67dfb12f2d0220c761f1f9e4a6 Mon Sep 17 00:00:00 2001
From: Martin Bauer <martin.bauer@fau.de>
Date: Thu, 16 Mar 2017 18:41:31 +0100
Subject: [PATCH] Using new indexed kernels in lbmpy boundary handling

---
 transformations.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/transformations.py b/transformations.py
index 93346f7aa..870904b54 100644
--- a/transformations.py
+++ b/transformations.py
@@ -279,7 +279,8 @@ def resolveFieldAccesses(astNode, readOnlyFieldNames=set(), fieldToBasePointerIn
             return visitSympyExpr(result, enclosingBlock, sympyAssignment)
         else:
             newArgs = [visitSympyExpr(e, enclosingBlock, sympyAssignment) for e in expr.args]
-            kwargs = {'evaluate': False} if type(expr) is sp.Add or type(expr) is sp.Mul else {}
+
+            kwargs = {'evaluate': False} if type(expr) in (sp.Add, sp.Mul, sp.Piecewise) else {}
             return expr.func(*newArgs, **kwargs) if newArgs else expr
 
     def visitNode(subAst):
-- 
GitLab