OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmm::InletUsageStore Struct Reference

#include <InfraData.hpp>

Collaboration diagram for openswmm::InletUsageStore:

Public Member Functions

int count () const
 Count stored rows from the design_index column.
 
int add_row (int link_idx, int node_host_idx, int design_idx, int capture_node_idx)
 Append an unresolved/default inlet usage with explicit host references.
 
void erase_row (int idx)
 Erase a usage row from each column that contains it.
 
int find_by_link (int link_idx) const
 Find the first usage with a matching conduit-host key.
 
int find_by_node_host (int node_idx) const
 Find the first usage with a matching inlet-junction host key.
 
void resize_stats (int n)
 Replace inlet usage statistics with zeroed columns.
 

Public Attributes

std::vector< int > link_index
 Host conduit link index (-1 for an inlet junction)
 
std::vector< int > node_host
 Host inlet-junction node index (-1 for a conduit usage)
 
std::vector< int > design_index
 Index into InletStore.
 
std::vector< int > node_index
 Capture (receiving / underdrain) node index.
 
std::vector< int > num_inlets
 Number of inlets per side.
 
std::vector< int > placement
 0=auto, 1=on_grade, 2=on_sag
 
std::vector< double > clog_factor
 1.0 - pctClogged/100
 
std::vector< double > flow_limit
 Max capture flow per inlet (user flow units), 0=unlimited.
 
std::vector< double > local_depress
 Local gutter depression (user length units)
 
std::vector< double > local_width
 Local depression width (user length units)
 
std::vector< int > street_index
 
std::vector< std::string > pending_design_name
 
std::vector< std::string > pending_capture_name
 
std::vector< double > stat_capture_vol
 Total captured volume (ft³)
 
std::vector< double > stat_bypass_vol
 Total bypassed volume (ft³)
 
std::vector< double > stat_backflow_vol
 Total backflow volume (ft³)
 
std::vector< double > stat_peak_flow
 Peak captured flow (cfs)
 

Detailed Description

One row per inlet placement. Two host kinds share the store:

  • conduit-attribute usage ([INLET_USAGE]): link_index >= 0, node_host == -1
  • inlet junction ([INLET_JUNCTIONS]): link_index == -1, node_host >= 0 flow_limit / local_depress / local_width are kept in USER units (as read); InletSolver converts at init.

Member Function Documentation

◆ add_row()

int openswmm::InletUsageStore::add_row ( int link_idx,
int node_host_idx,
int design_idx,
int capture_node_idx )
inline

Append an unresolved/default inlet usage with explicit host references.

Defaults one inlet, AUTO placement, unclogged, zero limits/depression and street=-1; pending names empty. Does not grow statistic vectors, resolve a street, or enforce exactly one host. Allocation can leave partial appends.

Parameters
[in]link_idxHost conduit index, or -1 for node hosting; copied without validation.
[in]node_host_idxHost inlet-junction index, or -1 for conduit hosting.
[in]design_idxInletStore design index; caller validates or resolves later.
[in]capture_node_idxReceiving node index; copied without topology validation.
Returns
New usage row index.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ count()

int openswmm::InletUsageStore::count ( ) const
inline

Count stored rows from the design_index column.

Returns
design_index.size() converted to int; parallel-column alignment and referenced-object validity are not checked.
Here is the caller graph for this function:

◆ erase_row()

void openswmm::InletUsageStore::erase_row ( int idx)
inline

Erase a usage row from each column that contains it.

Also visits optional statistic vectors. Does not guarantee alignment if columns were already inconsistent, or renumber model references stored within surviving rows.

Parameters
[in]idxRow index; negative or out-of-range values skip each column independently.
Here is the caller graph for this function:

◆ find_by_link()

int openswmm::InletUsageStore::find_by_link ( int link_idx) const
inline

Find the first usage with a matching conduit-host key.

Linear scan using design_index count; link_index must contain at least that many entries.

Parameters
[in]link_idxStored host key; no link bounds/type validation, and -1 may match a node-hosted row.
Returns
First matching usage row, or -1.
Here is the call graph for this function:

◆ find_by_node_host()

int openswmm::InletUsageStore::find_by_node_host ( int node_idx) const
inline

Find the first usage with a matching inlet-junction host key.

Linear scan using design_index count; node_host must contain at least that many entries.

Parameters
[in]node_idxStored host key; no node bounds/type validation, and -1 may match a conduit-hosted row.
Returns
First matching usage row, or -1.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ resize_stats()

void openswmm::InletUsageStore::resize_stats ( int n)
inline

Replace inlet usage statistics with zeroed columns.

Volumes use ft3 and peak flow cfs. Preserves definitions; independent assignments can fail partway on allocation.

Parameters
[in]nNonnegative row count, normally count(); no negative-value check.
Here is the caller graph for this function:

Member Data Documentation

◆ clog_factor

std::vector<double> openswmm::InletUsageStore::clog_factor

1.0 - pctClogged/100

◆ design_index

std::vector<int> openswmm::InletUsageStore::design_index

Index into InletStore.

◆ flow_limit

std::vector<double> openswmm::InletUsageStore::flow_limit

Max capture flow per inlet (user flow units), 0=unlimited.

◆ link_index

std::vector<int> openswmm::InletUsageStore::link_index

Host conduit link index (-1 for an inlet junction)

◆ local_depress

std::vector<double> openswmm::InletUsageStore::local_depress

Local gutter depression (user length units)

◆ local_width

std::vector<double> openswmm::InletUsageStore::local_width

Local depression width (user length units)

◆ node_host

std::vector<int> openswmm::InletUsageStore::node_host

Host inlet-junction node index (-1 for a conduit usage)

◆ node_index

std::vector<int> openswmm::InletUsageStore::node_index

Capture (receiving / underdrain) node index.

◆ num_inlets

std::vector<int> openswmm::InletUsageStore::num_inlets

Number of inlets per side.

◆ pending_capture_name

std::vector<std::string> openswmm::InletUsageStore::pending_capture_name

◆ pending_design_name

std::vector<std::string> openswmm::InletUsageStore::pending_design_name

Design / capture-node names of an [INLET_JUNCTIONS] row, kept until PostParseResolver turns them into design_index / node_index. Empty on a row whose references were already resolved at parse time.

◆ placement

std::vector<int> openswmm::InletUsageStore::placement

0=auto, 1=on_grade, 2=on_sag

◆ stat_backflow_vol

std::vector<double> openswmm::InletUsageStore::stat_backflow_vol

Total backflow volume (ft³)

◆ stat_bypass_vol

std::vector<double> openswmm::InletUsageStore::stat_bypass_vol

Total bypassed volume (ft³)

◆ stat_capture_vol

std::vector<double> openswmm::InletUsageStore::stat_capture_vol

Total captured volume (ft³)

◆ stat_peak_flow

std::vector<double> openswmm::InletUsageStore::stat_peak_flow

Peak captured flow (cfs)

◆ street_index

std::vector<int> openswmm::InletUsageStore::street_index

Index into StreetStore, resolved by PostParseResolver (-1 if host xsect is not STREET)


The documentation for this struct was generated from the following file: