From 4e16a6a9df4a6412c48f735fab6984a005bfd38a Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Thu, 25 Jul 2019 20:21:15 +0200 Subject: Fix handling of outer boundary cells 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. --- standalone_cpp_codegen.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'standalone_cpp_codegen.py') 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) -- cgit v1.2.3