diff options
| -rwxr-xr-x | makeBoundary.py | 7 | 
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) | 
