aboutsummaryrefslogtreecommitdiff
path: root/lid_driven_cavity/opencl_gl_interop/ldc_2d.py
diff options
context:
space:
mode:
authorAdrian Kummerlaender2020-01-16 22:20:27 +0100
committerAdrian Kummerlaender2020-01-16 22:21:00 +0100
commitdbe19deb0d42ee7c2359d951686c6100d4ec27b3 (patch)
tree5e4fac205870ec16e1445261f4ade672e2737a09 /lid_driven_cavity/opencl_gl_interop/ldc_2d.py
parent74392de73ae6c799486f34eccf5c2c37ff9187ea (diff)
downloadboltzgen_examples-dbe19deb0d42ee7c2359d951686c6100d4ec27b3.tar
boltzgen_examples-dbe19deb0d42ee7c2359d951686c6100d4ec27b3.tar.gz
boltzgen_examples-dbe19deb0d42ee7c2359d951686c6100d4ec27b3.tar.bz2
boltzgen_examples-dbe19deb0d42ee7c2359d951686c6100d4ec27b3.tar.lz
boltzgen_examples-dbe19deb0d42ee7c2359d951686c6100d4ec27b3.tar.xz
boltzgen_examples-dbe19deb0d42ee7c2359d951686c6100d4ec27b3.tar.zst
boltzgen_examples-dbe19deb0d42ee7c2359d951686c6100d4ec27b3.zip
Integrate SSS in Open(C,G)L interop example
Diffstat (limited to 'lid_driven_cavity/opencl_gl_interop/ldc_2d.py')
-rw-r--r--lid_driven_cavity/opencl_gl_interop/ldc_2d.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/lid_driven_cavity/opencl_gl_interop/ldc_2d.py b/lid_driven_cavity/opencl_gl_interop/ldc_2d.py
index ac8119b..6373a51 100644
--- a/lid_driven_cavity/opencl_gl_interop/ldc_2d.py
+++ b/lid_driven_cavity/opencl_gl_interop/ldc_2d.py
@@ -18,14 +18,18 @@ from pyrr import matrix44
geometry = Geometry(512, 512)
+precision = 'single'
+streaming = 'AA'
+
functions = ['collide_and_stream', 'equilibrilize', 'collect_moments', 'momenta_boundary']
extras = ['cell_list_dispatch', 'opencl_gl_interop']
-precision = 'single'
-streaming = 'AA'
+if streaming == 'SSS':
+ functions = functions + ['update_sss_control_structure']
import AA
import AB
+import SSS
def glut_window(fullscreen = False):
glutInit(sys.argv)
@@ -73,7 +77,10 @@ wall_cells = CellList(lattice.context, lattice.queue, lattice.float_type,
lid_cells = CellList(lattice.context, lattice.queue, lattice.float_type,
[ gid(x,y) for x, y in geometry.inner_cells() if y == geometry.size_y-2 ])
-if streaming == 'AB':
+if streaming == 'SSS':
+ lattice.schedule('equilibrilize', ghost_cells)
+
+if streaming in ['AB', 'SSS']:
lattice.schedule('collide_and_stream', bulk_cells)
lattice.schedule('velocity_momenta_boundary', wall_cells, numpy.array([0.0, 0.0], dtype=lattice.float_type[0]))
lattice.schedule('velocity_momenta_boundary', lid_cells, numpy.array([0.1, 0.0], dtype=lattice.float_type[0]))