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
mesh::pslg::MinSizePolicy Struct Reference

Policy for minimum-feature-size conditioning. More...

#include <pslgminsize.h>

Collaboration diagram for mesh::pslg::MinSizePolicy:

Public Member Functions

void resolveDefaults ()
 
bool enabled () const
 
double minTriangleArea () const
 
double refinementAreaCap (double uniformCap) const
 The value RefineHook::targetAreaAt should report, given the user's uniform uniformCap (GenerationOptions::maxArea).
 

Public Attributes

double minCellSize = 0.0
 
double weldRadius = -1.0
 <0 → h. Features closer than this merge.
 
double minSegmentLen = -1.0
 <0 → h. Shortest permitted constrained edge.
 
double maxDeviation = -1.0
 <0 → h/2. Cap on shape change from resampling.
 
double trimAngleDeg = 30.0
 
bool trimAtTaggedNodes = false
 
bool dropSubScaleHoles = true
 
bool collapseSubScalePaths = true
 
bool ringsReadOnly = false
 
bool allowIdentityMerge = false
 Let two coupling identities merge into one another.
 
double identityMergeRadius = -1.0
 
int maxIterations = 3
 Weld / fix-up / crossing-repair fixed-point cap.
 
int maxResiduals = 200
 Cap on ConditionReport::residuals.
 

Detailed Description

Policy for minimum-feature-size conditioning.

Only minCellSize is user-facing; every other field derives from it when left negative, and exists for the dialog's advanced expander and for tests that need to exercise one stage in isolation.

Member Function Documentation

◆ enabled()

bool mesh::pslg::MinSizePolicy::enabled ( ) const
inline
Here is the caller graph for this function:

◆ minTriangleArea()

double mesh::pslg::MinSizePolicy::minTriangleArea ( ) const

Area of an equilateral triangle of side h — the refinement size-function floor. See MIN_CELL_SIZE_ENFORCEMENT_PLAN §5.

Here is the caller graph for this function:

◆ refinementAreaCap()

double mesh::pslg::MinSizePolicy::refinementAreaCap ( double  uniformCap) const

The value RefineHook::targetAreaAt should report, given the user's uniform uniformCap (GenerationOptions::maxArea).

targetAreaAt returns the MAXIMUM area Triangle will tolerate and splits anything larger (trirefinehook.cpp:101), so "do not go below the floor" is not expressible here at all — Triangle never coarsens. The only thing the floor can do is raise a too-small uniform cap up to itself.

With NO cap the answer must be 0 (unconstrained). Returning the floor instead orders the WHOLE domain refined to the minimum cell size, which is a vertex-count explosion and the exact opposite of the intent; an early draft did precisely that, so it has its own regression test.

Here is the call graph for this function:

◆ resolveDefaults()

void mesh::pslg::MinSizePolicy::resolveDefaults ( )

Resolve the derived fields against minCellSize. Idempotent.

Here is the caller graph for this function:

Member Data Documentation

◆ allowIdentityMerge

bool mesh::pslg::MinSizePolicy::allowIdentityMerge = false

Let two coupling identities merge into one another.

OFF by default, and turning it on relaxes invariant (1). It exists because on a real SWMM model nearly every crowded vertex IS an identity — a node Steiner point or a tagged conduit endpoint — so the crowding that forces the small cells is exactly the crowding conditioning is otherwise forbidden to remove (3 to 200 welds fired against thousands of reported violations; see tests/manual/mesh_minsize/README.md).

Coupling is NOT lost: mesh::mapNodesToMesh falls through to the containing triangle when a vertex is already claimed, so the second node becomes cell-coupled rather than vertex-coupled. That is a real change — different exchange area and flux stencil — so every merge is counted in ConditionReport::identitiesMerged and reported as a residual.

◆ collapseSubScalePaths

bool mesh::pslg::MinSizePolicy::collapseSubScalePaths = true

Collapse a constraint polyline shorter than minSegmentLen into a single Steiner point. It cannot be a breakline at this resolution; coupling is preserved through the post-generation node mapper, exactly as nodeMinSeparation already does for crowded nodes.

◆ dropSubScaleHoles

bool mesh::pslg::MinSizePolicy::dropSubScaleHoles = true

Drop hole rings smaller than the cell scale. The mesh then COVERS that region — a real modelling change, so it is counted and reported, never silent.

◆ identityMergeRadius

double mesh::pslg::MinSizePolicy::identityMergeRadius = -1.0

Identities further apart than this never merge, even with allowIdentityMerge on. <0 resolves to weldRadius.

◆ maxDeviation

double mesh::pslg::MinSizePolicy::maxDeviation = -1.0

<0 → h/2. Cap on shape change from resampling.

◆ maxIterations

int mesh::pslg::MinSizePolicy::maxIterations = 3

Weld / fix-up / crossing-repair fixed-point cap.

◆ maxResiduals

int mesh::pslg::MinSizePolicy::maxResiduals = 200

◆ minCellSize

double mesh::pslg::MinSizePolicy::minCellSize = 0.0

h — the minimum cell size, in HORIZONTAL map (project CRS) units. 0 or negative disables conditioning entirely, which is the default so that existing projects reproduce their current mesh exactly.

◆ minSegmentLen

double mesh::pslg::MinSizePolicy::minSegmentLen = -1.0

<0 → h. Shortest permitted constrained edge.

◆ ringsReadOnly

bool mesh::pslg::MinSizePolicy::ringsReadOnly = false

Treat domains/holeRings as read-only proximity context — they take part in welding decisions but are never themselves modified. Set when the rings came from the boundary-prep cache, whose seeds and validity flags were computed against those exact vertices.

◆ trimAngleDeg

double mesh::pslg::MinSizePolicy::trimAngleDeg = 30.0

Constraint corners sharper than this are blunted (degrees). 0 disables corner trimming. Small input angles are the one small-cell cause that welding cannot address, because the legs legitimately share a vertex.

◆ trimAtTaggedNodes

bool mesh::pslg::MinSizePolicy::trimAtTaggedNodes = false

Trim sharp corners whose apex is a TAGGED vertex (a SWMM node). Off by default: a manhole where two conduits meet at 15° is exactly where fine resolution is wanted, and the apex is a coupling location that must not move. Turn on only when timestep matters more than manhole detail.

◆ weldRadius

double mesh::pslg::MinSizePolicy::weldRadius = -1.0

<0 → h. Features closer than this merge.


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