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
mesh2drunlayer.h
Go to the documentation of this file.
1
28#ifndef OPENSWMMVIS_PLOT_MESH2DRUNLAYER_H
29#define OPENSWMMVIS_PLOT_MESH2DRUNLAYER_H
30
31#include "plot/irunlayer.h"
32
33#include <QPointer>
34
36
37namespace openswmmvis::plot {
38
39class Mesh2DRunLayer final : public IRunLayer
40{
41public:
43 ~Mesh2DRunLayer() override = default;
44
45 SWMM2DResultsLayer *layer() const { return m_layer.data(); }
46
47 // IRunLayer
48 QString scenarioName() const override;
49 UnitSystem unitSystem() const override;
50 double startDateJulian() const override;
51 int periodCount() const override;
52 int reportStepSeconds() const override;
53 QString persistenceKey() const override;
54
55 void getSeriesAt(const ObjectRef& ref,
56 PlotAttribute attr,
57 SeriesData& out) const override;
58
59 bool supportsAttribute(PlotAttribute attr) const override;
60
61private:
63 void ensureZBedCache_() const;
64
69 void ensureVertexAdjCache_() const;
70
75 bool reconstructVelocityAtCell_(int triIdx, int nv,
76 const std::vector<float>& flux,
77 const std::vector<float>& edge_len,
78 const std::vector<float>& edge_nx,
79 const std::vector<float>& edge_ny,
80 double depth,
81 double dryDepth,
82 double& vx_out,
83 double& vy_out) const;
84
85 QPointer<SWMM2DResultsLayer> m_layer;
86 mutable std::vector<float> m_zBed;
87 mutable bool m_zBedReady = false;
88
89 mutable std::vector<std::vector<int>> m_vertexTris;
90 mutable std::vector<unsigned char> m_cellNv;
91 mutable std::vector<float> m_vertexZ;
92 mutable bool m_vertexAdjReady = false;
93};
94
95} // namespace openswmmvis::plot
96
97#endif // OPENSWMMVIS_PLOT_MESH2DRUNLAYER_H
Definition swmm2dresultslayer.h:550
Per-project flow-units state + label helpers.
Definition unitsystem.h:28
Abstract source backing one comparison-plot run.
Definition irunlayer.h:171
Definition mesh2drunlayer.h:40
void getSeriesAt(const ObjectRef &ref, PlotAttribute attr, SeriesData &out) const override
Resolve a series. Returns timesJulian + values for the spec. Implementations are responsible for reso...
Definition mesh2drunlayer.cpp:219
QString persistenceKey() const override
Stable identity string for .oswp round-trip. Defaults to the scenario name; subclasses may override w...
Definition mesh2drunlayer.cpp:71
int reportStepSeconds() const override
Report step in seconds. 0 if unknown.
Definition mesh2drunlayer.cpp:57
UnitSystem unitSystem() const override
Unit system the source advertises (drives axis labels).
Definition mesh2drunlayer.cpp:32
QString scenarioName() const override
Human label shown in the SeriesPanel tree + legends.
Definition mesh2drunlayer.cpp:27
int periodCount() const override
Total number of time periods available (grows during live mode).
Definition mesh2drunlayer.cpp:50
bool supportsAttribute(PlotAttribute attr) const override
Convenience: does this source carry the given attribute at all? Default impl returns true; subclasses...
Definition mesh2drunlayer.cpp:77
SWMM2DResultsLayer * layer() const
Definition mesh2drunlayer.h:45
double startDateJulian() const override
Start date of the simulation as SWMM Julian, or NaN if unknown.
Definition mesh2drunlayer.cpp:40
~Mesh2DRunLayer() override=default
Slice BL — abstract "data-source" that the ComparisonPlotModel reads timeseries from.
int nv
Definition meshenginesync.cpp:32
Definition chartproperties.h:34
PlotAttribute
What a series plots. One row per attribute in the Nx2 grid.
Definition plotattribute.h:38
EdgeRef ref
Definition pslgminsize.cpp:377
Identifies what object a series is about. Kind is the discriminator; the active union member is impli...
Definition irunlayer.h:38
Result of one series resolution. Times are SWMM DateTime doubles (OLE-Automation epoch,...
Definition irunlayer.h:151