Loading...
Searching...
No Matches
mesh::MeshResult Struct Reference

Result of MeshGenerator::generate. More...

#include <mesh/meshresult.h>

Collaboration diagram for mesh::MeshResult:

Public Member Functions

int quadCount () const noexcept
 Count cells whose fourth identifier classifies them as quadrilaterals.
 
bool hasQuads () const noexcept
 Determine whether any stored cell has a nonnegative fourth identifier.
 

Public Attributes

QVector< MeshVertex > vertices
 Mesh vertices; cells and edges index into this array.
 
QVector< MeshTriangle > triangles
 Cells: triangles first, then quads (engine order).
 
QVector< MeshEdge > boundaryEdges
 Marked constraint edges, not only the outer boundary: generate() lists every kept sub-edge of the domain rings and barrier constraints plus patch interior lines (conduits along strips); Sms2dmReader::read stores NS node strings here.
 
QVector< CellCoupling > cellCouplings
 Node→cell couplings (Part C).
 
QVector< double > surfaceMeshWeatherPercent
 Per-cell share of the cell's weather that remains with the mesh, in percent ("Remaining mesh weather"), indexed like triangles.
 
QVector< double > surfaceSourcePerviousPercent
 Per-cell spatial-source pervious/LID area in percent, indexed like triangles.
 
QVector< int > surfaceOwnershipStatus
 Per-cell surface ownership review code, indexed like triangles and caller-filled: 0 mesh only, 1 subcatchment/uniform, 2 unreviewed overlap, 3 invalid review.
 
QVector< int > infiltrationOwner
 Per-cell resolved infiltration owner, indexed like triangles and caller-filled from the engine: 0 process disabled, 1 surface bank, 2 aquifer.
 
QVector< int > infiltrationConflict
 Per-cell infiltration conflict code, caller-filled: 0 none, 1 explicit surface cell method, 2 obsolete destination.
 
QStringList infiltrationSource
 Per-cell display text naming the infiltration source, caller-filled and parallel to infiltrationOwner; MeshKit itself neither reads nor writes it.
 
QVector< InfilDefaultRow > infilDefaults
 Per-cell infiltration defaults: tag rows; '*' = mesh-wide fallback.
 
QHash< int, InfilRow > infilOverrides
 Sparse, keyed by triangle index.
 
InfilOptions infilOptions
 [2D_INFILTRATION_OPTIONS].
 
bool ok = false
 True only when the producer (generator or reader) succeeded.
 
QString errorMsg
 Failure reason when ok is false; empty on success.
 

Detailed Description

Member Function Documentation

◆ hasQuads()

bool mesh::MeshResult::hasQuads ( ) const
inlinenoexcept

Determine whether any stored cell has a nonnegative fourth identifier.

Returns
True at the first quad-classified cell, false for an empty array or all triangles. Linear worst-case read-only traversal with early exit; no geometry validation or cached state update.

◆ quadCount()

int mesh::MeshResult::quadCount ( ) const
inlinenoexcept

Count cells whose fourth identifier classifies them as quadrilaterals.

Returns
Number of entries with v3>=0, zero for an empty array. The count must fit int. Linear read-only traversal of triangles, independent of storage ordering, ok or geometry validity; no allocation, mesh mutation or cached-count update.

Number of quadrilateral cells (O(n)).

Member Data Documentation

◆ boundaryEdges

QVector<MeshEdge> mesh::MeshResult::boundaryEdges

Marked constraint edges, not only the outer boundary: generate() lists every kept sub-edge of the domain rings and barrier constraints plus patch interior lines (conduits along strips); Sms2dmReader::read stores NS node strings here.

◆ cellCouplings

QVector<CellCoupling> mesh::MeshResult::cellCouplings

Node→cell couplings (Part C).

◆ errorMsg

QString mesh::MeshResult::errorMsg

Failure reason when ok is false; empty on success.

◆ infilDefaults

QVector<InfilDefaultRow> mesh::MeshResult::infilDefaults

Per-cell infiltration defaults: tag rows; '*' = mesh-wide fallback.

Per-cell infiltration (INTEGRATED2D_GW_GUI_PLAN §3.2a, phase GG0).

Follows the CellCoupling precedent above — sparse/inherited rows live on MeshResult rather than bloating the per-triangle POD. Resolution is ‘infilOverrides > tag row in infilDefaults > ’*' row > none` (engine D-I3); use mesh::resolveInfil() rather than reading these directly, so the inherited-vs-overridden distinction is preserved.

Parameters are in PROJECT units — the same numbers a user types into [INFILTRATION]. The GUI performs no unit conversion.

Written as [2D_INFILTRATION_DEFAULTS] / [2D_INFILTRATION]; these sections follow the mesh (external .2dm when one is in use, else inline). They must NOT be appended to [2D_TRIANGLES], whose columns are positional.

◆ infilOptions

InfilOptions mesh::MeshResult::infilOptions

[2D_INFILTRATION_OPTIONS].

◆ infilOverrides

QHash<int, InfilRow> mesh::MeshResult::infilOverrides

Sparse, keyed by triangle index.

◆ infiltrationConflict

QVector<int> mesh::MeshResult::infiltrationConflict

Per-cell infiltration conflict code, caller-filled: 0 none, 1 explicit surface cell method, 2 obsolete destination.

Empty = unavailable.

◆ infiltrationOwner

QVector<int> mesh::MeshResult::infiltrationOwner

Per-cell resolved infiltration owner, indexed like triangles and caller-filled from the engine: 0 process disabled, 1 surface bank, 2 aquifer.

Empty = unavailable.

◆ infiltrationSource

QStringList mesh::MeshResult::infiltrationSource

Per-cell display text naming the infiltration source, caller-filled and parallel to infiltrationOwner; MeshKit itself neither reads nor writes it.

◆ ok

bool mesh::MeshResult::ok = false

True only when the producer (generator or reader) succeeded.

◆ surfaceMeshWeatherPercent

QVector<double> mesh::MeshResult::surfaceMeshWeatherPercent

Per-cell share of the cell's weather that remains with the mesh, in percent ("Remaining mesh weather"), indexed like triangles.

Engine-resolved from the reviewed surface geometry (not runtime recharge) and filled by the caller, never by MeshKit; empty = unavailable, and cellParamValue() returns NaN for indices past the end.

◆ surfaceOwnershipStatus

QVector<int> mesh::MeshResult::surfaceOwnershipStatus

Per-cell surface ownership review code, indexed like triangles and caller-filled: 0 mesh only, 1 subcatchment/uniform, 2 unreviewed overlap, 3 invalid review.

Empty = unavailable.

◆ surfaceSourcePerviousPercent

QVector<double> mesh::MeshResult::surfaceSourcePerviousPercent

Per-cell spatial-source pervious/LID area in percent, indexed like triangles.

Filled by the caller from the engine, never by MeshKit; empty = unavailable, and cellParamValue() returns NaN for indices past the end.

◆ triangles

QVector<MeshTriangle> mesh::MeshResult::triangles

Cells: triangles first, then quads (engine order).

◆ vertices

QVector<MeshVertex> mesh::MeshResult::vertices

Mesh vertices; cells and edges index into this array.

A generated mesh may keep vertices that no cell references (MeshGenerator::generate does not compact them).


The documentation for this struct was generated from the following file: