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
plotattribute.h File Reference

Slice BL — canonical enumeration of plottable result attributes. More...

#include <QString>
#include <QVector>
Include dependency graph for plotattribute.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  openswmmvis
 
namespace  openswmmvis::plot
 

Enumerations

enum class  openswmmvis::plot::UnitSystem {
  openswmmvis::plot::US ,
  openswmmvis::plot::SI
}
 Unit system carried per .out file. Sourced from swmm_output_get_flow_units: 0=CFS / 1=GPM / 2=MGD → US, 3=CMS / 4=LPS / 5=MLD → SI. More...
 
enum class  openswmmvis::plot::PlotAttribute {
  openswmmvis::plot::Unknown = 0 ,
  openswmmvis::plot::NodeDepth = 1 ,
  openswmmvis::plot::NodeHead = 2 ,
  openswmmvis::plot::NodeVolume = 3 ,
  openswmmvis::plot::NodeLateralInflow = 4 ,
  openswmmvis::plot::NodeTotalInflow = 5 ,
  openswmmvis::plot::NodeOverflow = 6 ,
  openswmmvis::plot::LinkFlow = 7 ,
  openswmmvis::plot::LinkDepth = 8 ,
  openswmmvis::plot::LinkVelocity = 9 ,
  openswmmvis::plot::LinkVolume = 10 ,
  openswmmvis::plot::LinkCapacity = 11 ,
  openswmmvis::plot::SubcatchRainfall = 12 ,
  openswmmvis::plot::SubcatchSnowDepth = 13 ,
  openswmmvis::plot::SubcatchEvap = 14 ,
  openswmmvis::plot::SubcatchInfil = 15 ,
  openswmmvis::plot::SubcatchRunoff = 16 ,
  openswmmvis::plot::Mesh2DDepth = 17 ,
  openswmmvis::plot::Mesh2DHGL = 18 ,
  openswmmvis::plot::Mesh2DVelocityMag = 19 ,
  openswmmvis::plot::Mesh2DVelocityX = 20 ,
  openswmmvis::plot::Mesh2DVelocityY = 21 ,
  openswmmvis::plot::SystemTemperature = 22 ,
  openswmmvis::plot::SystemRainfall = 23 ,
  openswmmvis::plot::SystemSnowDepth = 24 ,
  openswmmvis::plot::SystemEvap = 25 ,
  openswmmvis::plot::SystemInfil = 26 ,
  openswmmvis::plot::SystemRunoff = 27 ,
  openswmmvis::plot::SystemDwInflow = 28 ,
  openswmmvis::plot::SystemGwInflow = 29 ,
  openswmmvis::plot::SystemLatInflow = 30 ,
  openswmmvis::plot::SystemFlooding = 31 ,
  openswmmvis::plot::SystemOutflow = 32 ,
  openswmmvis::plot::SystemStorage = 33 ,
  openswmmvis::plot::SystemEvapTotal = 34 ,
  openswmmvis::plot::SystemPET = 35 ,
  openswmmvis::plot::Mesh2DEdgeFlux = 36 ,
  openswmmvis::plot::Mesh2DEdgeFlow = 37 ,
  openswmmvis::plot::Mesh2DRainfall = 38 ,
  openswmmvis::plot::Mesh2DRainVolume = 39
}
 What a series plots. One row per attribute in the Nx2 grid. More...
 

Functions

QString openswmmvis::plot::labelFor (PlotAttribute a)
 Short human label, e.g. "Depth", "Flow", "Velocity |V|".
 
QString openswmmvis::plot::unitsFor (PlotAttribute a, UnitSystem u)
 Unit string for the given attribute + unit system, e.g. "m", "ft³/s".
 
QString openswmmvis::plot::labelWithUnits (PlotAttribute a, UnitSystem u)
 Concatenation of labelFor(a) + "(" + unitsFor(a,u) + ")".
 
UnitSystem openswmmvis::plot::unitSystemFromFlowUnits (int flowUnits)
 Map an engine swmm_output_get_flow_units return value to UnitSystem.
 
const QVector< PlotAttribute > & openswmmvis::plot::nodePlotAttributes ()
 The 6 per-node attributes, presentation order.
 
const QVector< PlotAttribute > & openswmmvis::plot::linkPlotAttributes ()
 The 5 per-link attributes, presentation order.
 
const QVector< PlotAttribute > & openswmmvis::plot::subcatchPlotAttributes ()
 The 5 per-subcatchment attributes, presentation order.
 
const QVector< PlotAttribute > & openswmmvis::plot::systemPlotAttributes ()
 The 14 system-wide attributes, presentation order (matches the long-standing system picker menu: Rainfall first, Temperature last).
 
const QVector< PlotAttribute > & openswmmvis::plot::mesh2DCellPlotAttributes ()
 The 7 per-2D-cell attributes, presentation order.
 
const QVector< PlotAttribute > & openswmmvis::plot::mesh2DEdgePlotAttributes ()
 The 2 per-2D-edge attributes (flow, unit-width flux).
 
const QVector< PlotAttribute > & openswmmvis::plot::mesh2DVertexPlotAttributes ()
 The 2 per-2D-vertex attributes (depth, HGL — interpolated).
 
bool openswmmvis::plot::isMesh2DAttribute (PlotAttribute a) noexcept
 True iff the attribute is a 2D mesh-cell quantity (CF.3).
 
bool openswmmvis::plot::isSystemAttribute (PlotAttribute a) noexcept
 True iff the attribute is a system-wide quantity (Slice AT.2). System attributes resolve via swmm_output_get_system_series and carry no per-object name (ObjectRef::Kind::System suffices).
 

Detailed Description

Slice BL — canonical enumeration of plottable result attributes.

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

A PlotAttribute names what is being plotted (Depth, Flow, …) decoupled from the object kind that produced it (node/link/subcatch/mesh-cell). Series with the same attribute land on the same chart row in the Comparison Plot Dialog, which lets two runs of the same junction's depth be compared even when the engine indexing differs.

CF.3 amendment (2026-05-21): five Mesh2D* attributes anchor per-cell 2D mesh series in their own chart rows. They're separate enumerators from the 1D node/link equivalents on purpose — node depth (free-surface above invert in a manhole) and mesh-cell depth (water column over a triangle) share units but are physically different quantities; sharing a row would mis-axis them.