From a3ac409a49803956986f4cab35a1f90f8d4b8e81 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Fri, 19 Jun 2020 22:01:57 +0200 Subject: Use lattice-internal moments buffer for particles --- utility/particles.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'utility/particles.py') diff --git a/utility/particles.py b/utility/particles.py index 4b770bd..75d2245 100644 --- a/utility/particles.py +++ b/utility/particles.py @@ -10,12 +10,11 @@ import OpenGL.GL as gl from OpenGL.arrays import vbo class Particles: - def __init__(self, lattice, moments, grid): + def __init__(self, lattice, grid): self.lattice = lattice self.context = self.lattice.context self.queue = self.lattice.queue self.float_type = self.lattice.memory.float_type - self.moments = moments self.count = len(grid) self.np_particles = numpy.ndarray(shape=(self.count, 4), dtype=self.float_type) @@ -64,7 +63,7 @@ class Particles: self.program.update_particles( self.queue, (self.count,1), None, - self.moments.cl_gl_moments, + self.lattice.memory.cl_moments, self.lattice.memory.cl_material, self.cl_gl_particles, self.cl_init_particles, age) -- cgit v1.2.3