aboutsummaryrefslogtreecommitdiff
path: root/lid_driven_cavity
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-11-09 23:47:58 +0100
committerAdrian Kummerlaender2019-11-09 23:47:58 +0100
commit52033eeec131fe862ad85dcb52e961b5904330eb (patch)
tree56a5652daa8a1560d336989c58c9a696c0130466 /lid_driven_cavity
parent910c2299f4be8ec1819cddaae508d60cddcb9796 (diff)
downloadboltzgen_examples-52033eeec131fe862ad85dcb52e961b5904330eb.tar
boltzgen_examples-52033eeec131fe862ad85dcb52e961b5904330eb.tar.gz
boltzgen_examples-52033eeec131fe862ad85dcb52e961b5904330eb.tar.bz2
boltzgen_examples-52033eeec131fe862ad85dcb52e961b5904330eb.tar.lz
boltzgen_examples-52033eeec131fe862ad85dcb52e961b5904330eb.tar.xz
boltzgen_examples-52033eeec131fe862ad85dcb52e961b5904330eb.tar.zst
boltzgen_examples-52033eeec131fe862ad85dcb52e961b5904330eb.zip
Fix SSS population padding
D2Q9 and D3Q27 worked by coincidence, should now work for all lattices.
Diffstat (limited to 'lid_driven_cavity')
-rw-r--r--lid_driven_cavity/cpp/config.py2
-rw-r--r--lid_driven_cavity/cpp/ldc.cpp.SSS.mako2
2 files changed, 2 insertions, 2 deletions
diff --git a/lid_driven_cavity/cpp/config.py b/lid_driven_cavity/cpp/config.py
index 0ea626b..63386f6 100644
--- a/lid_driven_cavity/cpp/config.py
+++ b/lid_driven_cavity/cpp/config.py
@@ -8,7 +8,7 @@ precision = 'double'
streaming = 'SSS'
## 3D LDC
-#descriptor = D3Q27
+#descriptor = D3Q19
#geometry = Geometry(64, 64, 64)
#tau = 0.6
#precision = 'double'
diff --git a/lid_driven_cavity/cpp/ldc.cpp.SSS.mako b/lid_driven_cavity/cpp/ldc.cpp.SSS.mako
index ed2f938..eb041e5 100644
--- a/lid_driven_cavity/cpp/ldc.cpp.SSS.mako
+++ b/lid_driven_cavity/cpp/ldc.cpp.SSS.mako
@@ -98,7 +98,7 @@ padding = (max(geometry.size_x,geometry.size_y,geometry.size_z)+1)**(descriptor.
${float_type}* f[${descriptor.q}];
% for i, c_i in enumerate(descriptor.c):
- f[${i}] = f_aa.get() + ${layout.pop_offset(i) + padding};
+ f[${i}] = f_aa.get() + ${padding + layout.pop_offset(i, 2*padding)};
% endfor
std::vector<std::size_t> ghost;