![]() |
OpenSWMM Engine
6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
|
Top-level routing orchestrator. More...
#include <Routing.hpp>
Public Member Functions | |
| void | init (SimulationContext &ctx, RouteModel model) |
| Initialise the router for the given model. | |
| int | step (SimulationContext &ctx, double dt, double evap_rate=0.0, dynwave::DWSolver::NonConduitFlowFunc non_conduit_fn=nullptr) |
| Execute one routing timestep. | |
| double | getAdaptiveStep (SimulationContext &ctx, double fixed_step, double courant) |
| Compute adaptive timestep (DW only). | |
| const XSectGroups & | xsectGroups () const |
| Access the shape-grouped xsect manager. | |
| bool | hasCycle () const |
| void | setDWNumThreads (int n) |
| Set the DWSolver OpenMP thread count (delegates to DWSolver::setNumThreads). | |
| dynwave::DWSolver & | dwSolver () |
| Access the DW solver (for non-conduit node state scatter). | |
Top-level routing orchestrator.
Owns the XSectGroups (shape-grouped batch xsect), KWSolver, and DWSolver. Initialised once after the model is built; then step() is called each routing timestep.
|
inline |
Access the DW solver (for non-conduit node state scatter).
| double openswmm::Router::getAdaptiveStep | ( | SimulationContext & | ctx, |
| double | fixed_step, | ||
| double | courant | ||
| ) |
Compute adaptive timestep (DW only).
| ctx | Simulation context. |
| fixed_step | User-specified routing step. |
| courant | Courant factor target (0 = use fixed). |
|
inline |
Gap #44: true if a routing cycle was detected during the last init(). For KW/STEADY routing only (DW does not toposort).
| void openswmm::Router::init | ( | SimulationContext & | ctx, |
| RouteModel | model | ||
| ) |
Initialise the router for the given model.
Builds XSectGroups from the link cross-sections, initialises the KW and/or DW solver working arrays.
| ctx | Simulation context (must have links/nodes populated). |
| model | Routing model selection. |
|
inline |
Set the DWSolver OpenMP thread count (delegates to DWSolver::setNumThreads).
| int openswmm::Router::step | ( | SimulationContext & | ctx, |
| double | dt, | ||
| double | evap_rate = 0.0, |
||
| dynwave::DWSolver::NonConduitFlowFunc | non_conduit_fn = nullptr |
||
| ) |
Execute one routing timestep.
| ctx | Simulation context (modified in place). |
| dt | Routing timestep (seconds). |
| evap_rate | Current evaporation rate (ft/sec), from climate module. |
|
inline |
Access the shape-grouped xsect manager.