From fa93f1f246e340512ecfe1d0112d031dbad61c3f Mon Sep 17 00:00:00 2001 From: Craig Warren Date: Mon, 13 Mar 2017 13:52:31 +0000 Subject: [PATCH] Improved some comments. --- gprMax/geometry_outputs.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gprMax/geometry_outputs.py b/gprMax/geometry_outputs.py index 0820e1f3..c85e6eff 100644 --- a/gprMax/geometry_outputs.py +++ b/gprMax/geometry_outputs.py @@ -303,6 +303,8 @@ class GeometryObjects(object): self.nz = self.zf - self.zs self.filename = basefilename + '.h5' self.materialsfilename = basefilename + '_materials.txt' + + # Sizes of arrays to write necessary to update progress bar self.solidsize = (self.nx + 1) * (self.ny + 1) * (self.nz + 1) * np.dtype(np.int16).itemsize self.rigidsize = 18 * (self.nx + 1) * (self.ny + 1) * (self.nz + 1) * np.dtype(np.int8).itemsize self.IDsize = 6 * (self.nx + 1) * (self.ny + 1) * (self.nz + 1) * np.dtype(np.uint32).itemsize @@ -334,7 +336,7 @@ class GeometryObjects(object): pbar.update(self.IDsize) # Write materials list to a text file - # This includes all materials in range whether used in volume or not; also append a 6-digit random number to the material ID to make it unique + # This includes all materials in range whether used in volume or not fmaterials = open(os.path.abspath(os.path.join(G.inputdirectory, self.materialsfilename)), 'w') for numID in range(minmat, maxmat + 1): for material in G.materials: