aboutsummaryrefslogtreecommitdiff
path: root/lid_driven_cavity/opencl/ldc_2d.py
diff options
context:
space:
mode:
Diffstat (limited to 'lid_driven_cavity/opencl/ldc_2d.py')
-rw-r--r--lid_driven_cavity/opencl/ldc_2d.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/lid_driven_cavity/opencl/ldc_2d.py b/lid_driven_cavity/opencl/ldc_2d.py
index 1ea80aa..8f9a0c3 100644
--- a/lid_driven_cavity/opencl/ldc_2d.py
+++ b/lid_driven_cavity/opencl/ldc_2d.py
@@ -20,10 +20,14 @@ functions = ['collide_and_stream', 'equilibrilize', 'collect_moments', 'momenta_
extras = ['cell_list_dispatch']
precision = 'single'
-streaming = 'AA'
+streaming = 'SSS'
+
+if streaming == 'SSS':
+ functions = functions + ['update_sss_control_structure']
-import AA
import AB
+import AA
+import SSS
Lattice = eval('%s.Lattice' % streaming)
@@ -60,7 +64,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]))