From f86bbcb014324bbefe781ed34ce9f44827e92f49 Mon Sep 17 00:00:00 2001
From: Markus Holzer <markus.holzer@fau.de>
Date: Mon, 22 Feb 2021 15:00:47 +0100
Subject: [PATCH] [BugFix] PackInfo generation

---
 python/lbmpy_walberla/packinfo.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/python/lbmpy_walberla/packinfo.py b/python/lbmpy_walberla/packinfo.py
index 54a4e6755..d6a0ab23c 100644
--- a/python/lbmpy_walberla/packinfo.py
+++ b/python/lbmpy_walberla/packinfo.py
@@ -1,4 +1,5 @@
 from collections import defaultdict
+from lbmpy.stencils import get_stencil
 from lbmpy.advanced_streaming.utility import Timestep, get_accessor, get_timesteps
 from lbmpy.advanced_streaming.communication import _extend_dir
 from pystencils.stencil import inverse_direction
@@ -59,10 +60,12 @@ def generate_lb_pack_info(generation_context,
             for comm_dir in comm_directions(comm_direction):
                 common_spec[(comm_dir,)].add(fa.field.center(*fa.index))
 
+    full_stencil = get_stencil('D3Q27') if len(stencil[0]) == 3 else get_stencil('D2Q9')
+
     for t in timesteps:
         spec = common_spec.copy()
         write_accesses = get_accessor(streaming_pattern, t).write(pdf_field, stencil)
-        for comm_dir in stencil:
+        for comm_dir in full_stencil:
             if all(d == 0 for d in comm_dir):
                 continue
 
-- 
GitLab