![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
Classes | |
| struct | Closure |
| struct | Flux |
| struct | Jet |
| struct | State |
Functions | |
| Jet | operator+ (const Jet &a, const Jet &b) |
| Add two forward-mode values. | |
| Jet | operator- (const Jet &a, const Jet &b) |
| Subtract two forward-mode values. | |
| Jet | operator* (const Jet &a, const Jet &b) |
| Multiply two forward-mode values using the product rule. | |
| Jet | operator/ (const Jet &a, const Jet &b) |
| Divide two forward-mode values using the quotient rule. | |
| Jet | mapped (double value, double slope, const Jet &x) |
| Lift a known scalar function value and slope through an input jet. | |
| Jet | minimum (const Jet &a, const Jet &b) |
| Select the local minimum branch and preserve that branch derivative. | |
| Jet | maximum (const Jet &a, const Jet &b) |
| Select the local maximum branch and preserve that branch derivative. | |
| bool | finite (const Jet &x) |
| Check a primal value and every directional derivative for finite arithmetic. | |
| Closure | closure (const FvClosure &c, const Jet &h) |
| Differentiate wet closure area, width and pressure integral with respect to depth. | |
| double | radiusSlope (const FvClosure &c, double h) |
| Evaluate the active wet friction-radius derivative with respect to depth. | |
| State | state (const FvClosure &table, const Jet &h, const Jet &velocity, uint8_t press) |
| Construct a differentiated wet face state from depth and velocity. | |
| Flux | flux (const State &l, const State &r) |
| Differentiate the active wet HLL hydraulic flux and pressure-bore bounds. | |
Differentiate wet closure area, width and pressure integral with respect to depth.
Uses the shared closureEval primal, maps dA/dh=width and dI1/dh=area, and derives dwidth/dh from the active polynomial/cubic panel (zero above crown). At panel/branch boundaries this is the selected one-sided derivative. Dry width clamping is not differentiated as an independent nonsmooth operator; callers restrict admissible wet states. No allocation or mutation.
| [in] | c | Initialized immutable monotone native closure, with positive panel spacing and valid samples. |
| [in] | h | Strictly positive finite wet depth jet in ft; dry branches are outside this differentiation contract. |
|
inline |
Check a primal value and every directional derivative for finite arithmetic.
| [in] | x | Jet to inspect; no fields are modified. |
Differentiate the active wet HLL hydraulic flux and pressure-bore bounds.
Selects the same primal branches as wet waveSpeeds/riemannFlux, including rankine-hugoniot min/max pressure bounds and first-operand ties. Supersonic branches use physical flux; a straddling fan requires nonzero sr-sl. Branch derivatives include changing wave speeds rather than frozen coefficients. Dry-state rarefaction branches, gates, positivity factors and hydrostatic side corrections are not included; this routine is valid only on an admissible wet branch.
| [in] | l | Finite strictly wet left differentiated face state in native aggregate units. |
| [in] | r | Finite strictly wet right state in the same geometry/orientation and derivative basis. |
Lift a known scalar function value and slope through an input jet.
| [in] | value | Primal f(x.v), supplied by the caller. |
| [in] | slope | Scalar derivative df/dx at x.v, in output/input units. |
| [in] | x | Input jet supplying five directional derivatives. |
Select the local maximum branch and preserve that branch derivative.
Matches std::max first-operand tie behavior; does not freeze the selected numerical derivative.
| [in] | a | Left primal value and five derivatives in the current local variable basis. |
| [in] | b | Right primal value and derivatives using the same basis. |
Select the local minimum branch and preserve that branch derivative.
No generalized derivative across the branch boundary is formed; NaN comparisons follow ordinary floating-point rules.
| [in] | a | Left primal value and five derivatives in the current local variable basis. |
| [in] | b | Right primal value and derivatives using the same basis. |
Multiply two forward-mode values using the product rule.
Units multiply; overflow/nonfinite values propagate.
| [in] | a | Left primal value and five derivatives in the current local variable basis. |
| [in] | b | Right primal value and derivatives using the same basis. |
Add two forward-mode values.
No validation, mutation or heap allocation.
| [in] | a | Left primal value and five derivatives in the current local variable basis. |
| [in] | b | Right primal value and derivatives using the same basis. |
Subtract two forward-mode values.
No validation, mutation or heap allocation.
| [in] | a | Left primal value and five derivatives in the current local variable basis. |
| [in] | b | Right primal value and derivatives using the same basis. |
Divide two forward-mode values using the quotient rule.
Requires finite nonzero b.v for finite arithmetic; zero/overflow is not diagnosed.
| [in] | a | Left primal value and five derivatives in the current local variable basis. |
| [in] | b | Right primal value and derivatives using the same basis. |
|
inline |
Evaluate the active wet friction-radius derivative with respect to depth.
Does not apply a dry floor, denominator safeguard or nonfinite validation. Table-panel ties use the panel selected by closureLocate.
| [in] | c | Initialized immutable native closure; polynomial perimeter must be nonzero. |
| [in] | h | Positive finite depth in ft; valid table-locate range is required below crown. |
|
inline |
Construct a differentiated wet face state from depth and velocity.
Celerity derivatives divide by both wet area and width. A dry/zero-width state can therefore produce nonfinite derivatives even when the shared scalar celerity returns zero; callers must reject such states before using this wet-only derivative path. Does not select a TPA closure from press; the supplied table closure is always evaluated.
| [in] | table | Initialized immutable closure with positive wet area/top width. |
| [in] | h | Strictly wet depth jet in ft; scalar area must exceed kDryArea. |
| [in] | velocity | Velocity jet in ft/s using the same local derivative basis. |
| [in] | press | Regime flag copied into the result: 0 free, 1 pressure, 2 excluded node ghost. |