mirror of
https://github.com/smyalygames/FiniteVolumeGPU.git
synced 2026-01-14 15:48:43 +01:00
Fixed general MPI framework
This commit is contained in:
@@ -68,6 +68,7 @@ class FORCE (Simulator.BaseSimulator):
|
||||
nx, ny,
|
||||
dx, dy,
|
||||
cfl_scale,
|
||||
1,
|
||||
block_width, block_height)
|
||||
self.g = np.float32(g)
|
||||
self.boundary_conditions = boundary_conditions.asCodedInt()
|
||||
@@ -101,7 +102,7 @@ class FORCE (Simulator.BaseSimulator):
|
||||
dt = min(dt_x, dt_y)
|
||||
self.cfl_data.fill(dt, stream=self.stream)
|
||||
|
||||
def step(self, dt):
|
||||
def substep(self, dt, step_number):
|
||||
self.kernel.prepared_async_call(self.grid_size, self.block_size, self.stream,
|
||||
self.nx, self.ny,
|
||||
self.dx, self.dy, dt,
|
||||
@@ -115,8 +116,6 @@ class FORCE (Simulator.BaseSimulator):
|
||||
self.u1[2].data.gpudata, self.u1[2].data.strides[0],
|
||||
self.cfl_data.gpudata)
|
||||
self.u0, self.u1 = self.u1, self.u0
|
||||
self.t += dt
|
||||
self.nt += 1
|
||||
|
||||
def download(self):
|
||||
return self.u0.download(self.stream)
|
||||
@@ -127,4 +126,4 @@ class FORCE (Simulator.BaseSimulator):
|
||||
|
||||
def computeDt(self):
|
||||
max_dt = gpuarray.min(self.cfl_data, stream=self.stream).get();
|
||||
return max_dt*0.5
|
||||
return max_dt
|
||||
Reference in New Issue
Block a user