Canonical unique interior-edge layout + per-cell incidence for the local-inertial scheme.
More...
#include <InertialEdges.hpp>
|
| void | build (const MeshData &mesh) |
| | Build the structure from mesh topology. O(n_triangles).
|
| |
| bool | empty () const noexcept |
| |
|
| int | ne = 0 |
| | number of interior (q-carrying) edges
|
| |
| std::vector< int > | cL |
| |
| std::vector< int > | cR |
| | incident cell indices
|
| |
| std::vector< double > | xi |
| | edge length ξ (m)
|
| |
| std::vector< double > | inv_dx |
| | 1 / centroid-to-centroid distance (1/m)
|
| |
| std::vector< double > | zface |
| |
| std::vector< double > | ze_lo |
| |
| std::vector< double > | ze_hi |
| |
| std::vector< int > | slotL |
| |
| std::vector< int > | slotR |
| | flat mesh edge slots [cell*kMaxCellVerts+e] for writeback
|
| |
| std::vector< double > | nx |
| |
| std::vector< double > | ny |
| | unit normal, oriented cL→cR
|
| |
| std::vector< double > | mx |
| |
| std::vector< double > | my |
| |
| std::vector< double > | inv_dx_normal |
| |
| std::vector< double > | n2_face |
| | (½(n_L+n_R))² Manning coefficient
|
| |
| std::vector< double > | n_face |
| |
| std::vector< double > | cell_lchar |
| |
| std::vector< double > | cell_lpos |
| |
| std::vector< int > | cell_ptr |
| | [n_triangles + 1] CSR row pointers
|
| |
| std::vector< int > | cell_edge |
| |
| std::vector< int8_t > | cell_sign |
| |
| std::vector< double > | cell_arm_x |
| |
| std::vector< double > | cell_arm_y |
| |
Canonical unique interior-edge layout + per-cell incidence for the local-inertial scheme.
◆ build()
| void openswmm::twoD::InertialEdges::build |
( |
const MeshData & | mesh | ) |
|
Build the structure from mesh topology. O(n_triangles).
◆ empty()
| bool openswmm::twoD::InertialEdges::empty |
( |
| ) |
const |
|
inlinenoexcept |
◆ cell_arm_x
| std::vector<double> openswmm::twoD::InertialEdges::cell_arm_x |
Perot arm (m⃗_e − c⃗_i) per CSR entry — the vector fireCells multiplies the signed face discharge by. Precomputed because the cell loop had to gather mx[e]/my[e] (scattered by face id) and subtract the centroid on every firing of every cell.
◆ cell_arm_y
| std::vector<double> openswmm::twoD::InertialEdges::cell_arm_y |
◆ cell_edge
| std::vector<int> openswmm::twoD::InertialEdges::cell_edge |
◆ cell_lchar
| std::vector<double> openswmm::twoD::InertialEdges::cell_lchar |
Per-CELL characteristic length (m) for the CFL step bound dt = α·L_char/√(g·h): √(2A/Σξ·inv_dx_normal) from the discrete wave operator; isolated cells fall back to 2A/ξ_max (triangle) or 2·min centroid→edge distance (quad).
◆ cell_lpos
| std::vector<double> openswmm::twoD::InertialEdges::cell_lpos |
Per-CELL positivity length 2A/P (P = full perimeter, boundary edges included; Δx/2 for a square). The FULL_SWE Godunov update uses dt = α·(2A/P)/(√(gh)+|u|): α = 1 is the linear stability limit and α = ½ the Audusse–Bristeau positivity bound (Σ_faces outflow ≤ ½·V).
◆ cell_ptr
| std::vector<int> openswmm::twoD::InertialEdges::cell_ptr |
[n_triangles + 1] CSR row pointers
◆ cell_sign
| std::vector<int8_t> openswmm::twoD::InertialEdges::cell_sign |
+1 (i==cL) / −1 (i==cR). int8: the value is only ever branched on and multiplied by exactly ±1, and as a double it cost 8 bytes of gather traffic per CSR entry in the two hottest cell loops.
◆ cL
| std::vector<int> openswmm::twoD::InertialEdges::cL |
◆ cR
| std::vector<int> openswmm::twoD::InertialEdges::cR |
◆ inv_dx
| std::vector<double> openswmm::twoD::InertialEdges::inv_dx |
1 / centroid-to-centroid distance (1/m)
◆ inv_dx_normal
| std::vector<double> openswmm::twoD::InertialEdges::inv_dx_normal |
1 / face-normal projected centroid distance: |(c⃗_R−c⃗_L)·n̂|, floored at 0.3·|c⃗_R−c⃗_L| against near-degenerate pairs. The projection is the correct gradient arm under cell-size disparity; the raw centroid chord (inv_dx above) overestimates slopes on non-orthogonal triangle pairs.
◆ mx
| std::vector<double> openswmm::twoD::InertialEdges::mx |
◆ my
| std::vector<double> openswmm::twoD::InertialEdges::my |
◆ n2_face
| std::vector<double> openswmm::twoD::InertialEdges::n2_face |
(½(n_L+n_R))² Manning coefficient
◆ n_face
| std::vector<double> openswmm::twoD::InertialEdges::n_face |
½(n_L+n_R) — sqrt(n2_face) precomputed for the diffusive law
◆ ne
| int openswmm::twoD::InertialEdges::ne = 0 |
number of interior (q-carrying) edges
◆ nx
| std::vector<double> openswmm::twoD::InertialEdges::nx |
◆ ny
| std::vector<double> openswmm::twoD::InertialEdges::ny |
unit normal, oriented cL→cR
◆ slotL
| std::vector<int> openswmm::twoD::InertialEdges::slotL |
◆ slotR
| std::vector<int> openswmm::twoD::InertialEdges::slotR |
flat mesh edge slots [cell*kMaxCellVerts+e] for writeback
◆ xi
| std::vector<double> openswmm::twoD::InertialEdges::xi |
◆ ze_hi
| std::vector<double> openswmm::twoD::InertialEdges::ze_hi |
◆ ze_lo
| std::vector<double> openswmm::twoD::InertialEdges::ze_lo |
Shared edge's TRUE endpoint bed elevations, sorted ze_lo ≤ ze_hi (m). Used by FACE_RECONSTRUCTION = VFR_FACE to evaluate the B&S Eq. 14 wetted-edge depth so thin crests block at their real elevation instead of the centroid-diluted zface (same endpoint rule as the boundary path's edgeEndpointZ — both incident cells see the identical pair).
◆ zface
| std::vector<double> openswmm::twoD::InertialEdges::zface |
max(tri_cz[cL], tri_cz[cR]) interface bed (m) — MEAN face mode
The documentation for this struct was generated from the following files:
- /home/runner/work/openswmm.engine/openswmm.engine/src/engine/2d/solver/InertialEdges.hpp
- /home/runner/work/openswmm.engine/openswmm.engine/src/engine/2d/solver/InertialEdges.cpp