Skip to content

Commit 979c7b6

Browse files
committed
fix: update_mpi needs only zmin as argument, not vector z
1 parent a41fc1f commit 979c7b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wakis/sources.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ def update(self, solver, t):
6161
# update
6262
solver.J[self.ixs,self.iys,:,'z'] = self.q*self.v*profile/solver.dx/solver.dy
6363

64-
def update_mpi(self, solver, t, zmin, z):
64+
def update_mpi(self, solver, t, zmin):
6565
if self.is_first_update:
6666
self.ixs, self.iys = np.abs(solver.x-self.xsource).argmin(), np.abs(solver.y-self.ysource).argmin()
6767
self.is_first_update = False
6868
# reference shift
6969
s0 = zmin - self.v*self.ti
70-
s = z - self.v*t
70+
s = solver.z - self.v*t
7171
# gaussian
7272
profile = 1/np.sqrt(2*np.pi*self.sigmaz**2)*np.exp(-(s-s0)**2/(2*self.sigmaz**2))
7373
# update

0 commit comments

Comments
 (0)