aboutsummaryrefslogtreecommitdiff
path: root/lid_driven_cavity.py
diff options
context:
space:
mode:
Diffstat (limited to 'lid_driven_cavity.py')
-rw-r--r--lid_driven_cavity.py14
1 files changed, 0 insertions, 14 deletions
diff --git a/lid_driven_cavity.py b/lid_driven_cavity.py
index cfaf0ba..216ee87 100644
--- a/lid_driven_cavity.py
+++ b/lid_driven_cavity.py
@@ -134,7 +134,6 @@ class D2Q9_BGK_Lattice:
self.setup_geometry()
self.equilibrilize()
- #self.setup_anomaly()
self.cl_pop_a = cl.Buffer(self.context, mf.READ_WRITE | mf.USE_HOST_PTR, hostbuf=self.np_pop_a)
self.cl_pop_b = cl.Buffer(self.context, mf.READ_WRITE | mf.USE_HOST_PTR, hostbuf=self.np_pop_b)
@@ -165,19 +164,6 @@ class D2Q9_BGK_Lattice:
self.np_pop_b[(1,3,5,7),:] = 1./9.
self.np_pop_b[4,:] = 4./9.
- def setup_anomaly(self):
- bubbles = [ [ self.nX//4, self.nY//4],
- [ self.nX//4,self.nY-self.nY//4],
- [self.nX-self.nX//4, self.nY//4],
- [self.nX-self.nX//4,self.nY-self.nY//4] ]
-
- for x in range(0,self.nX-1):
- for y in range(0,self.nY-1):
- for [a,b] in bubbles:
- if numpy.sqrt((x-a)*(x-a)+(y-b)*(y-b)) < self.nX//10:
- self.np_pop_a[:,self.idx(x,y)] = 1./24.
- self.np_pop_b[:,self.idx(x,y)] = 1./24.
-
def build_kernel(self):
self.program = cl.Program(self.context, Template(kernel).substitute({
'nX' : self.nX,