From 1e062c554376e16e442392a95e75b67c90177727 Mon Sep 17 00:00:00 2001 From: Paul Garlick Date: Thu, 24 Oct 2019 15:59:30 +0100 Subject: split long lines. --- makeBoundary.py | 7 +++++-- 1 file 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) -- cgit