aboutsummaryrefslogtreecommitdiff
path: root/makeBoundary
diff options
context:
space:
mode:
Diffstat (limited to 'makeBoundary')
-rwxr-xr-xmakeBoundary5
1 files changed, 4 insertions, 1 deletions
diff --git a/makeBoundary b/makeBoundary
index fbb99f0..cf2ad12 100755
--- a/makeBoundary
+++ b/makeBoundary
@@ -294,7 +294,10 @@ ind_p = bisect.bisect(total_flow, target_flow)
print('index of part-filled panel:', ind_p)
# calculate target flow in part-filled panel:
-panel_target_flow = target_flow - total_flow[ind_p-1]
+if ind_p == 0:
+ panel_target_flow = target_flow
+else:
+ panel_target_flow = target_flow - total_flow[ind_p-1]
# find insertion point for target flow value:
ind_q = bisect.bisect(Q_i[panel[ind_p]], panel_target_flow)