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

#include <HydStructures.hpp>

Collaboration diagram for openswmm::hydstruct::StructureSolver:

Public Member Functions

void init (SimulationContext &ctx)
 
void computeAllFlows (SimulationContext &ctx, double dt, double *node_new_surf_area=nullptr)
 Compute flow for all non-conduit links (batch by type).
 
void updatePumpTargetSettings (SimulationContext &ctx)
 Evaluate pump startup/shutoff depth hysteresis. Must be called ONCE per timestep BEFORE the DW iteration loop, matching legacy link_setTargetSetting() timing.
 
const std::vector< int > & nonConduitIndices () const noexcept
 Get pre-built list of all non-conduit link indices.
 

Member Function Documentation

◆ computeAllFlows()

void openswmm::hydstruct::StructureSolver::computeAllFlows ( SimulationContext ctx,
double  dt,
double *  node_new_surf_area = nullptr 
)

Compute flow for all non-conduit links (batch by type).

For each type group:

  1. Gather upstream/downstream heads from node arrays
  2. Batch compute flow using type-specific equation
  3. Scatter flow + dQ/dH back to link arrays
Parameters
ctxSimulation context.
dtTimestep (seconds).
node_new_surf_areaPer-node surface area from the DW solver's xnode buffer. Read by computePumpFlows (pump flow-limiter, matching legacy getModPumpFlow) and written by computeWeirFlows (weir surface-area scatter, matching legacy findNonConduitSurfArea). Pass nullptr to skip both (pump falls back to MIN_SURFAREA; weir scatter is skipped).

◆ init()

void openswmm::hydstruct::StructureSolver::init ( SimulationContext ctx)
Here is the call graph for this function:

◆ nonConduitIndices()

const std::vector< int > & openswmm::hydstruct::StructureSolver::nonConduitIndices ( ) const
inlinenoexcept

Get pre-built list of all non-conduit link indices.

◆ updatePumpTargetSettings()

void openswmm::hydstruct::StructureSolver::updatePumpTargetSettings ( SimulationContext ctx)

Evaluate pump startup/shutoff depth hysteresis. Must be called ONCE per timestep BEFORE the DW iteration loop, matching legacy link_setTargetSetting() timing.


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