![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
Functions | |
| void | area_circular (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT y_full, const double *OPENSWMM_RESTRICT a_full, double *OPENSWMM_RESTRICT area, int count) |
| Evaluate circular/force-main normalized area for a contiguous batch. | |
| void | area_rect (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT w_max, double *OPENSWMM_RESTRICT area, int count) |
| Multiply rectangular depths and widths using the shared SIMD routine. | |
| void | area_trapezoidal (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT y_bot, const double *OPENSWMM_RESTRICT s_bot, double *OPENSWMM_RESTRICT area, int count) |
| Evaluate trapezoid batch area through the shared analytic leaf. | |
| void | area_triangular (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT s_bot, double *OPENSWMM_RESTRICT area, int count) |
| Evaluate triangular batch area through the shared analytic leaf. | |
| void | area_parabolic (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT r_bot, double *OPENSWMM_RESTRICT area, int count) |
| Evaluate parabolic batch area through the shared analytic leaf. | |
| void | area_powerfunc (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT s_bot, const double *OPENSWMM_RESTRICT r_bot, double *OPENSWMM_RESTRICT area, int count) |
| Evaluate power-function batch area through the shared analytic leaf. | |
| void | area_tabulated (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT y_full, const double *OPENSWMM_RESTRICT a_full, const double *table, int table_size, double *OPENSWMM_RESTRICT area, int count) |
| Scale one shared normalized area table for a batch. | |
| void | area_inv_tabulated (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT y_full, const double *OPENSWMM_RESTRICT a_full, const double *table, int table_size, const xsect::LocateLut *lut, double *OPENSWMM_RESTRICT area, int count) |
| Invert one shared normalized depth-versus-area table for batch areas. | |
| void | perlink_tabulated_pair (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT nrm, const double *OPENSWMM_RESTRICT scale_a, const double *OPENSWMM_RESTRICT scale_b, const double *const *tables_a, const double *const *tables_b, int table_size, double *OPENSWMM_RESTRICT out_a, double *OPENSWMM_RESTRICT out_b, int count) |
| Fuse two per-element profile lookups on one normalized depth grid. | |
| void | perlink_tabulated (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT nrm, const double *OPENSWMM_RESTRICT scale, const double *const *tables, int table_size, double *OPENSWMM_RESTRICT result, int count) |
| Per-link tabulated lookup (for IRREGULAR shapes where each link has its own table). | |
| void | hydrad_circular (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT y_full, const double *OPENSWMM_RESTRICT r_full, double *OPENSWMM_RESTRICT hydrad, int count) |
| Evaluate circular/force-main batch hydraulic radii from the built-in table. | |
| void | area_hydrad_circular (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT y_full, const double *OPENSWMM_RESTRICT a_full, const double *OPENSWMM_RESTRICT r_full, double *OPENSWMM_RESTRICT area, double *OPENSWMM_RESTRICT hydrad, int count) |
| Fuse circular batch area and hydraulic-radius table interpolation. | |
| void | hydrad_trapezoidal (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT y_bot, const double *OPENSWMM_RESTRICT s_bot, const double *OPENSWMM_RESTRICT r_bot, double *OPENSWMM_RESTRICT hydrad, int count) |
| Evaluate trapezoid batch hydraulic radius through the shared leaf. | |
| void | hydrad_triangular (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT s_bot, const double *OPENSWMM_RESTRICT r_bot, double *OPENSWMM_RESTRICT hydrad, int count) |
| Evaluate triangular batch hydraulic radius through the shared leaf. | |
| void | hydrad_rect (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT w_max, double *OPENSWMM_RESTRICT hydrad, int count) |
| Evaluate the simple two-bank rectangular batch radius formula. | |
| void | hydrad_rect_closed (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT w_max, const double *OPENSWMM_RESTRICT a_full, double *OPENSWMM_RESTRICT hydrad, int count) |
| Evaluate closed-rectangle batch radius including crown perimeter correction. | |
| void | hydrad_rect_open (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT w_max, const double *OPENSWMM_RESTRICT s_bot, double *OPENSWMM_RESTRICT hydrad, int count) |
| Evaluate open-rectangle batch radius excluding configured banks. | |
| void | width_rect_closed (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT nrm, const double *OPENSWMM_RESTRICT w_max, double *OPENSWMM_RESTRICT width, int count) |
| Evaluate the closed-rectangle exact-crown top-width convention in a batch. | |
| void | hydrad_tabulated (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT y_full, const double *OPENSWMM_RESTRICT r_full, const double *table, int table_size, double *OPENSWMM_RESTRICT hydrad, int count) |
| Scale one shared normalized hydraulic-radius table for a batch. | |
| void | width_circular (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT y_full, const double *OPENSWMM_RESTRICT w_max, double *OPENSWMM_RESTRICT width, int count) |
| Evaluate circular batch top widths from the built-in width table. | |
| void | width_trapezoidal (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT y_bot, const double *OPENSWMM_RESTRICT s_bot, double *OPENSWMM_RESTRICT width, int count) |
| Evaluate trapezoid batch top widths through the shared leaf. | |
| void | width_triangular (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT s_bot, double *OPENSWMM_RESTRICT width, int count) |
| Evaluate triangular batch top widths through the shared leaf. | |
| void | width_rect (const double *OPENSWMM_RESTRICT w_max, double *OPENSWMM_RESTRICT width, int count) |
| Copy constant rectangular widths to the batch output. | |
| void | width_tabulated (const double *OPENSWMM_RESTRICT depth, const double *OPENSWMM_RESTRICT y_full, const double *OPENSWMM_RESTRICT w_max, const double *table, int table_size, double *OPENSWMM_RESTRICT width, int count) |
| Scale one shared normalized width table for a batch. | |
| double | norm_lookup (double depth, double param, const double *t, int n) noexcept |
| Normalize a depth and dispatch the build-selected table interpolation. | |
| double | norm_x (double depth, double param) noexcept |
| Normalize a depth with the selected exact or fast-lookup operand convention. | |
| void openswmm::xsect_batch::area_circular | ( | const double *OPENSWMM_RESTRICT | depth, |
| const double *OPENSWMM_RESTRICT | y_full, | ||
| const double *OPENSWMM_RESTRICT | a_full, | ||
| double *OPENSWMM_RESTRICT | area, | ||
| int | count ) |
Evaluate circular/force-main normalized area for a contiguous batch.
Uses a_full*A_Circ(depth-normalized); nonpositive default-mode depth normalizes0 and area table starts0. Caller validates spans/geometry/finiteness; no allocation, ownership transfer or per-element error status. Restrict-qualified source/destination spans must not overlap; NULL numeric spans are permitted only at count0.
| [in] | depth | Readable count-entry finite nonnegative water depths in ft. |
| [in] | y_full | Readable count-entry normalization operands: full depth ft in default build, reciprocal1/ft under SWMM_XSECT_FAST_LOOKUP. The historical y_full parameter name does not change with build mode. |
| [in] | a_full | Readable count-entry positive full areas ft2. |
| [out] | area | Writable count-entry result span, area ft2. |
| [in] | count | Nonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes. |
| void openswmm::xsect_batch::area_hydrad_circular | ( | const double *OPENSWMM_RESTRICT | depth, |
| const double *OPENSWMM_RESTRICT | y_full, | ||
| const double *OPENSWMM_RESTRICT | a_full, | ||
| const double *OPENSWMM_RESTRICT | r_full, | ||
| double *OPENSWMM_RESTRICT | area, | ||
| double *OPENSWMM_RESTRICT | hydrad, | ||
| int | count ) |
Fuse circular batch area and hydraulic-radius table interpolation.
Uses one normalized coordinate/index for A_Circ and R_Circ, with independent positive quadratic refinement/lower clamps. Zero depth produces zero area but legacy nonzero radius-table floor; fast build uses reciprocal arithmetic. Caller validates spans/geometry/finiteness; no allocation, ownership transfer or per-element error status. Restrict-qualified source/destination spans must not overlap; NULL numeric spans are permitted only at count0.
| [in] | depth | Readable count-entry finite nonnegative water depths in ft. |
| [in] | y_full | Readable count-entry normalization operands: full depth ft in default build, reciprocal1/ft under SWMM_XSECT_FAST_LOOKUP. The historical y_full parameter name does not change with build mode. |
| [in] | a_full | Readable count-entry positive full areas ft2. |
| [in] | r_full | Readable count-entry full hydraulic radii ft. |
| [out] | area | Writable count-entry result span, area ft2. |
| [out] | hydrad | Writable count-entry result span, hydraulic radius ft. |
| [in] | count | Nonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes. |
| void openswmm::xsect_batch::area_inv_tabulated | ( | const double *OPENSWMM_RESTRICT | depth, |
| const double *OPENSWMM_RESTRICT | y_full, | ||
| const double *OPENSWMM_RESTRICT | a_full, | ||
| const double * | table, | ||
| int | table_size, | ||
| const xsect::LocateLut * | lut, | ||
| double *OPENSWMM_RESTRICT | area, | ||
| int | count ) |
Invert one shared normalized depth-versus-area table for batch areas.
Computes a_full*invLookup(normalized depth), optionally using a matching immutable bucket map. Caller validates spans/geometry/finiteness; no allocation, ownership transfer or per-element error status. Restrict-qualified source/destination spans must not overlap; NULL numeric spans are permitted only at count0.
| [in] | depth | Readable count-entry finite nonnegative water depths in ft. |
| [in] | y_full | Readable count-entry normalization operands: full depth ft in default build, reciprocal1/ft under SWMM_XSECT_FAST_LOOKUP. The historical y_full parameter name does not change with build mode. |
| [in] | a_full | Readable count-entry positive full areas ft2. |
| [in] | table | Non-NULL borrowed readable table_size-entry shared normalized table; proper monotonicity required for inverse lookup. |
| [in] | table_size | Shared logical table length>=4 for quadratic lookup; table grid is equally spaced over normalized depth/area0..1. |
| [in] | lut | Optional borrowed map built for this exact unchanged inverse table/search extent. |
| [out] | area | Writable count-entry result span, area ft2. |
| [in] | count | Nonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes. |
| void openswmm::xsect_batch::area_parabolic | ( | const double *OPENSWMM_RESTRICT | depth, |
| const double *OPENSWMM_RESTRICT | r_bot, | ||
| double *OPENSWMM_RESTRICT | area, | ||
| int | count ) |
Evaluate parabolic batch area through the shared analytic leaf.
Computes(4/3)*r_bot*depth*sqrt(depth); nonnegative depth is required. Caller validates spans/geometry/finiteness; no allocation, ownership transfer or per-element error status. Restrict-qualified source/destination spans must not overlap; NULL numeric spans are permitted only at count0.
| [in] | depth | Readable count-entry finite nonnegative water depths in ft. |
| [in] | r_bot | Readable count-entry positive inverse sqrt(parabola coefficient), sqrt(ft). |
| [out] | area | Writable count-entry result span, area ft2. |
| [in] | count | Nonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes. |
| void openswmm::xsect_batch::area_powerfunc | ( | const double *OPENSWMM_RESTRICT | depth, |
| const double *OPENSWMM_RESTRICT | s_bot, | ||
| const double *OPENSWMM_RESTRICT | r_bot, | ||
| double *OPENSWMM_RESTRICT | area, | ||
| int | count ) |
Evaluate power-function batch area through the shared analytic leaf.
Computes r_bot*depth^(s_bot+1); caller establishes valid positive coefficients/power domain. Caller validates spans/geometry/finiteness; no allocation, ownership transfer or per-element error status. Restrict-qualified source/destination spans must not overlap; NULL numeric spans are permitted only at count0.
| [in] | depth | Readable count-entry finite nonnegative water depths in ft. |
| [in] | s_bot | Readable count-entry positive depth exponents (inverse authored exponent). |
| [in] | r_bot | Readable count-entry positive area coefficient ft^(1-s_bot). |
| [out] | area | Writable count-entry result span, area ft2. |
| [in] | count | Nonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes. |
| void openswmm::xsect_batch::area_rect | ( | const double *OPENSWMM_RESTRICT | depth, |
| const double *OPENSWMM_RESTRICT | w_max, | ||
| double *OPENSWMM_RESTRICT | area, | ||
| int | count ) |
Multiply rectangular depths and widths using the shared SIMD routine.
Computes depth*w_max without full-depth or sign clamps. Count must be nonnegative before size_t conversion. Caller validates spans/geometry/finiteness; no allocation, ownership transfer or per-element error status. Restrict-qualified source/destination spans must not overlap; NULL numeric spans are permitted only at count0.
| [in] | depth | Readable count-entry finite nonnegative water depths in ft. |
| [in] | w_max | Readable count-entry positive widths ft. |
| [out] | area | Writable count-entry result span, area ft2. |
| [in] | count | Nonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes. |
| void openswmm::xsect_batch::area_tabulated | ( | const double *OPENSWMM_RESTRICT | depth, |
| const double *OPENSWMM_RESTRICT | y_full, | ||
| const double *OPENSWMM_RESTRICT | a_full, | ||
| const double * | table, | ||
| int | table_size, | ||
| double *OPENSWMM_RESTRICT | area, | ||
| int | count ) |
Scale one shared normalized area table for a batch.
Computes a_full*norm_lookup for each element, preserving exact or opted-in fast arithmetic. Caller validates spans/geometry/finiteness; no allocation, ownership transfer or per-element error status. Restrict-qualified source/destination spans must not overlap; NULL numeric spans are permitted only at count0.
| [in] | depth | Readable count-entry finite nonnegative water depths in ft. |
| [in] | y_full | Readable count-entry normalization operands: full depth ft in default build, reciprocal1/ft under SWMM_XSECT_FAST_LOOKUP. The historical y_full parameter name does not change with build mode. |
| [in] | a_full | Readable count-entry positive full areas ft2. |
| [in] | table | Non-NULL borrowed readable table_size-entry shared normalized table; proper monotonicity required for inverse lookup. |
| [in] | table_size | Shared logical table length>=4 for quadratic lookup; table grid is equally spaced over normalized depth/area0..1. |
| [out] | area | Writable count-entry result span, area ft2. |
| [in] | count | Nonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes. |
| void openswmm::xsect_batch::area_trapezoidal | ( | const double *OPENSWMM_RESTRICT | depth, |
| const double *OPENSWMM_RESTRICT | y_bot, | ||
| const double *OPENSWMM_RESTRICT | s_bot, | ||
| double *OPENSWMM_RESTRICT | area, | ||
| int | count ) |
Evaluate trapezoid batch area through the shared analytic leaf.
Computes (bottom width+average side slope*depth)*depth, preserving leaf operation order. Caller validates spans/geometry/finiteness; no allocation, ownership transfer or per-element error status. Restrict-qualified source/destination spans must not overlap; NULL numeric spans are permitted only at count0.
| [in] | depth | Readable count-entry finite nonnegative water depths in ft. |
| [in] | y_bot | Readable count-entry nonnegative trapezoid bottom widths ft. |
| [in] | s_bot | Readable count-entry average horizontal/vertical side slopes. |
| [out] | area | Writable count-entry result span, area ft2. |
| [in] | count | Nonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes. |
| void openswmm::xsect_batch::area_triangular | ( | const double *OPENSWMM_RESTRICT | depth, |
| const double *OPENSWMM_RESTRICT | s_bot, | ||
| double *OPENSWMM_RESTRICT | area, | ||
| int | count ) |
Evaluate triangular batch area through the shared analytic leaf.
Computes depth*depth*side slope without full-depth clamping. Caller validates spans/geometry/finiteness; no allocation, ownership transfer or per-element error status. Restrict-qualified source/destination spans must not overlap; NULL numeric spans are permitted only at count0.
| [in] | depth | Readable count-entry finite nonnegative water depths in ft. |
| [in] | s_bot | Readable count-entry average horizontal/vertical side slopes. |
| [out] | area | Writable count-entry result span, area ft2. |
| [in] | count | Nonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes. |
| void openswmm::xsect_batch::hydrad_circular | ( | const double *OPENSWMM_RESTRICT | depth, |
| const double *OPENSWMM_RESTRICT | y_full, | ||
| const double *OPENSWMM_RESTRICT | r_full, | ||
| double *OPENSWMM_RESTRICT | hydrad, | ||
| int | count ) |
Evaluate circular/force-main batch hydraulic radii from the built-in table.
Computes r_full*R_Circ(normalized depth). At zero normalized depth uses nonzero R_Circ[0], preserving legacy dry-radius convention. Caller validates spans/geometry/finiteness; no allocation, ownership transfer or per-element error status. Restrict-qualified source/destination spans must not overlap; NULL numeric spans are permitted only at count0.
| [in] | depth | Readable count-entry finite nonnegative water depths in ft. |
| [in] | y_full | Readable count-entry normalization operands: full depth ft in default build, reciprocal1/ft under SWMM_XSECT_FAST_LOOKUP. The historical y_full parameter name does not change with build mode. |
| [in] | r_full | Readable count-entry full hydraulic radii ft. |
| [out] | hydrad | Writable count-entry result span, hydraulic radius ft. |
| [in] | count | Nonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes. |
| void openswmm::xsect_batch::hydrad_rect | ( | const double *OPENSWMM_RESTRICT | depth, |
| const double *OPENSWMM_RESTRICT | w_max, | ||
| double *OPENSWMM_RESTRICT | hydrad, | ||
| int | count ) |
Evaluate the simple two-bank rectangular batch radius formula.
Computes width*depth/(width+2*depth) directly. Production dispatch uses explicit closed/open variants instead; this retained function does not add crown corrections. Caller validates spans/geometry/finiteness; no allocation, ownership transfer or per-element error status. Restrict-qualified source/destination spans must not overlap; NULL numeric spans are permitted only at count0.
| [in] | depth | Readable count-entry finite nonnegative water depths in ft. |
| [in] | w_max | Readable count-entry positive widths ft. |
| [out] | hydrad | Writable count-entry result span, hydraulic radius ft. |
| [in] | count | Nonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes. |
| void openswmm::xsect_batch::hydrad_rect_closed | ( | const double *OPENSWMM_RESTRICT | depth, |
| const double *OPENSWMM_RESTRICT | w_max, | ||
| const double *OPENSWMM_RESTRICT | a_full, | ||
| double *OPENSWMM_RESTRICT | hydrad, | ||
| int | count ) |
Evaluate closed-rectangle batch radius including crown perimeter correction.
Calls rectClosedRofA on depth*width, adding the RECT_ALFMAX near-crown perimeter term and preserving0 for nonpositive area. Caller validates spans/geometry/finiteness; no allocation, ownership transfer or per-element error status. Restrict-qualified source/destination spans must not overlap; NULL numeric spans are permitted only at count0.
| [in] | depth | Readable count-entry finite nonnegative water depths in ft. |
| [in] | w_max | Readable count-entry positive widths ft. |
| [in] | a_full | Readable count-entry positive full areas ft2. |
| [out] | hydrad | Writable count-entry result span, hydraulic radius ft. |
| [in] | count | Nonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes. |
| void openswmm::xsect_batch::hydrad_rect_open | ( | const double *OPENSWMM_RESTRICT | depth, |
| const double *OPENSWMM_RESTRICT | w_max, | ||
| const double *OPENSWMM_RESTRICT | s_bot, | ||
| double *OPENSWMM_RESTRICT | hydrad, | ||
| int | count ) |
Evaluate open-rectangle batch radius excluding configured banks.
Calls rectOpenRofA on depth*width; s_bot gives excluded bank count0..2. Caller validates spans/geometry/finiteness; no allocation, ownership transfer or per-element error status. Restrict-qualified source/destination spans must not overlap; NULL numeric spans are permitted only at count0.
| [in] | depth | Readable count-entry finite nonnegative water depths in ft. |
| [in] | w_max | Readable count-entry positive widths ft. |
| [in] | s_bot | Readable count-entry excluded bank counts0..2. |
| [out] | hydrad | Writable count-entry result span, hydraulic radius ft. |
| [in] | count | Nonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes. |
| void openswmm::xsect_batch::hydrad_tabulated | ( | const double *OPENSWMM_RESTRICT | depth, |
| const double *OPENSWMM_RESTRICT | y_full, | ||
| const double *OPENSWMM_RESTRICT | r_full, | ||
| const double * | table, | ||
| int | table_size, | ||
| double *OPENSWMM_RESTRICT | hydrad, | ||
| int | count ) |
Scale one shared normalized hydraulic-radius table for a batch.
Computes r_full*norm_lookup; at zero depth retains the table's first value rather than forcing zero. Caller validates spans/geometry/finiteness; no allocation, ownership transfer or per-element error status. Restrict-qualified source/destination spans must not overlap; NULL numeric spans are permitted only at count0.
| [in] | depth | Readable count-entry finite nonnegative water depths in ft. |
| [in] | y_full | Readable count-entry normalization operands: full depth ft in default build, reciprocal1/ft under SWMM_XSECT_FAST_LOOKUP. The historical y_full parameter name does not change with build mode. |
| [in] | r_full | Readable count-entry full hydraulic radii ft. |
| [in] | table | Non-NULL borrowed readable table_size-entry shared normalized table; proper monotonicity required for inverse lookup. |
| [in] | table_size | Shared logical table length>=4 for quadratic lookup; table grid is equally spaced over normalized depth/area0..1. |
| [out] | hydrad | Writable count-entry result span, hydraulic radius ft. |
| [in] | count | Nonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes. |
| void openswmm::xsect_batch::hydrad_trapezoidal | ( | const double *OPENSWMM_RESTRICT | depth, |
| const double *OPENSWMM_RESTRICT | y_bot, | ||
| const double *OPENSWMM_RESTRICT | s_bot, | ||
| const double *OPENSWMM_RESTRICT | r_bot, | ||
| double *OPENSWMM_RESTRICT | hydrad, | ||
| int | count ) |
Evaluate trapezoid batch hydraulic radius through the shared leaf.
Area divided by bottom width+depth*r_bot, with exact zero-depth return0. Caller validates spans/geometry/finiteness; no allocation, ownership transfer or per-element error status. Restrict-qualified source/destination spans must not overlap; NULL numeric spans are permitted only at count0.
| [in] | depth | Readable count-entry finite nonnegative water depths in ft. |
| [in] | y_bot | Readable count-entry nonnegative trapezoid bottom widths ft. |
| [in] | s_bot | Readable count-entry average horizontal/vertical side slopes. |
| [in] | r_bot | Readable count-entry positive side-length/depth factors, dimensionless. |
| [out] | hydrad | Writable count-entry result span, hydraulic radius ft. |
| [in] | count | Nonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes. |
| void openswmm::xsect_batch::hydrad_triangular | ( | const double *OPENSWMM_RESTRICT | depth, |
| const double *OPENSWMM_RESTRICT | s_bot, | ||
| const double *OPENSWMM_RESTRICT | r_bot, | ||
| double *OPENSWMM_RESTRICT | hydrad, | ||
| int | count ) |
Evaluate triangular batch hydraulic radius through the shared leaf.
Computes depth*s_bot/(2*r_bot); caller provides nonzero side-length factor. Caller validates spans/geometry/finiteness; no allocation, ownership transfer or per-element error status. Restrict-qualified source/destination spans must not overlap; NULL numeric spans are permitted only at count0.
| [in] | depth | Readable count-entry finite nonnegative water depths in ft. |
| [in] | s_bot | Readable count-entry average horizontal/vertical side slopes. |
| [in] | r_bot | Readable count-entry positive side-length/depth factors, dimensionless. |
| [out] | hydrad | Writable count-entry result span, hydraulic radius ft. |
| [in] | count | Nonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes. |
|
inlinenoexcept |
Normalize a depth and dispatch the build-selected table interpolation.
| [in] | depth | Depth in consistent native length units, finite and safely normalizable. |
| [in] | param | Default full-depth denominator or FAST_LOOKUP reciprocal, matching norm_x build convention. |
| [in] | t | Borrowed readable normalized geometry table with n>=4 entries. |
| [in] | n | Logical entry count>=4. |
|
inlinenoexcept |
Normalize a depth with the selected exact or fast-lookup operand convention.
The fast branch does not catch NaN multiplication. Supplying a full depth to a reciprocal build (or reverse) silently misnormalizes; no units or finiteness validation.
| [in] | depth | Depth in the same length convention as full depth; finite inputs supplied by caller. |
| [in] | param | Default build: positive full depth; FAST_LOOKUP build: its precomputed reciprocal. |
| void openswmm::xsect_batch::perlink_tabulated | ( | const double *OPENSWMM_RESTRICT | depth, |
| const double *OPENSWMM_RESTRICT | nrm, | ||
| const double *OPENSWMM_RESTRICT | scale, | ||
| const double *const * | tables, | ||
| int | table_size, | ||
| double *OPENSWMM_RESTRICT | result, | ||
| int | count ) |
Per-link tabulated lookup (for IRREGULAR shapes where each link has its own table).
Scale separate normalized profile tables for each batch element.
Missing per-element table pointer writes0; other entries use norm_lookup. Used for area/radius/width with corresponding scale units. Caller validates spans/geometry/finiteness; no allocation, ownership transfer or per-element error status. Restrict-qualified source/destination spans must not overlap; NULL numeric spans are permitted only at count0.
| [in] | depth | Readable count-entry finite nonnegative water depths in ft. |
| [in] | nrm | Readable count-entry normalization operands: full depth ft in default build, reciprocal1/ft under SWMM_XSECT_FAST_LOOKUP. The historical y_full parameter name does not change with build mode. |
| [in] | scale | Readable count-entry dimensional multipliers; output inherits their units (typically ft2 area or ft radius/width). |
| [in] | tables | Readable count-pointer array; each non-NULL borrowed table has table_size entries on the same normalized grid, NULL selects zero output. |
| [in] | table_size | Shared logical table length>=4 for quadratic lookup; table grid is equally spaced over normalized depth/area0..1. |
| [out] | result | Writable count-entry result span, in corresponding scale-array units. |
| [in] | count | Nonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes. |
| void openswmm::xsect_batch::perlink_tabulated_pair | ( | const double *OPENSWMM_RESTRICT | depth, |
| const double *OPENSWMM_RESTRICT | nrm, | ||
| const double *OPENSWMM_RESTRICT | scale_a, | ||
| const double *OPENSWMM_RESTRICT | scale_b, | ||
| const double *const * | tables_a, | ||
| const double *const * | tables_b, | ||
| int | table_size, | ||
| double *OPENSWMM_RESTRICT | out_a, | ||
| double *OPENSWMM_RESTRICT | out_b, | ||
| int | count ) |
Fuse two per-element profile lookups on one normalized depth grid.
Fused per-link tabulated pair — the tabulated analog of area_hydrad_circular (plan XSECT_LOOKUP_ACCEL §4 item A2).
A transect's area and hydraulic-radius tables share one 51-row normalized depth grid, so evaluating both at the same depth repeats the whole index computation: the normalization, the x / delta truncation, the segment origin and the interpolation weights. This does that work once and interpolates both tables from it, and gathers each link's two table pointers in one visit instead of two.
Bit-identical to two perlink_tabulated passes by construction: every arithmetic op is the DIVIDE form of xsect::lookup_exact in legacy's grouping (no reciprocal, no FMA), the quadratic refinement and the negative clamp are applied per table exactly as lookup_exact applies them, and the i >= n-1 early-out returns the last row unclamped, as there.
(The top width cannot join this pass: the dynamic-wave loop computes widths in STEP B from crown-capped depths and areas in STEP D from depths STEP C has since modified — different inputs, so there is no shared index to share. Fusing them would change the algorithm, not just its cost.)
Shares index/interpolation weights while applying independent quadratic refinements and lower clamps. Missing either pointer evaluates the available channel separately and writes0 for the missing one. Default arithmetic matches two exact passes; FAST_LOOKUP permits ULP differences. Caller validates spans/geometry/finiteness; no allocation, ownership transfer or per-element error status. Restrict-qualified source/destination spans must not overlap; NULL numeric spans are permitted only at count0.
| [in] | depth | Readable count-entry finite nonnegative water depths in ft. |
| [in] | nrm | Readable count-entry normalization operands: full depth ft in default build, reciprocal1/ft under SWMM_XSECT_FAST_LOOKUP. The historical y_full parameter name does not change with build mode. |
| [in] | scale_a | Readable count-entry dimensional multipliers; output inherits their units (typically ft2 area or ft radius/width). |
| [in] | scale_b | Readable count-entry dimensional multipliers; output inherits their units (typically ft2 area or ft radius/width). |
| [in] | tables_a | Readable count-pointer array; each non-NULL borrowed table has table_size entries on the same normalized grid, NULL selects zero output. |
| [in] | tables_b | Readable count-pointer array; each non-NULL borrowed table has table_size entries on the same normalized grid, NULL selects zero output. |
| [in] | table_size | Shared logical table length>=4 for quadratic lookup; table grid is equally spaced over normalized depth/area0..1. |
| [out] | out_a | Writable count-entry result span, in corresponding scale-array units. |
| [out] | out_b | Writable count-entry result span, in corresponding scale-array units. |
| [in] | count | Nonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes. |
| void openswmm::xsect_batch::width_circular | ( | const double *OPENSWMM_RESTRICT | depth, |
| const double *OPENSWMM_RESTRICT | y_full, | ||
| const double *OPENSWMM_RESTRICT | w_max, | ||
| double *OPENSWMM_RESTRICT | width, | ||
| int | count ) |
Evaluate circular batch top widths from the built-in width table.
Computes w_max*W_Circ(normalized depth), including the table-defined crown/dry endpoint widths. Caller validates spans/geometry/finiteness; no allocation, ownership transfer or per-element error status. Restrict-qualified source/destination spans must not overlap; NULL numeric spans are permitted only at count0.
| [in] | depth | Readable count-entry finite nonnegative water depths in ft. |
| [in] | y_full | Readable count-entry normalization operands: full depth ft in default build, reciprocal1/ft under SWMM_XSECT_FAST_LOOKUP. The historical y_full parameter name does not change with build mode. |
| [in] | w_max | Readable count-entry positive widths ft. |
| [out] | width | Writable count-entry result span, top width ft. |
| [in] | count | Nonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes. |
| void openswmm::xsect_batch::width_rect | ( | const double *OPENSWMM_RESTRICT | w_max, |
| double *OPENSWMM_RESTRICT | width, | ||
| int | count ) |
Copy constant rectangular widths to the batch output.
No depth argument or closed-crown correction; used for open rectangles. Caller validates spans/geometry/finiteness; no allocation, ownership transfer or per-element error status. Restrict-qualified source/destination spans must not overlap; NULL numeric spans are permitted only at count0.
| [in] | w_max | Readable count-entry positive widths ft. |
| [out] | width | Writable count-entry result span, top width ft. |
| [in] | count | Nonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes. |
| void openswmm::xsect_batch::width_rect_closed | ( | const double *OPENSWMM_RESTRICT | depth, |
| const double *OPENSWMM_RESTRICT | nrm, | ||
| const double *OPENSWMM_RESTRICT | w_max, | ||
| double *OPENSWMM_RESTRICT | width, | ||
| int | count ) |
Evaluate the closed-rectangle exact-crown top-width convention in a batch.
Width is0 when normalized depth compares exactly1, otherwise w_max; opted-in reciprocal normalization can round differently at crown. Caller validates spans/geometry/finiteness; no allocation, ownership transfer or per-element error status. Restrict-qualified source/destination spans must not overlap; NULL numeric spans are permitted only at count0.
| [in] | depth | Readable count-entry finite nonnegative water depths in ft. |
| [in] | nrm | Readable count-entry normalization operands: full depth ft in default build, reciprocal1/ft under SWMM_XSECT_FAST_LOOKUP. The historical y_full parameter name does not change with build mode. |
| [in] | w_max | Readable count-entry positive widths ft. |
| [out] | width | Writable count-entry result span, top width ft. |
| [in] | count | Nonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes. |
| void openswmm::xsect_batch::width_tabulated | ( | const double *OPENSWMM_RESTRICT | depth, |
| const double *OPENSWMM_RESTRICT | y_full, | ||
| const double *OPENSWMM_RESTRICT | w_max, | ||
| const double * | table, | ||
| int | table_size, | ||
| double *OPENSWMM_RESTRICT | width, | ||
| int | count ) |
Scale one shared normalized width table for a batch.
Computes w_max*norm_lookup with table-defined dry/crown behavior rather than an extra crown special case. Caller validates spans/geometry/finiteness; no allocation, ownership transfer or per-element error status. Restrict-qualified source/destination spans must not overlap; NULL numeric spans are permitted only at count0.
| [in] | depth | Readable count-entry finite nonnegative water depths in ft. |
| [in] | y_full | Readable count-entry normalization operands: full depth ft in default build, reciprocal1/ft under SWMM_XSECT_FAST_LOOKUP. The historical y_full parameter name does not change with build mode. |
| [in] | w_max | Readable count-entry positive widths ft. |
| [in] | table | Non-NULL borrowed readable table_size-entry shared normalized table; proper monotonicity required for inverse lookup. |
| [in] | table_size | Shared logical table length>=4 for quadratic lookup; table grid is equally spaced over normalized depth/area0..1. |
| [out] | width | Writable count-entry result span, top width ft. |
| [in] | count | Nonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes. |
| void openswmm::xsect_batch::width_trapezoidal | ( | const double *OPENSWMM_RESTRICT | depth, |
| const double *OPENSWMM_RESTRICT | y_bot, | ||
| const double *OPENSWMM_RESTRICT | s_bot, | ||
| double *OPENSWMM_RESTRICT | width, | ||
| int | count ) |
Evaluate trapezoid batch top widths through the shared leaf.
Computes bottom width+2*average side slope*depth without full-depth clamp. Caller validates spans/geometry/finiteness; no allocation, ownership transfer or per-element error status. Restrict-qualified source/destination spans must not overlap; NULL numeric spans are permitted only at count0.
| [in] | depth | Readable count-entry finite nonnegative water depths in ft. |
| [in] | y_bot | Readable count-entry nonnegative trapezoid bottom widths ft. |
| [in] | s_bot | Readable count-entry average horizontal/vertical side slopes. |
| [out] | width | Writable count-entry result span, top width ft. |
| [in] | count | Nonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes. |
| void openswmm::xsect_batch::width_triangular | ( | const double *OPENSWMM_RESTRICT | depth, |
| const double *OPENSWMM_RESTRICT | s_bot, | ||
| double *OPENSWMM_RESTRICT | width, | ||
| int | count ) |
Evaluate triangular batch top widths through the shared leaf.
Computes2*side slope*depth without a full-depth clamp. Caller validates spans/geometry/finiteness; no allocation, ownership transfer or per-element error status. Restrict-qualified source/destination spans must not overlap; NULL numeric spans are permitted only at count0.
| [in] | depth | Readable count-entry finite nonnegative water depths in ft. |
| [in] | s_bot | Readable count-entry average horizontal/vertical side slopes. |
| [out] | width | Writable count-entry result span, top width ft. |
| [in] | count | Nonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes. |