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

#include <Inflow.hpp>

Collaboration diagram for openswmm::inflow::InflowSolver:

Public Member Functions

void init (SimulationContext &ctx)
 
void refreshPatterns (const SimulationContext &ctx)
 Re-copy time-pattern factors from the context into the solver's per-step lookup cache.
 
void computeAll (SimulationContext &ctx, double current_date, double dt)
 Compute all external + DWF inflows and add to node lateral flow.
 

Member Function Documentation

◆ computeAll()

void openswmm::inflow::InflowSolver::computeAll ( SimulationContext & ctx,
double current_date,
double dt )

Compute all external + DWF inflows and add to node lateral flow.

Batch operations:

  1. Batch timeseries lookup for all ext inflows (gather from tables)
  2. Batch pattern factor computation (vectorisable index arithmetic)
  3. Batch multiply: inflow = conv * (ts_value * scale + baseline * pat)
  4. Scatter-add to node lat_flow array
Parameters
ctxSimulation context.
current_dateCurrent absolute date (decimal days).
dtTimestep (seconds).
Here is the call graph for this function:

◆ init()

void openswmm::inflow::InflowSolver::init ( SimulationContext & ctx)
Here is the call graph for this function:

◆ refreshPatterns()

void openswmm::inflow::InflowSolver::refreshPatterns ( const SimulationContext & ctx)

Re-copy time-pattern factors from the context into the solver's per-step lookup cache.

init copies ctx.patterns into a private cache for fast per-step DWF/external-inflow scaling. A runtime pattern edit (swmm_pattern_set_factors) mutates ctx.patterns only, so the C API calls this to refresh the cache and let mid-run pattern changes take effect on the next step. Pattern count is assumed unchanged.

Parameters
ctxSimulation context holding the authoritative pattern data.
Here is the call graph for this function:
Here is the caller graph for this function:

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