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 File Reference

Slice CF.3 — IRunLayer adapter wrapping a SWMM2DResultsLayer. More...

#include "plot/irunlayer.h"
#include <QPointer>
Include dependency graph for mesh2drunlayer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  openswmmvis::plot::Mesh2DRunLayer
 

Namespaces

namespace  openswmmvis
 
namespace  openswmmvis::plot
 

Detailed Description

Slice CF.3 — IRunLayer adapter wrapping a SWMM2DResultsLayer.

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
Date
2026
License\n GPL-3.0-or-later

Lets the Comparison Plot Dialog treat a 2D mesh results layer as a first-class RunSource, identical in surface to a 1D .out adapter. The model holds a shared_ptr<IRunLayer>; the adapter holds a QPointer<SWMM2DResultsLayer> and resolves it on every call so a project-close cleanly invalidates outstanding plot series.

Series resolution per attribute:

  • Mesh2DDepth → IMesh2DSource::readDepthsAt over all time idx
  • Mesh2DHGL → depth + z_bed (mean of triangle vertex z's, cached on the layer)
  • Mesh2DVelocityX → RT0 reconstruction from edge fluxes
  • Mesh2DVelocityY → "
  • Mesh2DVelocityMag→ sqrt(Vx² + Vy²)
  • Mesh2DRainfall → /Mesh2_face_rainfall (m/s → mm/hr)
  • Mesh2DRainVolume → /Mesh2_face_rain_cum (cumulative m³ per cell)

Time axis: simulated wall-clock times are pulled from the source's simTimeAt(timeIdx). The adapter converts back to SWMM Julian days for the model's common timeline.