From b144b368aa259279c73a265bec86da9b7b3a8159 Mon Sep 17 00:00:00 2001
From: et31efoj <markus.holzer@fau.de>
Date: Tue, 1 Oct 2019 15:50:46 +0200
Subject: [PATCH] implemented unconventional D3Q27 stencil by Abbas Fakhari

---
 lbmpy/stencils.py            | 8 +++++++-
 lbmpy_tests/test_stencils.py | 2 ++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/lbmpy/stencils.py b/lbmpy/stencils.py
index a0d9001..38710e5 100644
--- a/lbmpy/stencils.py
+++ b/lbmpy/stencils.py
@@ -83,6 +83,12 @@ get_stencil.data = {
                      (1, 0, 1), (-1, 0, 1), (1, 0, -1), (-1, 0, -1),
                      (0, 1, 1), (0, -1, 1), (0, 1, -1), (0, -1, -1),
                      (1, 1, 1), (-1, 1, 1), (1, -1, 1), (-1, -1, 1),
-                     (1, 1, -1), (-1, 1, -1), (1, -1, -1), (-1, -1, -1))
+                     (1, 1, -1), (-1, 1, -1), (1, -1, -1), (-1, -1, -1)),
+        'fakhari': ((0, 0, 0),
+                    (1, 0, 0), (-1, 0, 0), (0, 1, 0), (0, -1, 0), (0, 0, 1), (0, 0, -1),
+                    (1, 1, 1), (-1, 1, 1), (1, -1, 1), (-1, -1, 1),
+                    (1, 1, -1), (-1, 1, -1), (1, -1, -1), (-1, -1, -1),
+                    (1, 1, 0), (-1, 1, 0), (1, -1, 0), (-1, -1, 0),
+                    (1, 0, 1), (-1, 0, 1), (1, 0, -1), (-1, 0, -1), (0, 1, 1), (0, -1, 1), (0, 1, -1), (0, -1, -1)),
     }
 }
diff --git a/lbmpy_tests/test_stencils.py b/lbmpy_tests/test_stencils.py
index eb07afc..1a03e2a 100644
--- a/lbmpy_tests/test_stencils.py
+++ b/lbmpy_tests/test_stencils.py
@@ -26,6 +26,8 @@ def get_all_stencils():
         s.get_stencil('D3Q19', 'braunschweig'),
 
         s.get_stencil('D3Q27', 'premnath'),
+
+        s.get_stencil("D3Q27", "fakhari"),
     ]
 
 
-- 
GitLab