From 98b51d6c2ea8bec60e4fa121e57eae4a1297c4d9 Mon Sep 17 00:00:00 2001 From: Craig Warren Date: Thu, 4 Aug 2016 15:54:14 +0100 Subject: [PATCH] Added extra args to transmission line electric and magnetic updates. These are not required but makes the update functions match other sources. --- gprMax/sources.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gprMax/sources.py b/gprMax/sources.py index b893aca4..5e5edb9e 100644 --- a/gprMax/sources.py +++ b/gprMax/sources.py @@ -294,11 +294,13 @@ class TransmissionLine(Source): waveform = next(x for x in G.waveforms if x.ID == self.waveformID) self.current[self.srcpos - 1] += (c * G.dt / self.dl) * waveform.amp * waveform.calculate_value(time - 0.5 * G.dt, G.dt) * (1 / self.resistance) - def update_electric(self, abstime, Ex, Ey, Ez, G): + def update_electric(self, abstime, updatecoeffsE, ID, Ex, Ey, Ez, G): """Updates electric field value in the main grid from voltage value in the transmission line. Args: abstime (float): Absolute time. + updatecoeffsE (memory view): numpy array of electric field update coefficients. + ID (memory view): numpy array of numeric IDs corresponding to materials in the model. Ex, Ey, Ez (memory view): numpy array of electric field values. G (class): Grid class instance - holds essential parameters describing the model. """ @@ -321,11 +323,13 @@ class TransmissionLine(Source): elif self.polarisation is 'z': Ez[i, j, k] = - self.voltage[self.antpos] / G.dz - def update_magnetic(self, abstime, Hx, Hy, Hz, G): + def update_magnetic(self, abstime, updatecoeffsH, ID, Hx, Hy, Hz, G): """Updates current value in transmission line from magnetic field values in the main grid. Args: abstime (float): Absolute time. + updatecoeffsH (memory view): numpy array of magnetic field update coefficients. + ID (memory view): numpy array of numeric IDs corresponding to materials in the model. Hx, Hy, Hz (memory view): numpy array of magnetic field values. G (class): Grid class instance - holds essential parameters describing the model. """