From f278b44419412f50ce568eb46a39ea8479f34767 Mon Sep 17 00:00:00 2001
From: Martin Bauer <martin.bauer@fau.de>
Date: Tue, 14 Jan 2020 10:31:00 +0100
Subject: [PATCH] Fix in operation counting - FLOPs inside division were not
 counted

---
 pystencils/sympyextensions.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pystencils/sympyextensions.py b/pystencils/sympyextensions.py
index 7d25f49c7..f788dbcd8 100644
--- a/pystencils/sympyextensions.py
+++ b/pystencils/sympyextensions.py
@@ -503,7 +503,7 @@ def count_operations(term: Union[sp.Expr, List[sp.Expr]],
             result['fast_div'] += 1
         elif t.func is sp.Pow:
             if check_type(t.args[0]):
-                visit_children = False
+                visit_children = True
                 if t.exp.is_integer and t.exp.is_number:
                     if t.exp >= 0:
                         result['muls'] += int(t.exp) - 1
-- 
GitLab