aboutsummaryrefslogtreecommitdiff
path: root/utility
diff options
context:
space:
mode:
authorAdrian Kummerlaender2020-06-19 21:30:34 +0200
committerAdrian Kummerlaender2020-06-19 21:30:34 +0200
commit621dec0f2b7a982c958cce4d7baa4ccd3994606a (patch)
tree70d5e43ee78e118594c61986fa6980e893dc229e /utility
parentbe7de4a18bdfd89fbd1fdc852d170f68cdc65ba4 (diff)
downloadsymlbm_playground-621dec0f2b7a982c958cce4d7baa4ccd3994606a.tar
symlbm_playground-621dec0f2b7a982c958cce4d7baa4ccd3994606a.tar.gz
symlbm_playground-621dec0f2b7a982c958cce4d7baa4ccd3994606a.tar.bz2
symlbm_playground-621dec0f2b7a982c958cce4d7baa4ccd3994606a.tar.lz
symlbm_playground-621dec0f2b7a982c958cce4d7baa4ccd3994606a.tar.xz
symlbm_playground-621dec0f2b7a982c958cce4d7baa4ccd3994606a.tar.zst
symlbm_playground-621dec0f2b7a982c958cce4d7baa4ccd3994606a.zip
Use OpenCL buffer to access moments in streamline impl
Diffstat (limited to 'utility')
-rw-r--r--utility/streamline.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/utility/streamline.py b/utility/streamline.py
index 5111fc2..9f0fb55 100644
--- a/utility/streamline.py
+++ b/utility/streamline.py
@@ -10,12 +10,11 @@ from OpenGL.GL import *
from OpenGL.arrays import vbo
class Streamlines:
- def __init__(self, lattice, moments, origins):
+ def __init__(self, lattice, origins):
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(origins)
self.np_origins = numpy.ndarray(shape=(self.count, 2), dtype=self.float_type)
@@ -66,7 +65,7 @@ class Streamlines:
self.program.draw_streamline(
self.queue, (self.count,1), None,
- self.moments.cl_gl_moments,
+ self.lattice.memory.cl_moments,
self.lattice.memory.cl_material,
self.cl_origins,
self.cl_gl_streamlines)