Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions gprMax/sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,23 +101,23 @@ def update_electric(self, iteration, updatecoeffsE, ID, Ex, Ey, Ez, G):
* self.waveformvalues_wholestep[iteration]
* (1 / (self.resistance * G.dy * G.dz)))
else:
Ex[i, j, k] = - self.waveformvalues_halfstep[iteration] / G.dx
Ex[i, j, k] = - self.waveformvalues_wholestep[iteration] / G.dx

elif self.polarisation == 'y':
if self.resistance != 0:
Ey[i, j, k] -= (updatecoeffsE[ID[G.IDlookup[componentID], i, j, k], 4]
* self.waveformvalues_wholestep[iteration]
* (1 / (self.resistance * G.dx * G.dz)))
else:
Ey[i, j, k] = - self.waveformvalues_halfstep[iteration] / G.dy
Ey[i, j, k] = - self.waveformvalues_wholestep[iteration] / G.dy

elif self.polarisation == 'z':
if self.resistance != 0:
Ez[i, j, k] -= (updatecoeffsE[ID[G.IDlookup[componentID], i, j, k], 4]
* self.waveformvalues_wholestep[iteration]
* (1 / (self.resistance * G.dx * G.dy)))
else:
Ez[i, j, k] = - self.waveformvalues_halfstep[iteration] / G.dz
Ez[i, j, k] = - self.waveformvalues_wholestep[iteration] / G.dz

def create_material(self, G):
"""Create a new material at the voltage source location that adds the
Expand Down Expand Up @@ -272,7 +272,7 @@ def gpu_initialise_src_arrays(sources, G):
srcwaves[i, :] = src.waveformvalues_wholestep
else:
srcinfo2[i] = 0
srcwaves[i, :] = src.waveformvalues_halfstep
srcwaves[i, :] = src.waveformvalues_wholestep
elif src.__class__.__name__ == 'MagneticDipole':
srcwaves[i, :] = src.waveformvalues_halfstep

Expand Down Expand Up @@ -449,4 +449,4 @@ def update_magnetic(self, iteration, updatecoeffsH, ID, Hx, Hy, Hz, G):
self.current[self.antpos] = Iy(i, j, k, G.Hx, G.Hy, G.Hz, G)

elif self.polarisation == 'z':
self.current[self.antpos] = Iz(i, j, k, G.Hx, G.Hy, G.Hz, G)
self.current[self.antpos] = Iz(i, j, k, G.Hx, G.Hy, G.Hz, G)