|
| 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) |
| |
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.