aboutsummaryrefslogtreecommitdiff
path: root/makeBoundary
diff options
context:
space:
mode:
authorPaul Garlick <pgarlick@tourbillion-technology.com>2019-10-29 21:52:58 +0000
committerPaul Garlick <pgarlick@tourbillion-technology.com>2019-10-29 21:52:58 +0000
commit49f04a483e500af8b0e881c26778e0430b1bd4bd (patch)
tree3ffcdee164d9a7aa3097dd259276cef04334d3b4 /makeBoundary
parente5b8f01b57823c7acf94f3f6f1eabe43f481b02a (diff)
downloadfullSWOF-utils-49f04a483e500af8b0e881c26778e0430b1bd4bd.tar.gz
provide for zero index case.
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)