![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
Functions | |
| void | buildOutfallLinkMap (SimulationContext &ctx) |
| Precompute outfall → connecting-conduit index map. | |
| void | setAllOutfallDepths (SimulationContext &ctx, double dt_routing) |
| Compute boundary depth at all outfall nodes. | |
| void openswmm::outfall::buildOutfallLinkMap | ( | SimulationContext & | ctx | ) |
Precompute outfall → connecting-conduit index map.
Walks the link table once at init and, for every outfall node, records the first conduit whose node2 (or node1) is that outfall, together with its offset at the outfall end. Results are stored in ctx.outfall_link_idx / outfall_link_offset so that setAllOutfallDepths can skip the O(N_links) inner scan per Picard iteration.
| ctx | Simulation context (populates outfall_link_idx / offset). |
| void openswmm::outfall::setAllOutfallDepths | ( | SimulationContext & | ctx, |
| double | dt_routing ) |
Compute boundary depth at all outfall nodes.
For each outfall:
Legacy routing_execute advances NewRoutingTime before routeFlow, so the stage boundaries belong to the end of the step while the inflows and the control rules belong to its start (ctx.current_date, still the start here).
| ctx | Simulation context (ctx.elapsed_ms = the step's start). |
| dt_routing | The routing step being taken (s). |