From efcbd7fc961823acd96aab32ec2620bd8d6b2566 Mon Sep 17 00:00:00 2001
From: Michael Kuron <mkuron@icp.uni-stuttgart.de>
Date: Thu, 21 Nov 2019 11:30:47 +0100
Subject: [PATCH] Actually make D3Q15 orthogonal

---
 lbmpy/methods/creationfunctions.py                  | 2 +-
 lbmpy_tests/test_momentbased_methods_equilibrium.py | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/lbmpy/methods/creationfunctions.py b/lbmpy/methods/creationfunctions.py
index 93174eb7..131ad9b4 100644
--- a/lbmpy/methods/creationfunctions.py
+++ b/lbmpy/methods/creationfunctions.py
@@ -396,7 +396,7 @@ def create_mrt_orthogonal(stencil, relaxation_rate_getter=None, maxwellian_momen
         nested_moments = [
             [one, x, y, z],  # [0, 3, 5, 7]
             [sq - 1],  # [1]
-            [3 * sq ** 2 - 6 * sq + 1],  # [2]
+            [3 * sq ** 2 - 9 * sq + 4],  # [2]
             [(3 * sq - 5) * x, (3 * sq - 5) * y, (3 * sq - 5) * z],  # [4, 6, 8]
             [3 * x ** 2 - sq, y ** 2 - z ** 2, x * y, y * z, x * z],  # [9, 10, 11, 12, 13]
             [x * y * z]
diff --git a/lbmpy_tests/test_momentbased_methods_equilibrium.py b/lbmpy_tests/test_momentbased_methods_equilibrium.py
index f2698f3c..5f3381d3 100644
--- a/lbmpy_tests/test_momentbased_methods_equilibrium.py
+++ b/lbmpy_tests/test_momentbased_methods_equilibrium.py
@@ -72,6 +72,9 @@ def test_mrt_orthogonal():
     m = create_mrt_orthogonal(get_stencil("D2Q9"), maxwellian_moments=True)
     assert m.is_orthogonal
 
+    m = create_mrt_orthogonal(get_stencil("D3Q15"), maxwellian_moments=True)
+    assert m.is_weighted_orthogonal
+
     m = create_mrt_orthogonal(get_stencil("D3Q19"), maxwellian_moments=True)
     assert m.is_weighted_orthogonal
 
-- 
GitLab