SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
profileattributesampler.h
Go to the documentation of this file.
1
26#ifndef OPENSWMMVIS_PLOT_PROFILEATTRIBUTESAMPLER_H
27#define OPENSWMMVIS_PLOT_PROFILEATTRIBUTESAMPLER_H
28
29#include "plot/plotattribute.h"
30#include "plot/profilebuilder.h"
31
32#include <QVector>
33
35
37{
38
51{
54 bool isNodeAttribute = true;
55 int periodCount = 0;
56
57 QVector<QVector<float>> byPath;
58 QVector<float> minByPath;
59 QVector<float> maxByPath;
60};
61
66{
68 switch (attr) {
69 case PA::NodeDepth:
70 case PA::NodeHead:
71 case PA::NodeVolume:
72 case PA::NodeLateralInflow:
73 case PA::NodeTotalInflow:
74 case PA::NodeOverflow:
75 return true;
76 default:
77 return false;
78 }
79}
80
83{
85 if (isNodeAttribute(attr)) return true;
86 switch (attr) {
87 case PA::LinkFlow:
88 case PA::LinkDepth:
89 case PA::LinkVelocity:
90 case PA::LinkVolume:
91 case PA::LinkCapacity:
92 return true;
93 default:
94 return false;
95 }
96}
97
105[[nodiscard]] AttributeProfile fetch(SWMMResultsLayer *resultsLayer,
108
121[[nodiscard]] AttributeProfile fetchSpecies(
122 SWMMResultsLayer *resultsLayer,
124 const QString &species,
125 bool nodeScope);
126
127} // namespace ProfileAttributeSampler
128
129#endif // OPENSWMMVIS_PLOT_PROFILEATTRIBUTESAMPLER_H
Overlays time-stepped simulation results on the SWMM network geometry.
Definition swmmresultslayer.h:96
Definition profileattributesampler.h:37
bool isNodeAttribute(openswmmvis::plot::PlotAttribute attr)
True for the six Node* attributes, false for everything else. Inline (header-only) so UI code and tes...
Definition profileattributesampler.h:65
AttributeProfile fetch(SWMMResultsLayer *resultsLayer, const ProfileBuilder::PathStatic &path, openswmmvis::plot::PlotAttribute attr)
Fetches the full-simulation profile of attr along path from resultsLayer's open output file.
bool isTrackableAttribute(openswmmvis::plot::PlotAttribute attr)
True when attr is one of the 11 attributes a track can show.
Definition profileattributesampler.h:82
AttributeProfile fetchSpecies(SWMMResultsLayer *resultsLayer, const ProfileBuilder::PathStatic &path, const QString &species, bool nodeScope)
Species variant (Y2b-2 follow-up, amendment D-Y4): fetches the along-the-path profile of one species ...
Definition profileattributesampler.cpp:100
PlotAttribute
What a series plots. One row per attribute in the Nx2 grid.
Definition plotattribute.h:38
Slice BL — canonical enumeration of plottable result attributes.
Pure-logic data assembly for Slice BC's longitudinal profile plot: chainage, HGL/EGL time-series,...
int path
Definition pslgminsize.cpp:234
One attribute × one source, sampled along the whole path for the whole simulation.
Definition profileattributesampler.h:51
openswmmvis::plot::PlotAttribute attribute
Definition profileattributesampler.h:52
int periodCount
Definition profileattributesampler.h:55
QVector< float > minByPath
[pathIdx], NaN when no data
Definition profileattributesampler.h:58
bool isNodeAttribute
Definition profileattributesampler.h:54
QVector< QVector< float > > byPath
[pathIdx][period]
Definition profileattributesampler.h:57
QVector< float > maxByPath
[pathIdx], NaN when no data
Definition profileattributesampler.h:59
A fully-resolved profile path: ordered nodes, joining links, and cumulative chainage from nodes[0] to...
Definition profilebuilder.h:242