diff options
Diffstat (limited to 'template')
-rw-r--r-- | template/particles.mako | 10 |
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; |