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

Dense SoA for conduit-only properties (one row per CONDUIT link). More...

#include <LinkSubtypes.hpp>

Collaboration diagram for openswmm::ConduitData:

Public Member Functions

int count () const noexcept
 Count ConduitData rows from the base-object join-key column.
 
void clear () noexcept
 Erase all ConduitData rows while retaining vector capacities.
 
void reserve (int n)
 Request capacity for each ConduitData column without changing row count.
 
int add_default (int i)
 Insert a default ConduitData row at the sorted base-object key position.
 
void erase_at (int r)
 Erase dense ConduitData row data and shift later dense rows down.
 

Public Attributes

std::vector< int > link_idx
 Base LinkData index (join key)
 
std::vector< double > roughness
 
std::vector< double > length
 
std::vector< double > true_length
 
std::vector< double > slope
 
std::vector< double > mod_length
 
std::vector< int > barrels
 
std::vector< double > beta
 
std::vector< double > rough_factor
 
std::vector< double > q_full
 
std::vector< double > q_max
 
std::vector< double > loss_inlet
 
std::vector< double > loss_outlet
 
std::vector< double > loss_avg
 
std::vector< double > seep_rate
 
std::vector< int > culvert_code
 
std::vector< double > evap_loss_rate
 per-step evaporation loss
 
std::vector< double > seep_loss_rate
 per-step seepage loss
 
std::vector< uint8_t > normal_flow_limited
 per-step flag (reset each step)
 
std::vector< uint8_t > inlet_control
 per-step culvert inlet-control flag
 
std::vector< int8_t > full_state
 per-step up/down full bitmask
 
std::vector< uint8_t > gw_coupled
 1 = signed conductance law applies
 
std::vector< double > gw_head_rel
 water-table elevation MINUS the conduit's mid invert (project length)
 
std::vector< double > gw_kc
 bed conductivity (project rate units); seeded from seep_rate
 
std::vector< double > gw_dc
 bed thickness / characteristic path (project length); seeded from the full depth
 
std::vector< double > gw_gain_max
 cap on the gaining direction, ONE barrel (project flow units)
 

Detailed Description

Dense SoA for conduit-only properties (one row per CONDUIT link).

Cross-section (xsect_*) and has_flap_gate stay on base LinkData (shared with orifice/weir). Init-derived hydraulic geometry (beta/rough_factor/q_full/q_max) lives here — it is config-derived, written once at init.

Member Function Documentation

◆ add_default()

int openswmm::ConduitData::add_default ( int i)
inline

Insert a default ConduitData row at the sorted base-object key position.

Assumes ascending link_idx and aligned columns. Seeds roughness=0.01, barrels=1; geometric/flow/loss fields and coupling state zero. Does not update the enclosing reverse map, reject duplicate keys, enforce lifecycle or initialize solver caches. Allocation failure can leave partially inserted parallel columns.

Parameters
[in]iNonnegative base-object index; caller ensures it exists, is of this subtype and is absent from this table.
Returns
Inserted dense row index; later dense rows shift up.

◆ clear()

void openswmm::ConduitData::clear ( )
inlinenoexcept

Erase all ConduitData rows while retaining vector capacities.

Invalidates element references/iterators and removes owned nested state. Does not clear base objects or repair the enclosing reverse map.

◆ count()

int openswmm::ConduitData::count ( ) const
inlinenoexcept

Count ConduitData rows from the base-object join-key column.

Returns
link_idx.size() converted to int; other column lengths are not checked.
Here is the caller graph for this function:

◆ erase_at()

void openswmm::ConduitData::erase_at ( int r)
inline

Erase dense ConduitData row data and shift later dense rows down.

Erases join/config/per-step columns through full_state, but this implementation leaves gw_coupled/gw_head_rel/gw_kc/gw_dc/gw_gain_max vectors unchanged. Does not erase a base object, renumber stored base keys or rebuild the reverse map; enclosing maintenance handles those steps.

Parameters
[in]rExisting dense subtype-row index, NOT the base-object index; caller validates bounds/alignment.

◆ reserve()

void openswmm::ConduitData::reserve ( int n)
inline

Request capacity for each ConduitData column without changing row count.

May invalidate column references/iterators. Allocation failure can leave different reserved capacities, while existing row values remain.

Parameters
[in]nNonnegative anticipated row count; caller validates before conversion to size_t.

Member Data Documentation

◆ barrels

std::vector<int> openswmm::ConduitData::barrels

◆ beta

std::vector<double> openswmm::ConduitData::beta

◆ culvert_code

std::vector<int> openswmm::ConduitData::culvert_code

◆ evap_loss_rate

std::vector<double> openswmm::ConduitData::evap_loss_rate

per-step evaporation loss

◆ full_state

std::vector<int8_t> openswmm::ConduitData::full_state

per-step up/down full bitmask

◆ gw_coupled

std::vector<uint8_t> openswmm::ConduitData::gw_coupled

1 = signed conductance law applies

◆ gw_dc

std::vector<double> openswmm::ConduitData::gw_dc

bed thickness / characteristic path (project length); seeded from the full depth

◆ gw_gain_max

std::vector<double> openswmm::ConduitData::gw_gain_max

cap on the gaining direction, ONE barrel (project flow units)

◆ gw_head_rel

std::vector<double> openswmm::ConduitData::gw_head_rel

water-table elevation MINUS the conduit's mid invert (project length)

◆ gw_kc

std::vector<double> openswmm::ConduitData::gw_kc

bed conductivity (project rate units); seeded from seep_rate

◆ inlet_control

std::vector<uint8_t> openswmm::ConduitData::inlet_control

per-step culvert inlet-control flag

◆ length

std::vector<double> openswmm::ConduitData::length

Authored [CONDUITS] length (ft)

◆ link_idx

std::vector<int> openswmm::ConduitData::link_idx

Base LinkData index (join key)

◆ loss_avg

std::vector<double> openswmm::ConduitData::loss_avg

◆ loss_inlet

std::vector<double> openswmm::ConduitData::loss_inlet

◆ loss_outlet

std::vector<double> openswmm::ConduitData::loss_outlet

◆ mod_length

std::vector<double> openswmm::ConduitData::mod_length

◆ normal_flow_limited

std::vector<uint8_t> openswmm::ConduitData::normal_flow_limited

per-step flag (reset each step)

◆ q_full

std::vector<double> openswmm::ConduitData::q_full

◆ q_max

std::vector<double> openswmm::ConduitData::q_max

◆ rough_factor

std::vector<double> openswmm::ConduitData::rough_factor

◆ roughness

std::vector<double> openswmm::ConduitData::roughness

◆ seep_loss_rate

std::vector<double> openswmm::ConduitData::seep_loss_rate

per-step seepage loss

◆ seep_rate

std::vector<double> openswmm::ConduitData::seep_rate

◆ slope

std::vector<double> openswmm::ConduitData::slope

◆ true_length

std::vector<double> openswmm::ConduitData::true_length

The length the routing uses — legacy conduit_getLength. Equal to length for every section but IRREGULAR, where the authored value is the main channel's and the routing length is the flood plain's, length / Transect.lengthFactor. Derived; refreshed by routing::applyConduitLengthening, never serialized.


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