aboutsummaryrefslogtreecommitdiff
path: root/template/kernel.mako
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-06-13 18:08:14 +0200
committerAdrian Kummerlaender2019-06-13 18:08:14 +0200
commit2046e1329f522eeafb0f979a97eb91adeebb7a14 (patch)
treea4f8c77ebe49c42ee704ab15d01dfe474bb22944 /template/kernel.mako
parent3d93f204e80f90ba06fd1f451c8bfac7f9b629d1 (diff)
downloadsymlbm_playground-2046e1329f522eeafb0f979a97eb91adeebb7a14.tar
symlbm_playground-2046e1329f522eeafb0f979a97eb91adeebb7a14.tar.gz
symlbm_playground-2046e1329f522eeafb0f979a97eb91adeebb7a14.tar.bz2
symlbm_playground-2046e1329f522eeafb0f979a97eb91adeebb7a14.tar.lz
symlbm_playground-2046e1329f522eeafb0f979a97eb91adeebb7a14.tar.xz
symlbm_playground-2046e1329f522eeafb0f979a97eb91adeebb7a14.tar.zst
symlbm_playground-2046e1329f522eeafb0f979a97eb91adeebb7a14.zip
Add kernel customization point for velocity boundaries
Diffstat (limited to 'template/kernel.mako')
-rw-r--r--template/kernel.mako10
1 files changed, 1 insertions, 9 deletions
diff --git a/template/kernel.mako b/template/kernel.mako
index c76e5d9..b81d432 100644
--- a/template/kernel.mako
+++ b/template/kernel.mako
@@ -56,15 +56,7 @@ __kernel void collide_and_stream(__global __write_only float* f_a,
float ${ccode(expr)}
% endfor
- if ( m == 2 ) {
- u_0 = 0.0;
- u_1 = 0.0;
- }
-
- if ( m == 3 ) {
- u_0 = 0.1;
- u_1 = 0.0;
- }
+ ${boundary_src}
% for i, expr in enumerate(collide_helper):
const float ${expr[0]} = ${ccode(expr[1])};