14#ifndef OPENSWMMVIS_MESH_MESHRESULT_H
15#define OPENSWMMVIS_MESH_MESHRESULT_H
77 double mannings = std::numeric_limits<double>::quiet_NaN();
82 double initDepth = std::numeric_limits<double>::quiet_NaN();
87 double initHgl = std::numeric_limits<double>::quiet_NaN();
99 bool isQuad() const noexcept {
return v3 >= 0; }
167 return v0 == v ||
v1 == v ||
v2 == v || (
v3 >= 0 &&
v3 == v);
277 n += t.isQuad() ? 1 : 0;
Per-cell 2D infiltration: value types, tag/override resolution and method↔parameter masks.
The Qt-facing MeshKit API (meshkit::core_qt, meshkit::model_qt, meshkit::io_qt): mesh value types and...
MeshTriangle MeshCell
Alias: a "triangle" row is any cell (triangle or quad).
Definition meshresult.h:172
A 1D node coupled to a mesh cell (centroid coupling).
Definition meshresult.h:193
int tri
Triangle index into MeshResult::triangles.
Definition meshresult.h:194
bool areaSet
False: row written without AREA.
Definition meshresult.h:199
bool cdSet
False: row written without CD (see MeshVertex::couplingCdSet).
Definition meshresult.h:198
double area
Effective exchange area, mesh length units² (mapper default).
Definition meshresult.h:197
double cd
Discharge coefficient (engine default).
Definition meshresult.h:196
QString nodeId
SWMM node id.
Definition meshresult.h:195
[2D_INFILTRATION_OPTIONS].
Definition meshinfil.h:141
A boundary edge with its source-segment marker preserved.
Definition meshresult.h:175
int marker
Source segment marker; non-zero if assigned by caller.
Definition meshresult.h:181
int v1
Second endpoint; the pair is not oriented relative to the adjacent cells.
Definition meshresult.h:180
QString tag
Resolved tag (e.g. conduit ID, "domain", "outflow").
Definition meshresult.h:182
int v0
First endpoint: index into MeshResult::vertices, in source-path order.
Definition meshresult.h:180
Result of MeshGenerator::generate.
Definition meshresult.h:203
QVector< InfilDefaultRow > infilDefaults
Per-cell infiltration defaults: tag rows; '*' = mesh-wide fallback.
Definition meshresult.h:258
QVector< CellCoupling > cellCouplings
Node→cell couplings (Part C).
Definition meshresult.h:212
QVector< MeshEdge > boundaryEdges
Marked constraint edges, not only the outer boundary: generate() lists every kept sub-edge of the dom...
Definition meshresult.h:211
QVector< MeshTriangle > triangles
Cells: triangles first, then quads (engine order).
Definition meshresult.h:207
QVector< MeshVertex > vertices
Mesh vertices; cells and edges index into this array.
Definition meshresult.h:206
QVector< double > surfaceSourcePerviousPercent
Per-cell spatial-source pervious/LID area in percent, indexed like triangles.
Definition meshresult.h:221
bool ok
True only when the producer (generator or reader) succeeded.
Definition meshresult.h:262
QString errorMsg
Failure reason when ok is false; empty on success.
Definition meshresult.h:263
QVector< int > infiltrationConflict
Per-cell infiltration conflict code, caller-filled: 0 none, 1 explicit surface cell method,...
Definition meshresult.h:236
QVector< int > infiltrationOwner
Per-cell resolved infiltration owner, indexed like triangles and caller-filled from the engine: 0 pro...
Definition meshresult.h:236
bool hasQuads() const noexcept
Determine whether any stored cell has a nonnegative fourth identifier.
Definition meshresult.h:286
int quadCount() const noexcept
Count cells whose fourth identifier classifies them as quadrilaterals.
Definition meshresult.h:273
InfilOptions infilOptions
[2D_INFILTRATION_OPTIONS].
Definition meshresult.h:260
QVector< int > surfaceOwnershipStatus
Per-cell surface ownership review code, indexed like triangles and caller-filled: 0 mesh only,...
Definition meshresult.h:229
QVector< double > surfaceMeshWeatherPercent
Per-cell share of the cell's weather that remains with the mesh, in percent ("Remaining mesh weather"...
Definition meshresult.h:221
QHash< int, InfilRow > infilOverrides
Sparse, keyed by triangle index.
Definition meshresult.h:259
QStringList infiltrationSource
Per-cell display text naming the infiltration source, caller-filled and parallel to infiltrationOwner...
Definition meshresult.h:239
A cell in the mesh — a triangle or (since the engine's mixed tri-quad meshes, workplans/TRI_QUAD_MESH...
Definition meshresult.h:64
int v2
Third corner, cyclically after v1.
Definition meshresult.h:71
double initU
Initial velocity components in m/s whatever the project units ([2D_INITIAL_VELOCITY] U and V).
Definition meshresult.h:91
int v1
Second corner, cyclically after v0.
Definition meshresult.h:71
double initV
[2D_INITIAL_VELOCITY] V: map-Y velocity in m/s; see initU.
Definition meshresult.h:92
double initDepth
Initial water depth in m ([2D_TRIANGLES] INIT_DEPTH, written between MANNINGS_N and TAG).
Definition meshresult.h:82
int vertex(int k) const noexcept
Fetch one stored corner identifier without a vertex-array lookup.
Definition meshresult.h:115
int v3
Fourth vertex of a quadrilateral; -1 = triangle.
Definition meshresult.h:72
double initHgl
Initial water-surface elevation in mesh length units on the vertex Z datum ([2D_INITIAL_HGL]).
Definition meshresult.h:87
int vertexCount() const noexcept
Report the logical corner count selected by the fourth-vertex sentinel.
Definition meshresult.h:105
double mannings
Manning's roughness ([2D_TRIANGLES] MANNINGS_N).
Definition meshresult.h:77
int v0
First corner: index into MeshResult::vertices (not range-checked here).
Definition meshresult.h:71
bool hasVertex(int v) const noexcept
Check whether an identifier equals a stored logical corner.
Definition meshresult.h:165
void setVertex(int k, int v) noexcept
Replace a stored corner identifier, leaving every other cell attribute unchanged.
Definition meshresult.h:139
bool isQuad() const noexcept
Classify the cell solely by whether a fourth vertex identifier is present.
Definition meshresult.h:99
QString tag
Region tag, for example a subcatchment ID; empty if untagged.
Definition meshresult.h:73
A vertex in the generated mesh.
Definition meshresult.h:30
bool couplingAreaSet
False when the [2D_VERTEX_NODE_MAP] row has no AREA token: the writer omits AREA (and CD too unless c...
Definition meshresult.h:45
double couplingArea
[2D_VERTEX_NODE_MAP] AREA column, mesh length units² (engine default).
Definition meshresult.h:37
bool couplingCdSet
False when the row does not author CD / AREA: it is written without the token and the engine applies ...
Definition meshresult.h:42
int marker
Input/output point marker (carries our tag id).
Definition meshresult.h:33
QPointF xy
Map units (project CRS).
Definition meshresult.h:31
double z
Sampled DTM elevation (set by DTMSampler; 0 until then).
Definition meshresult.h:32
double couplingCd
[2D_VERTEX_NODE_MAP] CD column (engine default).
Definition meshresult.h:36
QString coupledNode
Coupled SWMM node id ([2D_VERTEX_NODE_MAP]); empty if uncoupled.
Definition meshresult.h:35
QString tag
Descriptive label ([2D_VERTICES] TAG column); empty if none.
Definition meshresult.h:34