diff options
author | Paul Garlick <pgarlick@tourbillion-technology.com> | 2019-10-16 19:14:37 +0100 |
---|---|---|
committer | Paul Garlick <pgarlick@tourbillion-technology.com> | 2019-10-16 19:14:37 +0100 |
commit | ddc3133d494ba4f57ee1ed2558bd56a2d6123f61 (patch) | |
tree | 69f8bb14abde399c536b39e5b745badb235c8a33 | |
parent | 3772692e0aacbda2c0791da71b3924ded205e293 (diff) | |
download | fullSWOF-utils-ddc3133d494ba4f57ee1ed2558bd56a2d6123f61.tar.gz |
identify insertion index for level in part-filled panel.
-rwxr-xr-x | makeBoundary.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/makeBoundary.py b/makeBoundary.py index 19ba37e..86b2955 100755 --- a/makeBoundary.py +++ b/makeBoundary.py @@ -226,8 +226,11 @@ print(total_flow) ind_p = bisect.bisect(total_flow, target_flow) print(ind_p) -# find insertion point for target flow value -ind_q = bisect.bisect(Q_i_west, target_flow_west) +# calculate target flow in part-filled panel: +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) print(ind_q) # find height at target flow by linear interpolation |