From 326411aa3c79b6fa2747227fca313c902f22f79c Mon Sep 17 00:00:00 2001 From: Paul Garlick Date: Thu, 24 Oct 2019 15:35:59 +0100 Subject: move comments. --- makeBoundary.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'makeBoundary.py') 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) -- cgit