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
meshcellstats.h File Reference
#include "meshresult.h"
#include <QHash>
#include <QPair>
Include dependency graph for meshcellstats.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mesh::CellAreaStats
 Min / max / mean / median of triangle areas (project CRS units²). More...
 
struct  mesh::QuadStats
 Quadrilateral-cell statistics (workplans/TRI_QUAD_MESHING_PLAN §5): count, interior-angle range and bed non-planarity. More...
 
struct  mesh::CflStats
 The 2D marcher's CFL characteristic length, per cell and summarised. More...
 

Namespaces

namespace  mesh
 

Typedefs

using mesh::EdgeVertexPair = QPair< int, int >
 Undirected mesh edge, as (min, max) vertex indices.
 

Functions

double mesh::triangleArea (const MeshResult &mesh, int tri)
 Unsigned area of triangle tri (|cross| / 2), in project CRS units². Returns 0 for an out-of-range triangle or one referencing out-of-range vertices.
 
QPointF mesh::cellCentroid (const MeshResult &mesh, int cell)
 Area centroid of cell cell (mesh::cellGeom — the vertex mean for a triangle, the area-weighted sub-triangle centroid for a quad). A null point for an out-of-range cell.
 
QuadStats mesh::computeQuadStats (const MeshResult &mesh)
 
CellAreaStats mesh::computeCellAreaStats (const MeshResult &mesh)
 Compute cell-area statistics over all triangles in mesh.
 
QHash< EdgeVertexPair, QVector< int > > mesh::buildEdgeTriangles (const MeshResult &mesh)
 Map every undirected edge to the triangles incident on it.
 
QVector< doublemesh::computeCellLchar (const MeshResult &mesh)
 Per-cell L_char for mesh, indexed like mesh.triangles. Cells with invalid indices get 0.
 
CflStats mesh::computeCflStats (const MeshResult &mesh, int ltsTiers=4)
 Summarise computeCellLchar. ltsTiers mirrors the engine's [2D_OPTIONS] LTS_TIERS (1..8, default 4).
 

Detailed Description

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

MESH_DECOUPLED_1D2D_REMAP_PLAN Part A — cell-area statistics for the mesh layer's Metadata tab. Free function, no layer dependency, so it is unit-testable against a bare MeshResult.