aboutsummaryrefslogtreecommitdiff
path: root/template/particles.mako
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-09-23 19:39:03 +0200
committerAdrian Kummerlaender2019-09-23 19:39:03 +0200
commit191c425e06c040afc0e24fec9c854090fa032461 (patch)
tree819435fc20f264e8b4c25ca257904039cb5b6428 /template/particles.mako
parent087d7fd7908f6b68f73aa0a08b00c7f18afeb5b3 (diff)
downloadsymlbm_playground-191c425e06c040afc0e24fec9c854090fa032461.tar
symlbm_playground-191c425e06c040afc0e24fec9c854090fa032461.tar.gz
symlbm_playground-191c425e06c040afc0e24fec9c854090fa032461.tar.bz2
symlbm_playground-191c425e06c040afc0e24fec9c854090fa032461.tar.lz
symlbm_playground-191c425e06c040afc0e24fec9c854090fa032461.tar.xz
symlbm_playground-191c425e06c040afc0e24fec9c854090fa032461.tar.zst
symlbm_playground-191c425e06c040afc0e24fec9c854090fa032461.zip
Use new projection utilities in LDC 3Dvisualization
Diffstat (limited to 'template/particles.mako')
-rw-r--r--template/particles.mako10
1 files changed, 2 insertions, 8 deletions
diff --git a/template/particles.mako b/template/particles.mako
index 6235307..cee3f4b 100644
--- a/template/particles.mako
+++ b/template/particles.mako
@@ -19,16 +19,10 @@ __kernel void update_particles(__global __read_only float4* moments,
if (material[gid] == 1 && particle.w < 1.0) {
particle.x += moment.y;
particle.y += moment.z;
-% if descriptor.d == 2:
- particle.w += min(particle.x, particle.y) * aging;
-% elif descriptor.d == 3:
+% if descriptor.d == 3:
particle.z += moment.w;
- float dy = (particle.y-${geometry.size_y/2.0});
- float dz = (particle.z-${geometry.size_z/2.0});
- dy *= dy;
- dz *= dz;
- particle.w = 10.0*sqrt(moment.y*moment.y+moment.z*moment.z+moment.w*moment.w);
% endif
+ particle.w += min(particle.x, particle.y) * aging;
} else {
particle.xyz = init_particles[pid].xyz;
particle.w = particle.w-1.0;