![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Classes | |
| struct | BlendResult |
| Outcome of one blend. More... | |
| struct | Box |
A constant-intensity interval, [t0, t1), in depth/hour. More... | |
| struct | SeriesPoint |
| One (time, value) entry of a rainfall series. More... | |
| struct | SourceGage |
| A contributing gage: its series plus everything needed to read it. More... | |
Enumerations | |
| enum class | RainType { Intensity = 0 , Volume = 1 , Cumulative = 2 } |
| Rain-data format, matching SWMM_GageRainType. More... | |
Functions | |
| QVector< Box > | toBoxes (const SourceGage &source) |
| Expand one source into explicit intensity boxes. | |
| double | boxDepth (const QVector< Box > &boxes) |
| Total depth carried by a box list. | |
| double | engineDepth (const QVector< SeriesPoint > &points, qint64 intervalSec, RainType rainType=RainType::Intensity, double scaleFactor=1.0) |
| Total depth of an emitted series under the ENGINE's boxcar rule. | |
| BlendResult | blend (const QVector< SourceGage > &sources, const QVector< double > &weights) |
Blend sources under weights into one INTENSITY series. | |
Variables | |
| constexpr int | kMaxGridCells = 200000 |
| Ceiling on grid cells, so a pathological gcd cannot melt the model. | |
| constexpr double | kVolumeTolerance = 1e-9 |
| Relative tolerance for the volume-conservation check. | |
|
strong |
| BlendResult GageBlend::blend | ( | const QVector< SourceGage > & | sources, |
| const QVector< double > & | weights | ||
| ) |
Blend sources under weights into one INTENSITY series.
| sources | Contributing gages; must be non-empty and index-aligned with weights. |
| weights | Blend weights; need not sum to exactly 1 (they are used as given, so the caller's normalisation is what is honoured). |
Refused: a source with no usable entry; a non-positive interval, one that is not a whole number of minutes, or one over 24 h (the INP writer stores h:mm, so anything else cannot round-trip); a grid that would exceed kMaxGridCells; and sources whose time spans are disjoint by more than a year, which is the signature of a relative-hours series mixed with absolute-dated ones.
Total depth carried by a box list.
| double GageBlend::engineDepth | ( | const QVector< SeriesPoint > & | points, |
| qint64 | intervalSec, | ||
| RainType | rainType = RainType::Intensity, |
||
| double | scaleFactor = 1.0 |
||
| ) |
Total depth of an emitted series under the ENGINE's boxcar rule.
Re-derives what the engine would actually apply, rather than what the blend intended, so it can be used to verify a series after it has round-tripped through storage. Any entry lost, reordered, or rounded on the way shows up here.
| QVector< Box > GageBlend::toBoxes | ( | const SourceGage & | source | ) |
Expand one source into explicit intensity boxes.
Folds in the gage's own interval, rain type, and scale factor. The box for entry k ends at min(t_k + interval, t_{k+1}); that min is load-bearing, because an entry starting before the previous box ends preempts it in the engine. Without it, a series whose entries are spaced closer than its declared interval reports more volume than the engine would apply.
CUMULATIVE deltas are taken by walking the entries in order, with a decrease read as a counter reset (the new value is then the whole interval's depth) — matching convertRainfall.
|
constexpr |
Ceiling on grid cells, so a pathological gcd cannot melt the model.