20#ifndef OPENSWMM_ROUTING_HPP
21#define OPENSWMM_ROUTING_HPP
31struct SimulationContext;
76 double evap_rate = 0.0,
88 double fixed_step,
double courant);
95 bool hasCycle()
const {
return cycle_detected_; }
109 std::vector<int> steady_sorted_links_;
110 bool cycle_detected_ =
false;
Flow divider node logic — cutoff, overflow, tabular, weir.
Dynamic wave routing solver — batch-oriented St. Venant equations.
Kinematic wave routing solver — batch-oriented design.
Cross-section geometry — unified batch + per-element API.
Top-level routing orchestrator.
Definition Routing.hpp:54
double getAdaptiveStep(SimulationContext &ctx, double fixed_step, double courant)
Compute adaptive timestep (DW only).
Definition Routing.cpp:382
dynwave::DWSolver & dwSolver()
Access the DW solver (for non-conduit node state scatter).
Definition Routing.hpp:101
const XSectGroups & xsectGroups() const
Access the shape-grouped xsect manager.
Definition Routing.hpp:91
void init(SimulationContext &ctx, RouteModel model)
Initialise the router for the given model.
Definition Routing.cpp:55
bool hasCycle() const
Definition Routing.hpp:95
int step(SimulationContext &ctx, double dt, double evap_rate=0.0, dynwave::DWSolver::NonConduitFlowFunc non_conduit_fn=nullptr)
Execute one routing timestep.
Definition Routing.cpp:289
void setDWNumThreads(int n)
Set the DWSolver OpenMP thread count (delegates to DWSolver::setNumThreads).
Definition Routing.hpp:98
Shape-grouped cross-section manager for batch computation.
Definition XSectBatch.hpp:208
Dynamic wave solver — operates on entire link/node system.
Definition DynamicWave.hpp:172
void setNumThreads(int n)
Set the number of OpenMP threads for parallel loops.
Definition DynamicWave.cpp:610
std::function< void(SimulationContext &, double, int)> NonConduitFlowFunc
Definition DynamicWave.hpp:190
Kinematic wave solver state.
Definition KinematicWave.hpp:58
Definition NodeCoupling.cpp:15
@ KINWAVE
Kinematic wave approximation.
@ STEADY
Steady-state (no routing)
@ DYNWAVE
Dynamic wave (full Saint-Venant)
RouteModel
Definition Routing.hpp:37
@ DYNWAVE
Dynamic wave (St. Venant)
Central, reentrant simulation context.
Definition SimulationContext.hpp:274
Definition Divider.hpp:41