OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmm::lidnode::detail Namespace Reference

Classes

struct  RichardsNodeDraft
 

Functions

void checkMeshInterval (const LidNodeState &s, double start, double end)
 Require an exact pending accepted Mesh owner interval.
 
richards::Column column (const SimulationContext &ctx, int row, double dt, double evaporation, bool continuous=false)
 Convert one initialized native node stack to an owned SI Richards column.
 
RichardsNodeDraft draft (const SimulationContext &ctx, int row, const richards::Column &col, const richards::Report &report, double dt, double completed, bool mesh=false)
 Prepare an owned native publication from an accepted SI column/report.
 
void publish (SimulationContext &ctx, RichardsNodeDraft &&d) noexcept
 Publish one fully prepared native Richards state without throwing.
 
LidNodeState routed (const SimulationContext &ctx, int row)
 Prepare a Mesh Richards state incorporating accepted hydraulic porous-port water.
 

Function Documentation

◆ checkMeshInterval()

void openswmm::lidnode::detail::checkMeshInterval ( const LidNodeState & s,
double start,
double end )

Require an exact pending accepted Mesh owner interval.

Throws runtime_error unless Richards is enabled, pending finish is true, stored start/end exactly match and end>start. Does not check richards_mesh_routed or perform epsilon matching; port/routing callers add those distinct checks. No state changes.

Parameters
[in]sInitialized Richards state carrying pending-finish/start/completed receipts.
[in]startFinite nonnegative expected start seconds.
[in]endFinite later expected end seconds, with finite difference.
Here is the caller graph for this function:

◆ column()

richards::Column openswmm::lidnode::detail::column ( const SimulationContext & ctx,
int row,
double dt,
double evaporation,
bool continuous = false )

Convert one initialized native node stack to an owned SI Richards column.

Uses exact ft-to-SI constants, applies nonnegative monthly conductivity factor, splits one ET demand between surface or porous cells, and selects CURRENT explicit-bottom free drainage with clogging when configured. Other bottom modes retain the default boundary until their external owner qualifies it. No live water/forcing is consumed; copying can throw.

Parameters
[in]ctxBorrowed resolved context; no mutation or pointer retention.
[in]rowValid initialized Richards storage row with positive volumes/areas and coherent authored layers.
[in]dtPositive native seconds used for discrete lateral capture.
[in]evaporationFinite potential evaporation in native ft/s.
[in]continuousTrue supplies positive lateral inflow as an SI rate; false pre-adds its dt volume to surface water.
Returns
Owned column with geometry/pressure in metres, water in m3, Ks in m/s and seconds unchanged.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ draft()

RichardsNodeDraft openswmm::lidnode::detail::draft ( const SimulationContext & ctx,
int row,
const richards::Column & col,
const richards::Report & report,
double dt,
double completed,
bool mesh = false )

Prepare an owned native publication from an accepted SI column/report.

Copies quality-water baselines, remaps surface transfer index zero to mobile index -1, converts volume receipts, refreshes native Richards state and derives surface hydraulic capacity/head. Non-Mesh capture is positive lateral*dt; report bottom loss is clamped nonnegative. Throws on conversion/pressure/allocation failure before publication.

Parameters
[in]ctxBorrowed resolved context; no mutation or pointer retention.
[in]rowValid initialized matching storage row.
[in]colAccepted SI column with water aligned to live cells.
[in]reportSuccessful matching kernel report; transfer/ET/bottom volumes are SI m3.
[in]dtPositive seconds converting captured volume to temporarily removed lateral rate.
[in]completedAccepted simulation end time in seconds.
[in]meshTrue uses report.inflow as continuous capture, marks pending Mesh finish and leaves bottom exchange to its paired owner.
Returns
Owned draft with native ft3 water/receipts, ft pressure/head/depth and copied runtime state; live context unchanged.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ publish()

void openswmm::lidnode::detail::publish ( SimulationContext & ctx,
RichardsNodeDraft && d )
noexcept

Publish one fully prepared native Richards state without throwing.

Requires valid row/node indices and exclusive publication. Swaps LidNodeState and assigns lateral/mobile/full/rpt-full volume and depth/head together. Performs no validation, allocation or kernel solve; caller builds all relevant drafts before entering publication.

Parameters
[in,out]ctxBorrowed initialized native node-LID context with coherent storage/cell/material and link/node joins; serial lifecycle ownership is required.
[in,out]dOwned validated draft for this exact context row/node; its state is swapped with the prior live state.
Here is the caller graph for this function:

◆ routed()

LidNodeState openswmm::lidnode::detail::routed ( const SimulationContext & ctx,
int row )

Prepare a Mesh Richards state incorporating accepted hydraulic porous-port water.

Rejects shape mismatch, nonfinite delta or nonzero surface port delta (surface water belongs to the mobile owner). Does not verify interval/cohort itself, reset port deltas or publish the copy; caller performs those lifecycle checks before finish. Throws without changing live state.

Parameters
[in]ctxBorrowed resolved context; no mutation or pointer retention.
[in]rowValid accepted Mesh storage row with matching cells/water/port arrays and valid materials.
Returns
Owned copied state with each porous port_delta added and pressure/moisture/inventory refreshed.
Here is the call graph for this function: