![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
Face kernels for MOMENTUM_EQUATION FULL_SWE — the conservative shallow-water equations with the convective term and shock capturing (plans/2D_FULL_SWE_SHOCK_CAPTURING_PLAN_2026-09-05.md §2.2). More...
#include <algorithm>#include <cmath>Go to the source code of this file.
Classes | |
| struct | openswmm::twoD::swe::FaceSide |
| struct | openswmm::twoD::swe::FaceFlux |
Namespaces | |
| namespace | openswmm |
| namespace | openswmm::twoD |
| namespace | openswmm::twoD::swe |
Macros | |
| #define | OPENSWMM_KERNEL_FN inline |
Functions | |
| OPENSWMM_KERNEL_FN void | openswmm::twoD::swe::physicalFlux (const FaceSide &s, double &fh, double &fn, double &ft) noexcept |
| Physical flux of the SWE in the normal frame: [h·un, h·un² + ½g h², h·un·ut]. | |
| OPENSWMM_KERNEL_FN void | openswmm::twoD::swe::waveSpeeds (const FaceSide &L, const FaceSide &R, double &sl, double &sr) noexcept |
| OPENSWMM_KERNEL_FN void | openswmm::twoD::swe::hllcFlux (const FaceSide &L, const FaceSide &R, double &fh, double &fn, double &ft, double &sstar) noexcept |
| HLLC flux in the face-normal frame. | |
| OPENSWMM_KERNEL_FN bool | openswmm::twoD::swe::faceFlux (double etaL, double hL, double qxL, double qyL, double etaR, double hR, double qxR, double qyR, double nx, double ny, double h_dry, FaceFlux &out, double &corrL_x, double &corrL_y, double &corrR_x, double &corrR_y) noexcept |
| Full face evaluation: hydrostatic reconstruction, rotation, HLLC, rotation back, and the per-side bed-slope corrections. | |
| OPENSWMM_KERNEL_FN bool | openswmm::twoD::swe::faceFluxRecon (double etaLf, double uxLf, double uyLf, double zL, double hL_cell, double etaRf, double uxRf, double uyRf, double zR, double hR_cell, double nx, double ny, double h_dry, FaceFlux &out, double &corrL_x, double &corrL_y, double &corrR_x, double &corrR_y) noexcept |
| Face flux from RECONSTRUCTED side states (RECONSTRUCTION_ORDER 2). | |
| OPENSWMM_KERNEL_FN double | openswmm::twoD::swe::bjLimiter (double w, double wf, double wmin, double wmax) noexcept |
| OPENSWMM_KERNEL_FN void | openswmm::twoD::swe::frictionUpdate (double &qx, double &qy, double h, double n, double dt) noexcept |
| OPENSWMM_KERNEL_FN double | openswmm::twoD::swe::criticalDepth (double q) noexcept |
| OPENSWMM_KERNEL_FN double | openswmm::twoD::swe::depthFromInvariantAndDischarge (double r, double q, double h_interior) noexcept |
| Ghost depth of a SUBCRITICAL prescribed-discharge boundary. | |
Variables | |
| constexpr double | openswmm::twoD::swe::kGravity = 9.80665 |
Face kernels for MOMENTUM_EQUATION FULL_SWE — the conservative shallow-water equations with the convective term and shock capturing (plans/2D_FULL_SWE_SHOCK_CAPTURING_PLAN_2026-09-05.md §2.2).
Cell state (h, q⃗ = h·u⃗) per cell; a face between cells L and R with unit normal n̂ (L→R) evaluates one Godunov flux:
Friction is applied per cell after the flux update, semi-implicit (the same division the local-inertial face law uses), which can only shrink |q⃗| and never reverses it (Liang & Marche 2009's stopping condition is satisfied by construction).
Everything is plain scalar arithmetic over raw values so the same bodies can be annotated for Kokkos later (OPENSWMM_KERNEL_FN).
| #define OPENSWMM_KERNEL_FN inline |