OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmm::xsect_batch Namespace Reference

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.
 

Function Documentation

◆ area_circular()

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.

Parameters
[in]depthReadable count-entry finite nonnegative water depths in ft.
[in]y_fullReadable 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_fullReadable count-entry positive full areas ft2.
[out]areaWritable count-entry result span, area ft2.
[in]countNonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes.
Here is the call graph for this function:

◆ area_hydrad_circular()

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.

Parameters
[in]depthReadable count-entry finite nonnegative water depths in ft.
[in]y_fullReadable 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_fullReadable count-entry positive full areas ft2.
[in]r_fullReadable count-entry full hydraulic radii ft.
[out]areaWritable count-entry result span, area ft2.
[out]hydradWritable count-entry result span, hydraulic radius ft.
[in]countNonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes.
Here is the call graph for this function:

◆ area_inv_tabulated()

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.

Parameters
[in]depthReadable count-entry finite nonnegative water depths in ft.
[in]y_fullReadable 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_fullReadable count-entry positive full areas ft2.
[in]tableNon-NULL borrowed readable table_size-entry shared normalized table; proper monotonicity required for inverse lookup.
[in]table_sizeShared logical table length>=4 for quadratic lookup; table grid is equally spaced over normalized depth/area0..1.
[in]lutOptional borrowed map built for this exact unchanged inverse table/search extent.
[out]areaWritable count-entry result span, area ft2.
[in]countNonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes.
Here is the call graph for this function:

◆ area_parabolic()

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.

Parameters
[in]depthReadable count-entry finite nonnegative water depths in ft.
[in]r_botReadable count-entry positive inverse sqrt(parabola coefficient), sqrt(ft).
[out]areaWritable count-entry result span, area ft2.
[in]countNonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes.
Here is the call graph for this function:

◆ area_powerfunc()

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.

Parameters
[in]depthReadable count-entry finite nonnegative water depths in ft.
[in]s_botReadable count-entry positive depth exponents (inverse authored exponent).
[in]r_botReadable count-entry positive area coefficient ft^(1-s_bot).
[out]areaWritable count-entry result span, area ft2.
[in]countNonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes.
Here is the call graph for this function:

◆ area_rect()

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.

Parameters
[in]depthReadable count-entry finite nonnegative water depths in ft.
[in]w_maxReadable count-entry positive widths ft.
[out]areaWritable count-entry result span, area ft2.
[in]countNonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes.
Here is the call graph for this function:

◆ area_tabulated()

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.

Parameters
[in]depthReadable count-entry finite nonnegative water depths in ft.
[in]y_fullReadable 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_fullReadable count-entry positive full areas ft2.
[in]tableNon-NULL borrowed readable table_size-entry shared normalized table; proper monotonicity required for inverse lookup.
[in]table_sizeShared logical table length>=4 for quadratic lookup; table grid is equally spaced over normalized depth/area0..1.
[out]areaWritable count-entry result span, area ft2.
[in]countNonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes.
Here is the call graph for this function:

◆ area_trapezoidal()

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.

Parameters
[in]depthReadable count-entry finite nonnegative water depths in ft.
[in]y_botReadable count-entry nonnegative trapezoid bottom widths ft.
[in]s_botReadable count-entry average horizontal/vertical side slopes.
[out]areaWritable count-entry result span, area ft2.
[in]countNonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes.
Here is the call graph for this function:

◆ area_triangular()

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.

Parameters
[in]depthReadable count-entry finite nonnegative water depths in ft.
[in]s_botReadable count-entry average horizontal/vertical side slopes.
[out]areaWritable count-entry result span, area ft2.
[in]countNonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes.
Here is the call graph for this function:

◆ hydrad_circular()

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.

Parameters
[in]depthReadable count-entry finite nonnegative water depths in ft.
[in]y_fullReadable 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_fullReadable count-entry full hydraulic radii ft.
[out]hydradWritable count-entry result span, hydraulic radius ft.
[in]countNonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes.
Here is the call graph for this function:

◆ hydrad_rect()

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.

Parameters
[in]depthReadable count-entry finite nonnegative water depths in ft.
[in]w_maxReadable count-entry positive widths ft.
[out]hydradWritable count-entry result span, hydraulic radius ft.
[in]countNonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes.

◆ hydrad_rect_closed()

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.

Parameters
[in]depthReadable count-entry finite nonnegative water depths in ft.
[in]w_maxReadable count-entry positive widths ft.
[in]a_fullReadable count-entry positive full areas ft2.
[out]hydradWritable count-entry result span, hydraulic radius ft.
[in]countNonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes.
Here is the call graph for this function:

◆ hydrad_rect_open()

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.

Parameters
[in]depthReadable count-entry finite nonnegative water depths in ft.
[in]w_maxReadable count-entry positive widths ft.
[in]s_botReadable count-entry excluded bank counts0..2.
[out]hydradWritable count-entry result span, hydraulic radius ft.
[in]countNonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes.
Here is the call graph for this function:

◆ hydrad_tabulated()

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.

Parameters
[in]depthReadable count-entry finite nonnegative water depths in ft.
[in]y_fullReadable 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_fullReadable count-entry full hydraulic radii ft.
[in]tableNon-NULL borrowed readable table_size-entry shared normalized table; proper monotonicity required for inverse lookup.
[in]table_sizeShared logical table length>=4 for quadratic lookup; table grid is equally spaced over normalized depth/area0..1.
[out]hydradWritable count-entry result span, hydraulic radius ft.
[in]countNonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes.
Here is the call graph for this function:

