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

The analytic shape formulas — the single definition of each. More...

Functions

OPENSWMM_KERNEL_FN double rectAofY (double y, double w_max)
 
OPENSWMM_KERNEL_FN double trapezAofY (double y, double y_bot, double s_bot)
 
OPENSWMM_KERNEL_FN double triangAofY (double y, double s_bot)
 
OPENSWMM_KERNEL_FN double parabAofY (double y, double r_bot)
 
OPENSWMM_KERNEL_FN double powerfuncAofY (double y, double s_bot, double r_bot)
 
OPENSWMM_KERNEL_FN double rectClosedRofA (double a, double w_max, double a_full)
 
OPENSWMM_KERNEL_FN double rectOpenRofA (double a, double w_max, double s_bot)
 
OPENSWMM_KERNEL_FN double trapezRofY (double y, double y_bot, double s_bot, double r_bot)
 
OPENSWMM_KERNEL_FN double triangRofY (double y, double s_bot, double r_bot)
 
OPENSWMM_KERNEL_FN double rectClosedWofY (double y_norm, double w_max)
 
OPENSWMM_KERNEL_FN double trapezWofY (double y, double y_bot, double s_bot)
 
OPENSWMM_KERNEL_FN double triangWofY (double y, double s_bot)
 
OPENSWMM_KERNEL_FN double parabWofY (double y, double r_bot)
 
OPENSWMM_KERNEL_FN double powerfuncWofY (double y, double s_bot, double r_bot)
 

Detailed Description

The analytic shape formulas — the single definition of each.

These are the shapes whose geometry is a closed-form expression rather than a table lookup. They live outside XsectEval because they need no tables at all, which lets the two consumers that are shaped differently share them:

  • XsectEval's per-element methods (host DW scalar fallbacks, FV, device), which unpack an XSectParams; and
  • xsect_batch's SoA loops (XSectBatch.cpp), which DWSolver's computeLinkGeometry STEP B/D runs on and which read parallel arrays.

Both call the same function on the same operands, so the two paths cannot drift — which is the point (plan §5.1, Phase 4b). Each body is legacy xsect.c verbatim, including operand order and the guards: multiplication is not associative in IEEE-754, so y*y*sBot and sBot*y*y are different computations and only the first is legacy's.

The y/a guards are legacy's own (xsect_getRofA's a <= 0 early return for the rect family, trapez_getRofY's y == 0). STEP A floors every conduit depth at FUDGE before STEP B/D sees it, so on the DW path they are unreachable either way; they are here so the shared body is complete rather than context-dependent.

Function Documentation

◆ parabAofY()

OPENSWMM_KERNEL_FN double openswmm::xsect::shape::parabAofY ( double y,
double r_bot )
Here is the caller graph for this function:

◆ parabWofY()

OPENSWMM_KERNEL_FN double openswmm::xsect::shape::parabWofY ( double y,
double r_bot )
Here is the caller graph for this function:

◆ powerfuncAofY()

OPENSWMM_KERNEL_FN double openswmm::xsect::shape::powerfuncAofY ( double y,
double s_bot,
double r_bot )
Here is the caller graph for this function:

◆ powerfuncWofY()

OPENSWMM_KERNEL_FN double openswmm::xsect::shape::powerfuncWofY ( double y,
double s_bot,
double r_bot )
Here is the caller graph for this function:

◆ rectAofY()

OPENSWMM_KERNEL_FN double openswmm::xsect::shape::rectAofY ( double y,
double w_max )
Here is the caller graph for this function:

◆ rectClosedRofA()

OPENSWMM_KERNEL_FN double openswmm::xsect::shape::rectClosedRofA ( double a,
double w_max,
double a_full )

Legacy rect_closed_getRofA — including the near-full correction that grows the wetted perimeter by the crown width past RECT_ALFMAX.

Here is the caller graph for this function:

◆ rectClosedWofY()

OPENSWMM_KERNEL_FN double openswmm::xsect::shape::rectClosedWofY ( double y_norm,
double w_max )

Legacy getWofY RECT_CLOSED: the tabulated crown width is 0 exactly at y == y_full, so the caller passes the normalized depth, not the depth.

Here is the caller graph for this function:

◆ rectOpenRofA()

OPENSWMM_KERNEL_FN double openswmm::xsect::shape::rectOpenRofA ( double a,
double w_max,
double s_bot )

Legacy xsect_getRofA's RECT_OPEN arm; s_bot is the count of banks excluded from the perimeter (0, 1 or 2).

Here is the caller graph for this function:

◆ trapezAofY()

OPENSWMM_KERNEL_FN double openswmm::xsect::shape::trapezAofY ( double y,
double y_bot,
double s_bot )
Here is the caller graph for this function:

◆ trapezRofY()

OPENSWMM_KERNEL_FN double openswmm::xsect::shape::trapezRofY ( double y,
double y_bot,
double s_bot,
double r_bot )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ trapezWofY()

OPENSWMM_KERNEL_FN double openswmm::xsect::shape::trapezWofY ( double y,
double y_bot,
double s_bot )
Here is the caller graph for this function:

◆ triangAofY()

OPENSWMM_KERNEL_FN double openswmm::xsect::shape::triangAofY ( double y,
double s_bot )
Here is the caller graph for this function:

◆ triangRofY()

OPENSWMM_KERNEL_FN double openswmm::xsect::shape::triangRofY ( double y,
double s_bot,
double r_bot )
Here is the caller graph for this function:

◆ triangWofY()

OPENSWMM_KERNEL_FN double openswmm::xsect::shape::triangWofY ( double y,
double s_bot )
Here is the caller graph for this function: