From 0809e2eab1f819d4878452926338ca0c3bc767f1 Mon Sep 17 00:00:00 2001
From: Markus Holzer <markus.holzer@fau.de>
Date: Thu, 3 Aug 2023 12:53:57 +0200
Subject: [PATCH] Generalise Cumulant simplificaiton

---
 lbmpy/methods/cumulantbased/cumulant_simplifications.py | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/lbmpy/methods/cumulantbased/cumulant_simplifications.py b/lbmpy/methods/cumulantbased/cumulant_simplifications.py
index 9e9312a8..a0e0b2ad 100644
--- a/lbmpy/methods/cumulantbased/cumulant_simplifications.py
+++ b/lbmpy/methods/cumulantbased/cumulant_simplifications.py
@@ -16,11 +16,8 @@ def insert_logs(ac, **kwargs):
 def insert_log_products(ac, **kwargs):
     def callback(asm):
         rhs = asm.rhs
-        if isinstance(rhs, sp.log):
+        if rhs.find(sp.log):
             return True
-        if isinstance(rhs, sp.Mul):
-            if any(isinstance(arg, sp.log) for arg in rhs.args):
-                return True
         return False
 
     return insert_subexpressions(ac, callback, **kwargs)
-- 
GitLab