![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Classes | |
| struct | BranchLink |
| One link incident to a path node, described from that node's point of view. More... | |
| struct | Diagnostic |
Returned from validate() to flag malformed inputs without triggering exceptions. Empty error means "OK". More... | |
| struct | LinkStatic |
| Time-invariant per-link properties. Only links present on the chosen path are populated. Indices in PathStatic::links are 0..N-1 where N == PathStatic::nodes.size() - 1, and link[i] joins node[i] → node[i+1] in path-traversal order (which may differ from the underlying model link's intrinsic from/to direction when the router operated in undirected mode). More... | |
| struct | NodeStatic |
Time-invariant per-node properties needed by the profile plot. The "rim" elevation is always invertElev + maxDepth — terrain DEMs only override the ground line drawn behind the manhole glyph (see PathStatic::terrainSamples), never the rim itself. More... | |
| struct | PathStatic |
A fully-resolved profile path: ordered nodes, joining links, and cumulative chainage from nodes[0] to each subsequent node. chainage.size() == nodes.size() and chainage[0] == 0.0. More... | |
| struct | SourceDerived |
Output of compute(): per-source HGL/EGL series and per-node envelope min/max. Sized to match the input SourceSeries. More... | |
| struct | SourceSeries |
Pre-fetched per-source time-series. One instance per SWMMResultsLayer that the user wants to overlay on the plot. More... | |
Enumerations | |
| enum class | NodeKind { Junction = 0 , Outfall , Storage , Divider , VirtualJunction } |
Topology category for the manhole-glyph picker in ProfilePlotWidget. Maps 1:1 to the relevant SWMMModelLayer::Category values; kept as a self-contained enum so this header has no model-layer dependency. More... | |
| enum class | LinkKind { Conduit = 0 , Pump , Orifice , Weir , Outlet } |
| Connector category for the conduit-vs-glyph render branch in ProfilePlotWidget. More... | |
| enum class | OutputKind { HGL = 0 , EGL , WaterSurface , MaxHGL , MaxEGL , MinHGL , MinEGL , MaxWaterSurface , MinWaterSurface } |
| Which elevation-axis quantity a profile series represents. Every option resolves to an elevation (ft or m) so all series can share the y-axis. Used by the multi-output/multi-model overlay: each series in the profile is (resultsLayer × OutputKind). More... | |
Functions | |
| QVector< double > | computeChainage (const QVector< LinkStatic > &links) |
Computes cumulative chainage from the first node. chainage[0] = 0.0, chainage[i] = chainage[i-1] + links[i-1].length. Returns the populated array — does not mutate path. | |
| double | groundElev (const NodeStatic &n) |
Returns the ground elevation at node i along the path. Equivalent to nodes[i].invertElev + nodes[i].maxDepth. | |
| double | conduitInvertUpstream (const PathStatic &path, int linkIdx) |
Returns the conduit-invert elevation at the upstream end of link i along the path: nodes[i].invertElev + links[i].offset1. | |
| double | conduitInvertDownstream (const PathStatic &path, int linkIdx) |
Symmetric to conduitInvertUpstream for the downstream end: nodes[i+1].invertElev + links[i].offset2. | |
| double | velocityHead (const PathStatic &path, const SourceSeries &src, int nodeIdx, int period, double gravity) |
Velocity-head at node nodeIdx for the given source at period p, using the path-direction convention: head node uses downstream velocity only, tail node uses upstream only, interior nodes average the two incident links. Returns 0.0 if velocity data is missing or the period is out of range. Uses |v|. | |
| double | eglAtPeriod (const PathStatic &path, const SourceSeries &src, int nodeIdx, int period, double gravity) |
Convenience: EGL at node nodeIdx, period p = HGL(nodeIdx, p) + velocityHead(nodeIdx, p, g). | |
| Diagnostic | validate (const PathStatic &path, const SourceSeries &src) |
| Sanity-checks a PathStatic + SourceSeries pair before compute(). Catches: empty path (< 2 nodes), links-count mismatch (must be nodes-1), mismatched series array sizes vs path size, zero report step on a non-empty series, etc. | |
| SourceDerived | compute (const PathStatic &path, const SourceSeries &src, double gravity) |
Builds per-node HGL/EGL time-series and per-node envelope min/max for a single source. Assumes the input has passed validate(). Returns an empty SourceDerived on validation failure. | |
| bool | appendPeriods (const PathStatic &path, const SourceSeries &src, double gravity, SourceDerived &derived) |
Live results: extend a SourceDerived built over the first derived.hglByPeriod.size() periods of src with the periods src has gained since. src must be the full (grown) series. Appends one period-major row per new period and updates the running envelopes; the result is identical to compute() over the whole series (both use accumulatePeriod). Returns false and leaves derived untouched when src does not validate, has fewer periods than derived, or derived is not a compute() of this path. A no-op success when nothing was appended. | |
| void | accumulatePeriod (const PathStatic &path, const SourceSeries &src, int p, double gravity, SourceDerived &out) |
The per-period kernel shared by compute() and appendPeriods(): fills period p's rows of out (which must already be sized and NaN-filled for p) and folds the values into the envelopes. | |
Variables | |
| constexpr double | kGravityFps2 = 32.174 |
Standard gravitational acceleration in the two unit systems SWMM supports. Caller passes whichever applies to its .out file. | |
| constexpr double | kGravityMps2 = 9.80665 |
| constexpr double | kNoBearing = 1.0e9 |
|
strong |
Connector category for the conduit-vs-glyph render branch in ProfilePlotWidget.
| Enumerator | |
|---|---|
| Conduit | |
| Pump | |
| Orifice | |
| Weir | |
| Outlet | |
|
strong |
Topology category for the manhole-glyph picker in ProfilePlotWidget. Maps 1:1 to the relevant SWMMModelLayer::Category values; kept as a self-contained enum so this header has no model-layer dependency.
|
strong |
Which elevation-axis quantity a profile series represents. Every option resolves to an elevation (ft or m) so all series can share the y-axis. Used by the multi-output/multi-model overlay: each series in the profile is (resultsLayer × OutputKind).
Mapping to ProfileBuilder::SourceDerived arrays:
| Enumerator | |
|---|---|
| HGL | |
| EGL | |
| WaterSurface | |
| MaxHGL | |
| MaxEGL | |
| MinHGL | |
| MinEGL | |
| MaxWaterSurface | |
| MinWaterSurface | |
| void ProfileBuilder::accumulatePeriod | ( | const PathStatic & | path, |
| const SourceSeries & | src, | ||
| int | p, | ||
| double | gravity, | ||
| SourceDerived & | out | ||
| ) |
The per-period kernel shared by compute() and appendPeriods(): fills period p's rows of out (which must already be sized and NaN-filled for p) and folds the values into the envelopes.
| bool ProfileBuilder::appendPeriods | ( | const PathStatic & | path, |
| const SourceSeries & | src, | ||
| double | gravity, | ||
| SourceDerived & | derived | ||
| ) |
Live results: extend a SourceDerived built over the first derived.hglByPeriod.size() periods of src with the periods src has gained since. src must be the full (grown) series. Appends one period-major row per new period and updates the running envelopes; the result is identical to compute() over the whole series (both use accumulatePeriod). Returns false and leaves derived untouched when src does not validate, has fewer periods than derived, or derived is not a compute() of this path. A no-op success when nothing was appended.
| SourceDerived ProfileBuilder::compute | ( | const PathStatic & | path, |
| const SourceSeries & | src, | ||
| double | gravity | ||
| ) |
Builds per-node HGL/EGL time-series and per-node envelope min/max for a single source. Assumes the input has passed validate(). Returns an empty SourceDerived on validation failure.
| QVector< double > ProfileBuilder::computeChainage | ( | const QVector< LinkStatic > & | links | ) |
Computes cumulative chainage from the first node. chainage[0] = 0.0, chainage[i] = chainage[i-1] + links[i-1].length. Returns the populated array — does not mutate path.
| double ProfileBuilder::conduitInvertDownstream | ( | const PathStatic & | path, |
| int | linkIdx | ||
| ) |
Symmetric to conduitInvertUpstream for the downstream end: nodes[i+1].invertElev + links[i].offset2.
| double ProfileBuilder::conduitInvertUpstream | ( | const PathStatic & | path, |
| int | linkIdx | ||
| ) |
Returns the conduit-invert elevation at the upstream end of link i along the path: nodes[i].invertElev + links[i].offset1.
| double ProfileBuilder::eglAtPeriod | ( | const PathStatic & | path, |
| const SourceSeries & | src, | ||
| int | nodeIdx, | ||
| int | period, | ||
| double | gravity | ||
| ) |
Convenience: EGL at node nodeIdx, period p = HGL(nodeIdx, p) + velocityHead(nodeIdx, p, g).
| double ProfileBuilder::groundElev | ( | const NodeStatic & | n | ) |
Returns the ground elevation at node i along the path. Equivalent to nodes[i].invertElev + nodes[i].maxDepth.
| Diagnostic ProfileBuilder::validate | ( | const PathStatic & | path, |
| const SourceSeries & | src | ||
| ) |
Sanity-checks a PathStatic + SourceSeries pair before compute(). Catches: empty path (< 2 nodes), links-count mismatch (must be nodes-1), mismatched series array sizes vs path size, zero report step on a non-empty series, etc.
| double ProfileBuilder::velocityHead | ( | const PathStatic & | path, |
| const SourceSeries & | src, | ||
| int | nodeIdx, | ||
| int | period, | ||
| double | gravity | ||
| ) |
Velocity-head at node nodeIdx for the given source at period p, using the path-direction convention: head node uses downstream velocity only, tail node uses upstream only, interior nodes average the two incident links. Returns 0.0 if velocity data is missing or the period is out of range. Uses |v|.
|
inlineconstexpr |
Standard gravitational acceleration in the two unit systems SWMM supports. Caller passes whichever applies to its .out file.
ft / s² — US flow units.
|
inlineconstexpr |
m / s² — SI flow units.
|
inlineconstexpr |
Sentinel for BranchLink::bearingRad when a link's plan geometry is degenerate and no honest bearing exists. Outside [-pi, pi], so a renderer that forgets to check draws nothing sensible rather than a plausible-but- wrong north spoke.