From 191c425e06c040afc0e24fec9c854090fa032461 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Mon, 23 Sep 2019 19:39:03 +0200 Subject: Use new projection utilities in LDC 3D --- template/particles.mako | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'template') 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; -- cgit v1.2.3