![]() |
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) |
| Execute one routing timestep. | |
| double | getAdaptiveStep (const SimulationContext &ctx, double fixed_step, double courant) const |
| Compute adaptive timestep (DW only). | |
| const XSectGroups & | xsectGroups () const |
| Access the shape-grouped xsect manager. | |
| void | setDWNumThreads (int n) |
| Set the DWSolver OpenMP thread count (delegates to DWSolver::setNumThreads). | |
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.
| double openswmm::Router::getAdaptiveStep | ( | const SimulationContext & | ctx, |
| double | fixed_step, | ||
| double | courant | ||
| ) | const |
Compute adaptive timestep (DW only).
| ctx | Simulation context. |
| fixed_step | User-specified routing step. |
| courant | Courant factor target (0 = use fixed). |
| 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 | ||
| ) |
Execute one routing timestep.
| ctx | Simulation context (modified in place). |
| dt | Routing timestep (seconds). |
|
inline |
Access the shape-grouped xsect manager.