◆ hydrad_trapezoidal()

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.

Parameters
[in]depthReadable count-entry finite nonnegative water depths in ft.
[in]y_botReadable count-entry nonnegative trapezoid bottom widths ft.
[in]s_botReadable count-entry average horizontal/vertical side slopes.
[in]r_botReadable count-entry positive side-length/depth factors, dimensionless.
[out]hydradWritable count-entry result span, hydraulic radius ft.
[in]countNonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes.
Here is the call graph for this function:

◆ hydrad_triangular()

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.

Parameters
[in]depthReadable count-entry finite nonnegative water depths in ft.
[in]s_botReadable count-entry average horizontal/vertical side slopes.
[in]r_botReadable count-entry positive side-length/depth factors, dimensionless.
[out]hydradWritable count-entry result span, hydraulic radius ft.
[in]countNonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes.
Here is the call graph for this function:

◆ norm_lookup()

double openswmm::xsect::norm_lookup ( double depth,
double param,
const double * t,
int n )
inlinenoexcept

Normalize a depth and dispatch the build-selected table interpolation.

Parameters
[in]depthDepth in consistent native length units, finite and safely normalizable.
[in]paramDefault full-depth denominator or FAST_LOOKUP reciprocal, matching norm_x build convention.
[in]tBorrowed readable normalized geometry table with n>=4 entries.
[in]nLogical entry count>=4.
Returns
Dependent table-unit value via lookup_exact by default or lookup_fast when opted in.
Here is the caller graph for this function:

◆ norm_x()

double openswmm::xsect::norm_x ( double depth,
double param )
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.

Parameters
[in]depthDepth in the same length convention as full depth; finite inputs supplied by caller.
[in]paramDefault build: positive full depth; FAST_LOOKUP build: its precomputed reciprocal.
Returns
Default depth/param when both positive else0; fast depth*param clamped0..1.
Here is the caller graph for this function:

◆ perlink_tabulated()

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.

Parameters
[in]depthReadable count-entry finite nonnegative water depths in ft.
[in]nrmReadable 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]scaleReadable count-entry dimensional multipliers; output inherits their units (typically ft2 area or ft radius/width).
[in]tablesReadable count-pointer array; each non-NULL borrowed table has table_size entries on the same normalized grid, NULL selects zero output.
[in]table_sizeShared logical table length>=4 for quadratic lookup; table grid is equally spaced over normalized depth/area0..1.
[out]resultWritable count-entry result span, in corresponding scale-array units.
[in]countNonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes.
Here is the call graph for this function:

◆ perlink_tabulated_pair()

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.

Parameters
[in]depthReadable count-entry finite nonnegative water depths in ft.
[in]nrmReadable 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_aReadable count-entry dimensional multipliers; output inherits their units (typically ft2 area or ft radius/width).
[in]scale_bReadable count-entry dimensional multipliers; output inherits their units (typically ft2 area or ft radius/width).
[in]tables_aReadable count-pointer array; each non-NULL borrowed table has table_size entries on the same normalized grid, NULL selects zero output.
[in]tables_bReadable count-pointer array; each non-NULL borrowed table has table_size entries on the same normalized grid, NULL selects zero output.
[in]table_sizeShared logical table length>=4 for quadratic lookup; table grid is equally spaced over normalized depth/area0..1.
[out]out_aWritable count-entry result span, in corresponding scale-array units.
[out]out_bWritable count-entry result span, in corresponding scale-array units.
[in]countNonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes.
Here is the call graph for this function:

◆ width_circular()

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.

Parameters
[in]depthReadable count-entry finite nonnegative water depths in ft.
[in]y_fullReadable 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_maxReadable count-entry positive widths ft.
[out]widthWritable count-entry result span, top width ft.
[in]countNonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes.
Here is the call graph for this function:

◆ width_rect()

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.

Parameters
[in]w_maxReadable count-entry positive widths ft.
[out]widthWritable count-entry result span, top width ft.
[in]countNonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes.

◆ width_rect_closed()

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.

Parameters
[in]depthReadable count-entry finite nonnegative water depths in ft.
[in]nrmReadable 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_maxReadable count-entry positive widths ft.
[out]widthWritable count-entry result span, top width ft.
[in]countNonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes.
Here is the call graph for this function:

◆ width_tabulated()

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.

Parameters
[in]depthReadable count-entry finite nonnegative water depths in ft.
[in]y_fullReadable 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_maxReadable count-entry positive widths ft.
[in]tableNon-NULL borrowed readable table_size-entry shared normalized table; proper monotonicity required for inverse lookup.
[in]table_sizeShared logical table length>=4 for quadratic lookup; table grid is equally spaced over normalized depth/area0..1.
[out]widthWritable count-entry result span, top width ft.
[in]countNonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes.
Here is the call graph for this function:

◆ width_trapezoidal()

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.

Parameters
[in]depthReadable count-entry finite nonnegative water depths in ft.
[in]y_botReadable count-entry nonnegative trapezoid bottom widths ft.
[in]s_botReadable count-entry average horizontal/vertical side slopes.
[out]widthWritable count-entry result span, top width ft.
[in]countNonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes.
Here is the call graph for this function:

◆ width_triangular()

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.

Parameters
[in]depthReadable count-entry finite nonnegative water depths in ft.
[in]s_botReadable count-entry average horizontal/vertical side slopes.
[out]widthWritable count-entry result span, top width ft.
[in]countNonnegative batch length; each non-NULL span must cover this many entries;0 performs no element reads/writes.
Here is the call graph for this function: