OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
openswmm::Router Class Reference

Top-level routing orchestrator. More...

#include <Routing.hpp>

Collaboration diagram for openswmm::Router:

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 XSectGroupsxsectGroups () const
 Access the shape-grouped xsect manager.
 
void setDWNumThreads (int n)
 Set the DWSolver OpenMP thread count (delegates to DWSolver::setNumThreads).
 

Detailed Description

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.

Member Function Documentation

◆ getAdaptiveStep()

double openswmm::Router::getAdaptiveStep ( const SimulationContext ctx,
double  fixed_step,
double  courant 
) const

Compute adaptive timestep (DW only).

Parameters
ctxSimulation context.
fixed_stepUser-specified routing step.
courantCourant factor target (0 = use fixed).
Returns
Adaptive timestep (seconds).
Here is the call graph for this function:

◆ init()

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.

Parameters
ctxSimulation context (must have links/nodes populated).
modelRouting model selection.
Here is the call graph for this function:

◆ setDWNumThreads()

void openswmm::Router::setDWNumThreads ( int  n)
inline

Set the DWSolver OpenMP thread count (delegates to DWSolver::setNumThreads).

Here is the call graph for this function:

◆ step()

int openswmm::Router::step ( SimulationContext ctx,
double  dt 
)

Execute one routing timestep.

Parameters
ctxSimulation context (modified in place).
dtRouting timestep (seconds).
Returns
Number of solver iterations used.
Here is the call graph for this function:

◆ xsectGroups()

const XSectGroups & openswmm::Router::xsectGroups ( ) const
inline

Access the shape-grouped xsect manager.


The documentation for this class was generated from the following files: