![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
The geometry layer itself, parameterized on where its tables live. More...
#include <XSectKernels.hpp>
Public Member Functions | |
| template<class Func> | |
| OPENSWMM_KERNEL_FN int | findroot_Newton (double x1, double x2, double *rts, double xacc, Func func) const |
| Find a bracketed scalar root with safeguarded Newton/bisection iterations. | |
| template<class Func> | |
| OPENSWMM_KERNEL_FN double | findroot_Ridder (double x1, double x2, double xacc, Func func) const |
| Find a sign-bracketed scalar root using Ridder iterations. | |
| OPENSWMM_KERNEL_FN int | locate (double y, const double *table, int jLast) const |
| Find a lower interpolation bracket through shared legacy bisection. | |
| OPENSWMM_KERNEL_FN double | lookup (double x, const double *table, int n_items) const |
| Interpolate normalized geometry with guarded endpoints and exact legacy arithmetic. | |
| OPENSWMM_KERNEL_FN double | invLookup (double y, const double *table, int n_items, const LocateLut *lut=nullptr) const |
| Invert normalized geometry with legacy upper-branch handling. | |
| OPENSWMM_KERNEL_FN double | getThetaOfAlpha (double alpha) const |
| Compute the circular angle from normalized area. | |
| OPENSWMM_KERNEL_FN double | getThetaOfPsi (double psi) const |
| Compute the circular angle from normalized section factor. | |
| OPENSWMM_KERNEL_FN double | getYcircular (double alpha) const |
| Compute the circular normalized depth from area. | |
| OPENSWMM_KERNEL_FN double | getScircular (double alpha) const |
| Compute the circular normalized section factor from area. | |
| OPENSWMM_KERNEL_FN double | getAcircular (double psi) const |
| Compute the circular normalized area from section factor. | |
| OPENSWMM_KERNEL_FN double | generic_getdSdA (const XSectParams &xs, double a) const |
| Estimate section-factor derivative with a centered normalized-area difference. | |
| OPENSWMM_KERNEL_FN double | tabular_getdSdA (const XSectParams &xs, double a, const double *table, int n_items) const |
| Differentiate the local normalized section-factor table segment. | |
| OPENSWMM_KERNEL_FN double | circ_getAofY (const XSectParams &xs, double y) const |
| Compute circular wetted area from depth. | |
| OPENSWMM_KERNEL_FN double | circ_getYofA (const XSectParams &xs, double a) const |
| Compute circular water depth from wetted area. | |
| OPENSWMM_KERNEL_FN double | circ_getSofA (const XSectParams &xs, double a) const |
| Compute circular section factor from area. | |
| OPENSWMM_KERNEL_FN double | circ_getAofS (const XSectParams &xs, double s) const |
| Compute circular area from section factor. | |
| OPENSWMM_KERNEL_FN double | circ_getdSdA (const XSectParams &xs, double a) const |
| Compute circular section-factor derivative with respect to area. | |
| OPENSWMM_KERNEL_FN double | filled_circ_getAofY (const XSectParams &xs, double y) const |
| Compute sediment-filled circular wetted area from depth. | |
| OPENSWMM_KERNEL_FN double | filled_circ_getYofA (const XSectParams &xs, double a) const |
| Compute sediment-filled circular water depth from wetted area. | |
| OPENSWMM_KERNEL_FN double | filled_circ_getRofY (const XSectParams &xs, double y) const |
| Compute sediment-filled circular hydraulic radius from depth. | |
| OPENSWMM_KERNEL_FN double | rect_closed_getRofA (const XSectParams &xs, double a) const |
| Compute closed rectangular hydraulic radius from area. | |
| OPENSWMM_KERNEL_FN double | rect_closed_getSofA (const XSectParams &xs, double a) const |
| Compute closed rectangular section factor from area. | |
| OPENSWMM_KERNEL_FN double | rect_closed_getdSdA (const XSectParams &xs, double a) const |
| Compute closed rectangular section-factor derivative with respect to area. | |
| OPENSWMM_KERNEL_FN double | rect_open_getSofA (const XSectParams &xs, double a) const |
| Compute open rectangular section factor from area. | |
| OPENSWMM_KERNEL_FN double | rect_open_getdSdA (const XSectParams &xs, double a) const |
| Compute open rectangular section-factor derivative with respect to area. | |
| OPENSWMM_KERNEL_FN double | rect_triang_getAofY (const XSectParams &xs, double y) const |
| Compute triangular-invert rectangular wetted area from depth. | |
| OPENSWMM_KERNEL_FN double | rect_triang_getWofY (const XSectParams &xs, double y) const |
| Compute triangular-invert rectangular top width from depth. | |
| OPENSWMM_KERNEL_FN double | rect_triang_getYofA (const XSectParams &xs, double a) const |
| Compute triangular-invert rectangular water depth from wetted area. | |
| OPENSWMM_KERNEL_FN double | rect_triang_getRofA (const XSectParams &xs, double a) const |
| Compute triangular-invert rectangular hydraulic radius from area. | |
| OPENSWMM_KERNEL_FN double | rect_triang_getRofY (const XSectParams &xs, double y) const |
| Compute triangular-invert rectangular hydraulic radius from depth. | |
| OPENSWMM_KERNEL_FN double | rect_triang_getSofA (const XSectParams &xs, double a) const |
| Compute triangular-invert rectangular section factor from area. | |
| OPENSWMM_KERNEL_FN double | rect_triang_getdSdA (const XSectParams &xs, double a) const |
| Compute triangular-invert rectangular section-factor derivative with respect to area. | |
| OPENSWMM_KERNEL_FN double | rect_round_getYofA (const XSectParams &xs, double a) const |
| Compute circular-invert rectangular water depth from wetted area. | |
| OPENSWMM_KERNEL_FN double | rect_round_getAofY (const XSectParams &xs, double y) const |
| Compute circular-invert rectangular wetted area from depth. | |
| OPENSWMM_KERNEL_FN double | rect_round_getWofY (const XSectParams &xs, double y) const |
| Compute circular-invert rectangular top width from depth. | |
| OPENSWMM_KERNEL_FN double | rect_round_getRofA (const XSectParams &xs, double a) const |
| Compute circular-invert rectangular hydraulic radius from area. | |
| OPENSWMM_KERNEL_FN double | rect_round_getRofY (const XSectParams &xs, double y) const |
| Compute circular-invert rectangular hydraulic radius from depth. | |
| OPENSWMM_KERNEL_FN double | rect_round_getSofA (const XSectParams &xs, double a) const |
| Compute circular-invert rectangular section factor from area. | |
| OPENSWMM_KERNEL_FN double | rect_round_getdSdA (const XSectParams &xs, double a) const |
| Compute circular-invert rectangular section-factor derivative with respect to area. | |
| OPENSWMM_KERNEL_FN double | mod_basket_getYofA (const XSectParams &xs, double a) const |
| Compute modified baskethandle water depth from wetted area. | |
| OPENSWMM_KERNEL_FN double | mod_basket_getAofY (const XSectParams &xs, double y) const |
| Compute modified baskethandle wetted area from depth. | |
| OPENSWMM_KERNEL_FN double | mod_basket_getWofY (const XSectParams &xs, double y) const |
| Compute modified baskethandle top width from depth. | |
| OPENSWMM_KERNEL_FN double | mod_basket_getRofA (const XSectParams &xs, double a) const |
| Compute modified baskethandle hydraulic radius from area. | |
| OPENSWMM_KERNEL_FN double | mod_basket_getdSdA (const XSectParams &xs, double a) const |
| Compute modified baskethandle section-factor derivative with respect to area. | |
| OPENSWMM_KERNEL_FN double | trapez_getAofY (const XSectParams &xs, double y) const |
| Compute trapezoidal wetted area from depth. | |
| OPENSWMM_KERNEL_FN double | trapez_getWofY (const XSectParams &xs, double y) const |
| Compute trapezoidal top width from depth. | |
| OPENSWMM_KERNEL_FN double | trapez_getYofA (const XSectParams &xs, double a) const |
| Compute trapezoidal water depth from wetted area. | |
| OPENSWMM_KERNEL_FN double | trapez_getRofA (const XSectParams &xs, double a) const |
| Compute trapezoidal hydraulic radius from area. | |
| OPENSWMM_KERNEL_FN double | trapez_getRofY (const XSectParams &xs, double y) const |
| Compute trapezoidal hydraulic radius from depth. | |
| OPENSWMM_KERNEL_FN double | trapez_getdSdA (const XSectParams &xs, double a) const |
| Compute trapezoidal section-factor derivative with respect to area. | |
| OPENSWMM_KERNEL_FN double | triang_getAofY (const XSectParams &xs, double y) const |
| Compute triangular wetted area from depth. | |
| OPENSWMM_KERNEL_FN double | triang_getWofY (const XSectParams &xs, double y) const |
| Compute triangular top width from depth. | |
| OPENSWMM_KERNEL_FN double | triang_getYofA (const XSectParams &xs, double a) const |
| Compute triangular water depth from wetted area. | |
| OPENSWMM_KERNEL_FN double | triang_getRofA (const XSectParams &xs, double a) const |
| Compute triangular hydraulic radius from area. | |
| OPENSWMM_KERNEL_FN double | triang_getRofY (const XSectParams &xs, double y) const |
| Compute triangular hydraulic radius from depth. | |
| OPENSWMM_KERNEL_FN double | triang_getdSdA (const XSectParams &xs, double a) const |
| Compute triangular section-factor derivative with respect to area. | |
| OPENSWMM_KERNEL_FN double | parab_getAofY (const XSectParams &xs, double y) const |
| Compute parabolic wetted area from depth. | |
| OPENSWMM_KERNEL_FN double | parab_getWofY (const XSectParams &xs, double y) const |
| Compute parabolic top width from depth. | |
| OPENSWMM_KERNEL_FN double | parab_getYofA (const XSectParams &xs, double a) const |
| Compute parabolic water depth from wetted area. | |
| OPENSWMM_KERNEL_FN double | parab_getPofY (const XSectParams &xs, double y) const |
| Compute parabolic wetted perimeter from depth. | |
| OPENSWMM_KERNEL_FN double | parab_getRofY (const XSectParams &xs, double y) const |
| Compute parabolic hydraulic radius from depth. | |
| OPENSWMM_KERNEL_FN double | parab_getRofA (const XSectParams &xs, double a) const |
| Compute parabolic hydraulic radius from area. | |
| OPENSWMM_KERNEL_FN double | powerfunc_getAofY (const XSectParams &xs, double y) const |
| Compute power-function wetted area from depth. | |
| OPENSWMM_KERNEL_FN double | powerfunc_getWofY (const XSectParams &xs, double y) const |
| Compute power-function top width from depth. | |
| OPENSWMM_KERNEL_FN double | powerfunc_getYofA (const XSectParams &xs, double a) const |
| Compute power-function water depth from wetted area. | |
| OPENSWMM_KERNEL_FN double | powerfunc_getPofY (const XSectParams &xs, double y) const |
| Compute power-function wetted perimeter from depth. | |
| OPENSWMM_KERNEL_FN double | powerfunc_getRofY (const XSectParams &xs, double y) const |
| Compute power-function hydraulic radius from depth. | |
| OPENSWMM_KERNEL_FN double | powerfunc_getRofA (const XSectParams &xs, double a) const |
| Compute power-function hydraulic radius from area. | |
| OPENSWMM_KERNEL_FN double | getAofY (const XSectParams &xs, double y) const |
| Dispatch native wetted area from depth. | |
| OPENSWMM_KERNEL_FN double | getWofY (const XSectParams &xs, double y) const |
| Dispatch native top width from depth. | |
| OPENSWMM_KERNEL_FN double | getRofY (const XSectParams &xs, double y) const |
| Dispatch native hydraulic radius from depth. | |
| OPENSWMM_KERNEL_FN double | getYofA (const XSectParams &xs, double a) const |
| Dispatch native water depth from wetted area. | |
| OPENSWMM_KERNEL_FN double | getSofA (const XSectParams &xs, double a) const |
| Dispatch native section factor from area. | |
| OPENSWMM_KERNEL_FN double | getRofA (const XSectParams &xs, double a) const |
| Dispatch native hydraulic radius from area. | |
| OPENSWMM_KERNEL_FN double | getdSdA (const XSectParams &xs, double a) const |
| Dispatch the native section-factor derivative by shape. | |
| OPENSWMM_KERNEL_FN double | getAofS (const XSectParams &xs, double s) const |
| Invert native section factor to wetted area. | |
| OPENSWMM_KERNEL_FN double | getAmax (const XSectParams &xs) const |
| Read the built-in ratio of area at maximum conveyance to full area. | |
| OPENSWMM_KERNEL_FN double | getYcrit (const XSectParams &xs, double q) const |
| Compute critical depth for a nonnegative native discharge. | |
| OPENSWMM_KERNEL_FN bool | isOpen (int type) const |
| Classify kernel section types using the legacy open-shape set. | |
Public Attributes | |
| XsectTables | tbl |
The geometry layer itself, parameterized on where its tables live.
Every function is a non-static member so it can reach tbl without threading an extra argument through ~70 call sites — which is what keeps the moved bodies textually identical to the originals.
|
inline |
Compute circular area from section factor.
Uses normalized built-in circular tables and small-area angle formulas (alpha<0.04). Section-factor inverse returns full area for psi>=1; derivative returns1e-30 at alpha<=1e-30. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | s | Finite nonnegative section factor ft^(8/3), within the intended inverse branch. |
|
inline |
Compute circular wetted area from depth.
Uses normalized built-in circular tables and small-area angle formulas (alpha<0.04). Section-factor inverse returns full area for psi>=1; derivative returns1e-30 at alpha<=1e-30. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | y | Finite nonnegative water depth in ft; caller keeps input within the intended geometric branch. |
|
inline |
Compute circular section-factor derivative with respect to area.
Uses normalized built-in circular tables and small-area angle formulas (alpha<0.04). Section-factor inverse returns full area for psi>=1; derivative returns1e-30 at alpha<=1e-30. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Compute circular section factor from area.
Uses normalized built-in circular tables and small-area angle formulas (alpha<0.04). Section-factor inverse returns full area for psi>=1; derivative returns1e-30 at alpha<=1e-30. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Compute circular water depth from wetted area.
Uses normalized built-in circular tables and small-area angle formulas (alpha<0.04). Section-factor inverse returns full area for psi>=1; derivative returns1e-30 at alpha<=1e-30. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Compute sediment-filled circular wetted area from depth.
Temporarily expands a local section copy to the original full circle, then removes stored sediment area/depth/perimeter contributions. xs.y_bot/a_bot/s_bot/r_bot are sediment depth/area/width/perimeter; original xs is unchanged. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | y | Finite nonnegative water depth in ft; caller keeps input within the intended geometric branch. |
|
inline |
Compute sediment-filled circular hydraulic radius from depth.
Temporarily expands a local section copy to the original full circle, then removes stored sediment area/depth/perimeter contributions. xs.y_bot/a_bot/s_bot/r_bot are sediment depth/area/width/perimeter; original xs is unchanged. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | y | Finite nonnegative water depth in ft; caller keeps input within the intended geometric branch. |
|
inline |
Compute sediment-filled circular water depth from wetted area.
Temporarily expands a local section copy to the original full circle, then removes stored sediment area/depth/perimeter contributions. xs.y_bot/a_bot/s_bot/r_bot are sediment depth/area/width/perimeter; original xs is unchanged. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Find a bracketed scalar root with safeguarded Newton/bisection iterations.
Uses up to60 iterations and can stop on floating-point stagnation. Does not verify endpoint signs, finite values or residual tolerance; callback exceptions propagate in host builds. No allocation by the root routine.
| [in] | x1 | Lower sign-bracket endpoint with negative residual, in independent-variable units. |
| [in] | x2 | Upper sign-bracket endpoint with positive residual; caller establishes bracket orientation. |
| [in,out] | rts | Non-NULL initial guess in bracket, replaced by final candidate even on exhaustion. |
| [in] | xacc | Positive absolute step tolerance in independent-variable units. |
| [in] | func | Copied synchronous callable func(x,double* residual,double* derivative); must fill both outputs and remain callable from the selected execution space. |
|
inline |
Find a sign-bracketed scalar root using Ridder iterations.
Uses at most60 iterations; may return the last candidate on exhaustion/degenerate update without a separate convergence flag. Does not validate finiteness/bracket width; no allocation.
| [in] | x1 | First finite bracket endpoint, in independent-variable units. |
| [in] | x2 | Second finite endpoint; residuals must have opposite signs unless an endpoint is a root. |
| [in] | xacc | Positive absolute independent-variable tolerance. |
| [in] | func | Copied synchronous residual callable double(x), valid in selected execution space. |
|
inline |
Estimate section-factor derivative with a centered normalized-area difference.
Samples alpha+-0.001, flooring only lower alpha0; upper sample can exceed full area. No allocation or finite/denominator validation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Compute the circular normalized area from section factor.
Nonpositive section-factor ratio returns0, >=1 returns1; <=1e-6 uses a small-flow approximation, otherwise angle inversion. No general finite/domain validation.
| [in] | psi | Finite positive section-factor/full-factor ratio on the intended circular branch. |
|
inline |
Read the built-in ratio of area at maximum conveyance to full area.
Requires a live26-entry Amax array for recognized code. This is a ratio, not the physical xs.a_bot maximum-area value used for custom/irregular inversion.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
|
inline |
Invert native section factor to wetted area.
s<=0 and DUMMY return0. Local s caps at s_max, but normalized psi is computed BEFORE that cap for direct S-table branches. Other shapes use bracketed Newton with0.0001*a_full tolerance and ignore its convergence return. Caller supplies finite supported geometry. Referenced built-in/section tables are borrowed and must remain accessible for this evaluator's execution space.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | s | Finite native section factor ft^(8/3). |
|
inline |
Dispatch native wetted area from depth.
Returns0 for y<=0, nonpositive full depth, missing optional area table or unsupported type. Tabulated branches hold endpoints; analytic open shapes can extend beyond full depth. Referenced built-in/section tables are borrowed and must remain accessible for this evaluator's execution space.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | y | Finite nonnegative water depth in ft; caller keeps input within the intended geometric branch. |
|
inline |
Dispatch the native section-factor derivative by shape.
Selects circular/table-segment/analytic crown derivative, otherwise finite difference. Nonnegative finite area and valid material/table scalings are caller preconditions; no global small/invalid-input guard. Referenced built-in/section tables are borrowed and must remain accessible for this evaluator's execution space.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Dispatch native hydraulic radius from area.
a<=0 returns0. Shape-specific formulas or depth lookup are preferred; generic table-S shapes invert (S/A)^(3/2), with tiny-value guards. Unsupported/DUMMY positive area can recurse and is outside the valid domain. Referenced built-in/section tables are borrowed and must remain accessible for this evaluator's execution space.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Dispatch native hydraulic radius from depth.
Uses direct radius tables/formulas or area-derived radius. Missing optional radius table returns0. Positive full depth is required; unsupported/DUMMY positive-area radius routes are not a valid query domain. Referenced built-in/section tables are borrowed and must remain accessible for this evaluator's execution space.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | y | Finite nonnegative water depth in ft; caller keeps input within the intended geometric branch. |
|
inline |
Compute the circular normalized section factor from area.
Nonpositive area returns0, >=1 returns1; <=1e-5 uses a small-angle power approximation, otherwise theta expression. No general finite/domain validation.
| [in] | alpha | Finite positive area/full-area ratio on the intended circular branch, normally<=1. |
|
inline |
Dispatch native section factor from area.
Uses direct normalized S tables, special crown corrections or A*R^(2/3). Generic branch returns0 for a==0 or radius<TINY. Valid initialized non-DUMMY supported shape is required for generic radius recursion. Referenced built-in/section tables are borrowed and must remain accessible for this evaluator's execution space.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Compute the circular angle from normalized area.
Solves theta-sin(theta)=2*pi*alpha with up to40 Newton updates; when |d|<=0.0001 returns iterate, otherwise original empirical guess. Positive Newton correction alone caps at1. No general finite/domain validation.
| [in] | alpha | Finite positive area/full-area ratio on the intended circular branch, normally<=1. |
|
inline |
Compute the circular angle from normalized section factor.
Uses piecewise initial guess and up to40 Newton updates for normalized section factor; nonconvergence returns original guess, with no status flag. No general finite/domain validation.
| [in] | psi | Finite positive section-factor/full-factor ratio on the intended circular branch. |
|
inline |
Dispatch native top width from depth.
No universal nonpositive-depth guard: each shape supplies its branch behavior. Closed rectangle returns0 only at exact normalized crown1; optional missing width table/unsupported type returns0. Referenced built-in/section tables are borrowed and must remain accessible for this evaluator's execution space.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | y | Finite nonnegative water depth in ft; caller keeps input within the intended geometric branch. |
|
inline |
Compute the circular normalized depth from area.
Nonpositive area ratio returns0, >=1 returns1; <=1e-5 uses cubic small-area approximation, otherwise angle inversion. No general finite/domain validation.
| [in] | alpha | Finite positive area/full-area ratio on the intended circular branch, normally<=1. |
|
inline |
Compute critical depth for a nonnegative native discharge.
q<=0, underflowed q2/g or DUMMY returns0. Rectangular/triangle/parabola/power shapes use analytic expressions; others enumerate25 depth intervals or use Ridder tolerance0.001ft. Root failures are not separately status-coded; valid positive full geometry and finite q2 are required. Referenced built-in/section tables are borrowed and must remain accessible for this evaluator's execution space.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | q | Finite native cfs discharge; negative treated as zero, not absolute flow. |
|
inline |
Dispatch native water depth from wetted area.
Returns0 for a<=0, missing optional area table or unsupported shape. Tabulated depth may use direct Y tables or inverse A tables; rectangular open area is divided by width without full-depth clamp. Referenced built-in/section tables are borrowed and must remain accessible for this evaluator's execution space.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Invert normalized geometry with legacy upper-branch handling.
Flat interpolation segment returns its lower coordinate. Map affects only bracketing, not arithmetic. No pointer/count/finite validation or allocation.
| [in] | y | Dependent table-unit value; finite values expected; result clamps normalized coordinate0..1. |
| [in] | table | Borrowed readable n_items entries, nondecreasing except optional two declining final section-factor rows. |
| [in] | n_items | Logical table count>=4. |
| [in] | lut | Optional borrowed map built for this table's actual truncated search extent; stale/mismatched content is invalid. |
|
inline |
Classify kernel section types using the legacy open-shape set.
Unknown codes and CUSTOM classify closed here; no table access.
| [in] | type | Kernel XSectShape code; storage XsectShape uses a different numbering. |
|
inline |
Find a lower interpolation bracket through shared legacy bisection.
No interpolation, mutation or map allocation.
| [in] | y | Query in table units; endpoint holding and NaN-to0 index follow locate_bisect. |
| [in] | table | Borrowed readable nondecreasing indices0..jLast. |
| [in] | jLast | Nonnegative inclusive final index, caller-validated. |
|
inline |
Interpolate normalized geometry with guarded endpoints and exact legacy arithmetic.
x==1 deliberately uses legacy division/interpolation rather than unconditional endpoint return. Does not validate pointer/table values.
| [in] | x | Normalized coordinate; NaN/nonpositive selects table[0], >1 (including +inf) selects final entry. |
| [in] | table | Borrowed readable equally spaced n_items entries on0..1; at least4 for low-end quadratic refinement. |
| [in] | n_items | Logical table size>=4; unchecked. |
|
inline |
Compute modified baskethandle wetted area from depth.
xs.r_bot/y_bot/a_bot/s_bot describe the circular TOP radius/depth/area/opening angle, with rectangular lower portion. Circular void geometry is subtracted above the transition; derivative uses analytic lower or generic finite-difference branch. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | y | Finite nonnegative water depth in ft; caller keeps input within the intended geometric branch. |
|
inline |
Compute modified baskethandle section-factor derivative with respect to area.
xs.r_bot/y_bot/a_bot/s_bot describe the circular TOP radius/depth/area/opening angle, with rectangular lower portion. Circular void geometry is subtracted above the transition; derivative uses analytic lower or generic finite-difference branch. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Compute modified baskethandle hydraulic radius from area.
xs.r_bot/y_bot/a_bot/s_bot describe the circular TOP radius/depth/area/opening angle, with rectangular lower portion. Circular void geometry is subtracted above the transition; derivative uses analytic lower or generic finite-difference branch. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Compute modified baskethandle top width from depth.
xs.r_bot/y_bot/a_bot/s_bot describe the circular TOP radius/depth/area/opening angle, with rectangular lower portion. Circular void geometry is subtracted above the transition; derivative uses analytic lower or generic finite-difference branch. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | y | Finite nonnegative water depth in ft; caller keeps input within the intended geometric branch. |
|
inline |
Compute modified baskethandle water depth from wetted area.
xs.r_bot/y_bot/a_bot/s_bot describe the circular TOP radius/depth/area/opening angle, with rectangular lower portion. Circular void geometry is subtracted above the transition; derivative uses analytic lower or generic finite-difference branch. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Compute parabolic wetted area from depth.
xs.r_bot is positive inverse sqrt(parabola coefficient), units sqrt(ft). Perimeter is analytic logarithmic arc length; radius methods explicitly return0 for nonpositive input. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | y | Finite nonnegative water depth in ft; caller keeps input within the intended geometric branch. |
|
inline |
Compute parabolic wetted perimeter from depth.
xs.r_bot is positive inverse sqrt(parabola coefficient), units sqrt(ft). Perimeter is analytic logarithmic arc length; radius methods explicitly return0 for nonpositive input. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | y | Finite nonnegative water depth in ft; caller keeps input within the intended geometric branch. |
|
inline |
Compute parabolic hydraulic radius from area.
xs.r_bot is positive inverse sqrt(parabola coefficient), units sqrt(ft). Perimeter is analytic logarithmic arc length; radius methods explicitly return0 for nonpositive input. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Compute parabolic hydraulic radius from depth.
xs.r_bot is positive inverse sqrt(parabola coefficient), units sqrt(ft). Perimeter is analytic logarithmic arc length; radius methods explicitly return0 for nonpositive input. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | y | Finite nonnegative water depth in ft; caller keeps input within the intended geometric branch. |
|
inline |
Compute parabolic top width from depth.
xs.r_bot is positive inverse sqrt(parabola coefficient), units sqrt(ft). Perimeter is analytic logarithmic arc length; radius methods explicitly return0 for nonpositive input. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | y | Finite nonnegative water depth in ft; caller keeps input within the intended geometric branch. |
|
inline |
Compute parabolic water depth from wetted area.
xs.r_bot is positive inverse sqrt(parabola coefficient), units sqrt(ft). Perimeter is analytic logarithmic arc length; radius methods explicitly return0 for nonpositive input. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Compute power-function wetted area from depth.
xs.s_bot is positive depth exponent and r_bot positive coefficient; area inverse uses exponent1/(s_bot+1). Perimeter integrates side chords in depth increments0.02*y_full, so y_full must be positive to terminate; radius methods return0 for nonpositive input. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | y | Finite nonnegative water depth in ft; caller keeps input within the intended geometric branch. |
|
inline |
Compute power-function wetted perimeter from depth.
xs.s_bot is positive depth exponent and r_bot positive coefficient; area inverse uses exponent1/(s_bot+1). Perimeter integrates side chords in depth increments0.02*y_full, so y_full must be positive to terminate; radius methods return0 for nonpositive input. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | y | Finite nonnegative water depth in ft; caller keeps input within the intended geometric branch. |
|
inline |
Compute power-function hydraulic radius from area.
xs.s_bot is positive depth exponent and r_bot positive coefficient; area inverse uses exponent1/(s_bot+1). Perimeter integrates side chords in depth increments0.02*y_full, so y_full must be positive to terminate; radius methods return0 for nonpositive input. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Compute power-function hydraulic radius from depth.
xs.s_bot is positive depth exponent and r_bot positive coefficient; area inverse uses exponent1/(s_bot+1). Perimeter integrates side chords in depth increments0.02*y_full, so y_full must be positive to terminate; radius methods return0 for nonpositive input. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | y | Finite nonnegative water depth in ft; caller keeps input within the intended geometric branch. |
|
inline |
Compute power-function top width from depth.
xs.s_bot is positive depth exponent and r_bot positive coefficient; area inverse uses exponent1/(s_bot+1). Perimeter integrates side chords in depth increments0.02*y_full, so y_full must be positive to terminate; radius methods return0 for nonpositive input. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | y | Finite nonnegative water depth in ft; caller keeps input within the intended geometric branch. |
|
inline |
Compute power-function water depth from wetted area.
xs.s_bot is positive depth exponent and r_bot positive coefficient; area inverse uses exponent1/(s_bot+1). Perimeter integrates side chords in depth increments0.02*y_full, so y_full must be positive to terminate; radius methods return0 for nonpositive input. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Compute closed rectangular section-factor derivative with respect to area.
Width must be positive. Radius perimeter and section factor apply the RECT_ALFMAX crown transition; derivative follows its linear high-area branch and small-area numerical fallback. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Compute closed rectangular hydraulic radius from area.
Width must be positive. Radius perimeter and section factor apply the RECT_ALFMAX crown transition; derivative follows its linear high-area branch and small-area numerical fallback. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Compute closed rectangular section factor from area.
Width must be positive. Radius perimeter and section factor apply the RECT_ALFMAX crown transition; derivative follows its linear high-area branch and small-area numerical fallback. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Compute open rectangular section-factor derivative with respect to area.
xs.s_bot is0..2 excluded wetted banks, xs.w_max positive width. Section factor uses perimeter width+(2-s_bot)*depth; derivative uses analytic tangent or small-area generic fallback. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Compute open rectangular section factor from area.
xs.s_bot is0..2 excluded wetted banks, xs.w_max positive width. Section factor uses perimeter width+(2-s_bot)*depth; derivative uses analytic tangent or small-area generic fallback. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Compute circular-invert rectangular wetted area from depth.
xs.r_bot is invert-circle radius, y_bot/a_bot transition, w_max rectangle width and s_bot circular full section factor. Circular branch requires valid sqrt/acos/asin domains; near-crown correction uses RECT_ROUND_ALFMAX. Preserves legacy radius arithmetic. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | y | Finite nonnegative water depth in ft; caller keeps input within the intended geometric branch. |
|
inline |
Compute circular-invert rectangular section-factor derivative with respect to area.
xs.r_bot is invert-circle radius, y_bot/a_bot transition, w_max rectangle width and s_bot circular full section factor. Circular branch requires valid sqrt/acos/asin domains; near-crown correction uses RECT_ROUND_ALFMAX. Preserves legacy radius arithmetic. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Compute circular-invert rectangular hydraulic radius from area.
xs.r_bot is invert-circle radius, y_bot/a_bot transition, w_max rectangle width and s_bot circular full section factor. Circular branch requires valid sqrt/acos/asin domains; near-crown correction uses RECT_ROUND_ALFMAX. Preserves legacy radius arithmetic. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Compute circular-invert rectangular hydraulic radius from depth.
xs.r_bot is invert-circle radius, y_bot/a_bot transition, w_max rectangle width and s_bot circular full section factor. Circular branch requires valid sqrt/acos/asin domains; near-crown correction uses RECT_ROUND_ALFMAX. Preserves legacy radius arithmetic. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | y | Finite nonnegative water depth in ft; caller keeps input within the intended geometric branch. |
|
inline |
Compute circular-invert rectangular section factor from area.
xs.r_bot is invert-circle radius, y_bot/a_bot transition, w_max rectangle width and s_bot circular full section factor. Circular branch requires valid sqrt/acos/asin domains; near-crown correction uses RECT_ROUND_ALFMAX. Preserves legacy radius arithmetic. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Compute circular-invert rectangular top width from depth.
xs.r_bot is invert-circle radius, y_bot/a_bot transition, w_max rectangle width and s_bot circular full section factor. Circular branch requires valid sqrt/acos/asin domains; near-crown correction uses RECT_ROUND_ALFMAX. Preserves legacy radius arithmetic. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | y | Finite nonnegative water depth in ft; caller keeps input within the intended geometric branch. |
|
inline |
Compute circular-invert rectangular water depth from wetted area.
xs.r_bot is invert-circle radius, y_bot/a_bot transition, w_max rectangle width and s_bot circular full section factor. Circular branch requires valid sqrt/acos/asin domains; near-crown correction uses RECT_ROUND_ALFMAX. Preserves legacy radius arithmetic. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Compute triangular-invert rectangular wetted area from depth.
xs.y_bot/a_bot define the triangle/rectangle transition, s_bot triangle side slope and r_bot its side-length/depth factor. Near-full radius/factor apply RECT_TRIANG_ALFMAX crown correction; derivative selects matching branch. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | y | Finite nonnegative water depth in ft; caller keeps input within the intended geometric branch. |
|
inline |
Compute triangular-invert rectangular section-factor derivative with respect to area.
xs.y_bot/a_bot define the triangle/rectangle transition, s_bot triangle side slope and r_bot its side-length/depth factor. Near-full radius/factor apply RECT_TRIANG_ALFMAX crown correction; derivative selects matching branch. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Compute triangular-invert rectangular hydraulic radius from area.
xs.y_bot/a_bot define the triangle/rectangle transition, s_bot triangle side slope and r_bot its side-length/depth factor. Near-full radius/factor apply RECT_TRIANG_ALFMAX crown correction; derivative selects matching branch. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Compute triangular-invert rectangular hydraulic radius from depth.
xs.y_bot/a_bot define the triangle/rectangle transition, s_bot triangle side slope and r_bot its side-length/depth factor. Near-full radius/factor apply RECT_TRIANG_ALFMAX crown correction; derivative selects matching branch. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | y | Finite nonnegative water depth in ft; caller keeps input within the intended geometric branch. |
|
inline |
Compute triangular-invert rectangular section factor from area.
xs.y_bot/a_bot define the triangle/rectangle transition, s_bot triangle side slope and r_bot its side-length/depth factor. Near-full radius/factor apply RECT_TRIANG_ALFMAX crown correction; derivative selects matching branch. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Compute triangular-invert rectangular top width from depth.
xs.y_bot/a_bot define the triangle/rectangle transition, s_bot triangle side slope and r_bot its side-length/depth factor. Near-full radius/factor apply RECT_TRIANG_ALFMAX crown correction; derivative selects matching branch. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | y | Finite nonnegative water depth in ft; caller keeps input within the intended geometric branch. |
|
inline |
Compute triangular-invert rectangular water depth from wetted area.
xs.y_bot/a_bot define the triangle/rectangle transition, s_bot triangle side slope and r_bot its side-length/depth factor. Near-full radius/factor apply RECT_TRIANG_ALFMAX crown correction; derivative selects matching branch. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Differentiate the local normalized section-factor table segment.
Upper index clamps to last segment; negative/NaN indices are not guarded. No smoothing, finite or pointer validation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
| [in] | table | Borrowed n_items-entry normalized S table. |
| [in] | n_items | Count>=2; alpha/delta must be nonnegative finite and int-representable. |
|
inline |
Compute trapezoidal wetted area from depth.
xs.y_bot is bottom width ft, s_bot average side slope, r_bot summed side-length/depth factor. Zero slope uses rectangular area inversion. Caller ensures nonzero width or positive side slope and valid radius denominator. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | y | Finite nonnegative water depth in ft; caller keeps input within the intended geometric branch. |
|
inline |
Compute trapezoidal section-factor derivative with respect to area.
xs.y_bot is bottom width ft, s_bot average side slope, r_bot summed side-length/depth factor. Zero slope uses rectangular area inversion. Caller ensures nonzero width or positive side slope and valid radius denominator. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Compute trapezoidal hydraulic radius from area.
xs.y_bot is bottom width ft, s_bot average side slope, r_bot summed side-length/depth factor. Zero slope uses rectangular area inversion. Caller ensures nonzero width or positive side slope and valid radius denominator. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Compute trapezoidal hydraulic radius from depth.
xs.y_bot is bottom width ft, s_bot average side slope, r_bot summed side-length/depth factor. Zero slope uses rectangular area inversion. Caller ensures nonzero width or positive side slope and valid radius denominator. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | y | Finite nonnegative water depth in ft; caller keeps input within the intended geometric branch. |
|
inline |
Compute trapezoidal top width from depth.
xs.y_bot is bottom width ft, s_bot average side slope, r_bot summed side-length/depth factor. Zero slope uses rectangular area inversion. Caller ensures nonzero width or positive side slope and valid radius denominator. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | y | Finite nonnegative water depth in ft; caller keeps input within the intended geometric branch. |
|
inline |
Compute trapezoidal water depth from wetted area.
xs.y_bot is bottom width ft, s_bot average side slope, r_bot summed side-length/depth factor. Zero slope uses rectangular area inversion. Caller ensures nonzero width or positive side slope and valid radius denominator. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Compute triangular wetted area from depth.
xs.s_bot is positive horizontal/vertical side slope and r_bot positive sloped-side/depth factor. Area inversion takes sqrt(a/s_bot); direct area-radius formula requires a positive area to avoid0/0. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | y | Finite nonnegative water depth in ft; caller keeps input within the intended geometric branch. |
|
inline |
Compute triangular section-factor derivative with respect to area.
xs.s_bot is positive horizontal/vertical side slope and r_bot positive sloped-side/depth factor. Area inversion takes sqrt(a/s_bot); direct area-radius formula requires a positive area to avoid0/0. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Compute triangular hydraulic radius from area.
xs.s_bot is positive horizontal/vertical side slope and r_bot positive sloped-side/depth factor. Area inversion takes sqrt(a/s_bot); direct area-radius formula requires a positive area to avoid0/0. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
|
inline |
Compute triangular hydraulic radius from depth.
xs.s_bot is positive horizontal/vertical side slope and r_bot positive sloped-side/depth factor. Area inversion takes sqrt(a/s_bot); direct area-radius formula requires a positive area to avoid0/0. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | y | Finite nonnegative water depth in ft; caller keeps input within the intended geometric branch. |
|
inline |
Compute triangular top width from depth.
xs.s_bot is positive horizontal/vertical side slope and r_bot positive sloped-side/depth factor. Area inversion takes sqrt(a/s_bot); direct area-radius formula requires a positive area to avoid0/0. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | y | Finite nonnegative water depth in ft; caller keeps input within the intended geometric branch. |
|
inline |
Compute triangular water depth from wetted area.
xs.s_bot is positive horizontal/vertical side slope and r_bot positive sloped-side/depth factor. Area inversion takes sqrt(a/s_bot); direct area-radius formula requires a positive area to avoid0/0. This low-level helper does not perform general section/type/input validation; no ownership transfer or table mutation.
| [in] | xs | Borrowed initialized native-unit XSectParams with kernel XSectShape numbering (not storage XsectShape); positive full dimensions and live applicable tables required. |
| [in] | a | Finite nonnegative wetted area in ft2; caller supplies valid initialized geometry. |
| XsectTables openswmm::xsect::XsectEval::tbl |