aboutsummaryrefslogtreecommitdiff
path: root/standalone_cpp_codegen.py
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-07-25 20:21:15 +0200
committerAdrian Kummerlaender2019-07-25 20:21:15 +0200
commit4e16a6a9df4a6412c48f735fab6984a005bfd38a (patch)
tree9aafca48e4bd38c05d855c1d10c0ff524f89c7bf /standalone_cpp_codegen.py
parentf8206aae565894a5d4374600cebaa0fae8b8c19c (diff)
downloadsymlbm_playground-standalone.tar
symlbm_playground-standalone.tar.gz
symlbm_playground-standalone.tar.bz2
symlbm_playground-standalone.tar.lz
symlbm_playground-standalone.tar.xz
symlbm_playground-standalone.tar.zst
symlbm_playground-standalone.zip
Fix handling of outer boundary cellsstandalone
As we can only use a multiplicative mask to distinguish between cell types and streaming memory offsets are statically resolved the buffers have to provide a well-defined padding in both directions. Otherwise undefined data is accessed which may distort results.
Diffstat (limited to 'standalone_cpp_codegen.py')
-rw-r--r--standalone_cpp_codegen.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/standalone_cpp_codegen.py b/standalone_cpp_codegen.py
index 24a97af..e4dd0b7 100644
--- a/standalone_cpp_codegen.py
+++ b/standalone_cpp_codegen.py
@@ -12,7 +12,7 @@ lbm = LBM(D3Q19)
moments = lbm.moments(optimize = True)
collide = lbm.bgk(f_eq = lbm.equilibrium(), tau = 0.6, optimize = True)
-geometry = Geometry(64, 64, 64)
+geometry = Geometry(32, 32, 32)
program_src = Template(filename = str(Path(__file__).parent/'template/standalone.mako')).render(
descriptor = lbm.descriptor,
@@ -26,7 +26,9 @@ program_src = Template(filename = str(Path(__file__).parent/'template/standalone
collide_assignment = collide[1],
float_type = 'double',
- ccode = sympy.ccode
+ ccode = sympy.ccode,
+
+ enable_omp_simd = True
)
print(program_src)