Skip to content
Snippets Groups Projects
Commit 1c28ced7 authored by Rafael Ravedutti's avatar Rafael Ravedutti
Browse files

Remove UpdateGhostParticles

parent 8af8635a
No related branches found
No related tags found
No related merge requests found
...@@ -46,7 +46,7 @@ class DetermineGhostParticles(Lowerable): ...@@ -46,7 +46,7 @@ class DetermineGhostParticles(Lowerable):
n = AtomicAdd(self.sim, nsend_all, 1) n = AtomicAdd(self.sim, nsend_all, 1)
send_map[n].set(i) send_map[n].set(i)
for d in self.sim.ndims(): for d in self.sim.ndims():
send_mult[n][dim].set(pbc[d]) send_mult[n][d].set(pbc[d])
self.nsend[nb_rank_id].add(1) self.nsend[nb_rank_id].add(1)
nb_rank_id += 1 nb_rank_id += 1
...@@ -118,30 +118,6 @@ class UnpackGhostParticles(Lowerable): ...@@ -118,30 +118,6 @@ class UnpackGhostParticles(Lowerable):
p_offset += 1 p_offset += 1
class UpdateGhostParticles(Lowerable):
def __init__(self, sim, comm):
super().__init__(sim)
self.comm = comm
@pairs_device_block
def lower(self):
sim = self.sim
ndims = sim.ndims()
grid = self.sim.grid
nghost = self.comm.nghost
ghost_map = self.comm.ghost_map
ghost_mult = self.comm.ghost_mult
positions = self.sim.position()
nlocal = self.sim.nlocal
sim.module_name("update_ghost_particles")
for i in For(sim, 0, nghost):
# TODO: allow syntax:
# positions[nlocal + i].set(positions[ghost_map[i]] + ghost_mult[i] * grid.length)
for d in range(0, ndims):
positions[nlocal + i][d].set(positions[ghost_map[i]][d] + ghost_mult[i][d] * grid.length(d))
class ExchangeParticles(Lowerable): class ExchangeParticles(Lowerable):
def __init__(self, sim, comm): def __init__(self, sim, comm):
super().__init__(sim) super().__init__(sim)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment