aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Garlick <pgarlick@tourbillion-technology.com>2019-10-24 15:59:30 +0100
committerPaul Garlick <pgarlick@tourbillion-technology.com>2019-10-24 15:59:30 +0100
commit1e062c554376e16e442392a95e75b67c90177727 (patch)
tree3428b173bb296a546d8223922733f33f8b4303c8
parent9d670b192439e9319e25a2ba29422c689bff418f (diff)
downloadfullSWOF-utils-1e062c554376e16e442392a95e75b67c90177727.tar.gz
split long lines.
-rwxr-xr-xmakeBoundary.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/makeBoundary.py b/makeBoundary.py
index feb197b..bb6bfae 100755
--- a/makeBoundary.py
+++ b/makeBoundary.py
@@ -47,12 +47,15 @@ def conveyance(numH, n_co, xregion, zregion, zmin, zmax):
dA = 0
eps = 1e-06
for j in range(len(x_sub[i])-1):
- if abs(z_sub[i][j+1] - h_i[i]) > eps or abs(z_sub[i][j] - h_i[i]) > eps:
+ if (abs(z_sub[i][j+1] - h_i[i]) > eps
+ or abs(z_sub[i][j] - h_i[i]) > eps):
dp += np.hypot(x_sub[i][j+1] - x_sub[i][j],
abs(z_sub[i][j+1] - z_sub[i][j]))
#print(dp)
# calculate area using trapezium rule
- dA += (h_i[i] - (z_sub[i][j+1] + z_sub[i][j])/2)*(x_sub[i][j+1] - x_sub[i][j])
+ dA += (h_i[i]
+ - (z_sub[i][j+1] + z_sub[i][j])/2)\
+ *(x_sub[i][j+1] - x_sub[i][j])
#print('Area =', dA)
p_i.append(dp)