diff --git a/gprMax/fractals.py b/gprMax/fractals.py index 25c2925b..cba5afa6 100644 --- a/gprMax/fractals.py +++ b/gprMax/fractals.py @@ -56,12 +56,8 @@ class FractalSurface(object): self.filldepth = 0 self.grass = [] - def generate_fractal_surface(self, G): - """Generate a 2D array with a fractal distribution. - - Args: - G (class): Grid class instance - holds essential parameters describing the model. - """ + def generate_fractal_surface(self): + """Generate a 2D array with a fractal distribution.""" if self.xs == self.xf: surfacedims = (self.ny + 1, self.nz + 1) @@ -134,12 +130,8 @@ class FractalVolume(object): self.nbins = 0 self.fractalsurfaces = [] - def generate_fractal_volume(self, G): - """Generate a 3D volume with a fractal distribution. - - Args: - G (class): Grid class instance - holds essential parameters describing the model. - """ + def generate_fractal_volume(self): + """Generate a 3D volume with a fractal distribution.""" self.fractalvolume = np.zeros((self.nx + 1, self.ny + 1, self.nz + 1), dtype=complextype) diff --git a/gprMax/input_cmds_geometry.py b/gprMax/input_cmds_geometry.py index 91dc10b7..06d1f88c 100644 --- a/gprMax/input_cmds_geometry.py +++ b/gprMax/input_cmds_geometry.py @@ -981,7 +981,7 @@ def process_geometrycmds(geometry, G): if surface.surfaceID in existingsurfaceIDs: raise CmdInputError("'" + ' '.join(tmp) + "'" + ' has already been used on the {} surface'.format(surface.surfaceID)) - surface.generate_fractal_surface(G) + surface.generate_fractal_surface() volume.fractalsurfaces.append(surface) if G.messages: @@ -1191,7 +1191,7 @@ def process_geometrycmds(geometry, G): # Set the fractal range to scale the fractal distribution between zero and one surface.fractalrange = (0, 1) surface.operatingonID = volume.ID - surface.generate_fractal_surface(G) + surface.generate_fractal_surface() if numblades > surface.fractalsurface.shape[0] * surface.fractalsurface.shape[1]: raise CmdInputError("'" + ' '.join(tmp) + "'" + ' the specified surface is not large enough for the number of grass blades/roots specified') @@ -1287,7 +1287,7 @@ def process_geometrycmds(geometry, G): materialnumID = next(x.numID for x in G.materials if x.ID == volume.operatingonID) volume.fractalvolume *= materialnumID else: - volume.generate_fractal_volume(G) + volume.generate_fractal_volume() volume.fractalvolume += mixingmodel.startmaterialnum volume.generate_volume_mask() @@ -1500,7 +1500,7 @@ def process_geometrycmds(geometry, G): if volume.nbins == 1: raise CmdInputError("'" + ' '.join(tmp) + "'" + ' is being used with a single material and no modifications, therefore please use a #box command instead.') else: - volume.generate_fractal_volume(G) + volume.generate_fractal_volume() volume.fractalvolume += mixingmodel.startmaterialnum data = volume.fractalvolume.astype('int16', order='C')