aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Garlick <pgarlick@tourbillion-technology.com>2019-10-24 15:35:59 +0100
committerPaul Garlick <pgarlick@tourbillion-technology.com>2019-10-24 15:35:59 +0100
commit326411aa3c79b6fa2747227fca313c902f22f79c (patch)
tree746469011c86573e216a3f00cfc104b3408f91a4
parent7ae9b3c83fec4ed9b6bea082ab4d0d79ed9bc2d5 (diff)
downloadfullSWOF-utils-326411aa3c79b6fa2747227fca313c902f22f79c.tar.gz
move comments.
-rwxr-xr-xmakeBoundary.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/makeBoundary.py b/makeBoundary.py
index 3e2ebd0..0f98c91 100755
--- a/makeBoundary.py
+++ b/makeBoundary.py
@@ -136,16 +136,12 @@ numH = definition_dict["numH"] # number of height intervals
with open(height_data, "r") as topo:
xtp, ytp, ztp = np.loadtxt(topo, delimiter=' ', unpack=True)
-# domain extent in x-direction:
-xmax = (xtp[0]+xtp[-1])
-# domain extent in y-direction:
-ymax = (ytp[0]+ytp[-1])
-# number of cells in x-direction:
-ncols = int(math.sqrt(len(xtp)*xmax/ymax))
-# number of cells in y-direction:
-nrows = int(len(xtp)/ncols)
-# cell size
-dX = xmax/ncols
+
+xmax = (xtp[0]+xtp[-1]) # domain extent in x-direction
+ymax = (ytp[0]+ytp[-1]) # domain extent in y-direction
+ncols = int(math.sqrt(len(xtp)*xmax/ymax)) # number of cells in x-direction
+nrows = int(len(xtp)/ncols) # number of cells in y-direction
+dX = xmax/ncols # cell size
print('dX =', dX)
#print(ncols, nrows)