![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
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. | |
| 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.
| [in] | s | Initialized Richards state carrying pending-finish/start/completed receipts. |
| [in] | start | Finite nonnegative expected start seconds. |
| [in] | end | Finite later expected end seconds, with finite difference. |
| 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.
| [in] | ctx | Borrowed resolved context; no mutation or pointer retention. |
| [in] | row | Valid initialized Richards storage row with positive volumes/areas and coherent authored layers. |
| [in] | dt | Positive native seconds used for discrete lateral capture. |
| [in] | evaporation | Finite potential evaporation in native ft/s. |
| [in] | continuous | True supplies positive lateral inflow as an SI rate; false pre-adds its dt volume to surface water. |
| 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.
| [in] | ctx | Borrowed resolved context; no mutation or pointer retention. |
| [in] | row | Valid initialized matching storage row. |
| [in] | col | Accepted SI column with water aligned to live cells. |
| [in] | report | Successful matching kernel report; transfer/ET/bottom volumes are SI m3. |
| [in] | dt | Positive seconds converting captured volume to temporarily removed lateral rate. |
| [in] | completed | Accepted simulation end time in seconds. |
| [in] | mesh | True uses report.inflow as continuous capture, marks pending Mesh finish and leaves bottom exchange to its paired owner. |
|
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.
| [in,out] | ctx | Borrowed initialized native node-LID context with coherent storage/cell/material and link/node joins; serial lifecycle ownership is required. |
| [in,out] | d | Owned validated draft for this exact context row/node; its state is swapped with the prior live state. |
| 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.
| [in] | ctx | Borrowed resolved context; no mutation or pointer retention. |
| [in] | row | Valid accepted Mesh storage row with matching cells/water/port arrays and valid materials. |