From b632946d54473c873ddd0635cc79dddb3eb7adce Mon Sep 17 00:00:00 2001 From: Craig Warren Date: Tue, 21 Feb 2017 12:50:55 +0000 Subject: [PATCH] Formatting cleanups. --- gprMax/pml.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/gprMax/pml.py b/gprMax/pml.py index ce2bd622..95ec1107 100644 --- a/gprMax/pml.py +++ b/gprMax/pml.py @@ -16,15 +16,12 @@ # You should have received a copy of the GNU General Public License # along with gprMax. If not, see . -from collections import OrderedDict from importlib import import_module import numpy as np from tqdm import tqdm from gprMax.constants import e0, z0, floattype -import gprMax.pml_1order_update -import gprMax.pml_2order_update class CFSParameter(object): @@ -98,7 +95,7 @@ class CFS(object): tmp = (np.linspace(0, (len(Evalues) - 1) + 0.5, num=2 * len(Evalues)) / (len(Evalues) - 1)) ** order Evalues = tmp[0:-1:2] Hvalues = tmp[1::2] - + return Evalues, Hvalues def calculate_values(self, thickness, parameter): @@ -141,9 +138,9 @@ class CFS(object): class PML(object): """PML - the implementation comes from the derivation in: http://dx.doi.org/10.1109/TAP.2011.2180344""" - # IDs for default PML slabs at boundaries of domain + # PML slabs IDs at boundaries of domain. boundaryIDs = ['x0', 'y0', 'z0', 'xmax', 'ymax', 'zmax'] - + # Indicates direction of increasing absorption # xminus, yminus, zminus - absorption increases in negative direction of x-axis, y-axis, or z-axis # xplus, yplus, zplus - absorption increases in positive direction of x-axis, y-axis, or z-axis @@ -170,8 +167,7 @@ class PML(object): self.ny = yf - ys self.nz = zf - zs - # Spatial discretisation and thickness - # (one extra cell of thickness required for interpolation of electric and magnetic scaling values) + # Spatial discretisation and thickness (one extra cell of thickness required for interpolation of electric and magnetic scaling values) if self.direction[0] == 'x': self.d = G.dx self.thickness = self.nx + 1