30#ifndef OPENSWMM_ENGINE_INFRA_DATA_HPP
31#define OPENSWMM_ENGINE_INFRA_DATA_HPP
43 int count()
const {
return static_cast<int>(
names.size()); }
71 int count()
const {
return static_cast<int>(
names.size()); }
76 std::vector<double>
sx;
122 int add_row(
const std::string& name,
const std::string& type) {
123 names.push_back(name);
126 width.push_back(0.0);
141 auto u =
static_cast<std::size_t
>(idx);
142 names.erase(
names.begin() +
static_cast<std::ptrdiff_t
>(u));
144 length.erase(
length.begin() +
static_cast<std::ptrdiff_t
>(u));
145 width.erase(
width.begin() +
static_cast<std::ptrdiff_t
>(u));
189 int add_row(
int link_idx,
int node_host_idx,
int design_idx,
int capture_node_idx) {
207 auto e = [idx](
auto& v) {
208 if (
static_cast<std::size_t
>(idx) < v.size())
209 v.erase(v.begin() +
static_cast<std::ptrdiff_t
>(idx));
219 for (
int i = 0; i <
count(); ++i)
220 if (
link_index[
static_cast<std::size_t
>(i)] == link_idx)
return i;
225 for (
int i = 0; i <
count(); ++i)
226 if (
node_host[
static_cast<std::size_t
>(i)] == node_idx)
return i;
237 auto un =
static_cast<std::size_t
>(n);
Definition NodeCoupling.cpp:16
Definition InfraData.hpp:249
int count() const
Definition InfraData.hpp:250
std::vector< std::string > rule_text
Definition InfraData.hpp:254
Definition InfraData.hpp:103
std::vector< double > open_area
GENERIC only: open-area fraction (0,1].
Definition InfraData.hpp:111
std::vector< int > curve_index
CUSTOM: resolved curve index (-1 until PostParseResolver)
Definition InfraData.hpp:117
std::vector< double > width
grate or slotted width
Definition InfraData.hpp:109
std::vector< std::string > curve_id
CUSTOM: capture curve name.
Definition InfraData.hpp:116
void erase_row(int idx)
Definition InfraData.hpp:140
std::vector< double > curb_height
CURB/DROP_CURB/COMBO.
Definition InfraData.hpp:114
std::vector< std::string > grate_type
P_BAR-50, P_BAR-50x100, P_BAR-30, CURVED_VANE, TILT_BAR-45, TILT_BAR-30, RETICULINE,...
Definition InfraData.hpp:110
std::vector< std::string > comments
optional description (round-tripped as ';' comment)
Definition InfraData.hpp:119
int count() const
Definition InfraData.hpp:104
std::vector< double > curb_length
CURB/DROP_CURB/COMBO.
Definition InfraData.hpp:113
std::vector< double > splash_veloc
GENERIC only: splash-over velocity.
Definition InfraData.hpp:112
int add_row(const std::string &name, const std::string &type)
Append a fully defaulted row; returns its index.
Definition InfraData.hpp:122
std::vector< std::string > inlet_type
GRATE/CURB/COMBO/SLOTTED/DROP_GRATE/DROP_CURB/CUSTOM.
Definition InfraData.hpp:107
std::vector< double > length
grate or slotted length
Definition InfraData.hpp:108
std::vector< int > curb_throat
0=HORIZONTAL 1=INCLINED 2=VERTICAL (legacy ThroatAngleWords order); default 2
Definition InfraData.hpp:115
std::vector< std::string > names
Definition InfraData.hpp:106
std::vector< int > curve_kind
CUSTOM: 0=unresolved, 1=DIVERSION (captured vs approach flow), 2=RATING (captured vs depth)
Definition InfraData.hpp:118
Definition InfraData.hpp:168
std::vector< int > num_inlets
Number of inlets per side.
Definition InfraData.hpp:175
std::vector< int > street_index
Definition InfraData.hpp:181
int find_by_link(int link_idx) const
Row index of the usage hosted by conduit link_idx, or -1.
Definition InfraData.hpp:218
std::vector< std::string > pending_design_name
Definition InfraData.hpp:185
std::vector< std::string > pending_capture_name
Definition InfraData.hpp:186
std::vector< int > design_index
Index into InletStore.
Definition InfraData.hpp:173
std::vector< double > stat_capture_vol
Total captured volume (ft³)
Definition InfraData.hpp:231
std::vector< double > flow_limit
Max capture flow per inlet (user flow units), 0=unlimited.
Definition InfraData.hpp:178
void erase_row(int idx)
Definition InfraData.hpp:206
std::vector< int > node_index
Capture (receiving / underdrain) node index.
Definition InfraData.hpp:174
std::vector< int > node_host
Host inlet-junction node index (-1 for a conduit usage)
Definition InfraData.hpp:172
int add_row(int link_idx, int node_host_idx, int design_idx, int capture_node_idx)
Append a defaulted row; returns its index.
Definition InfraData.hpp:189
int find_by_node_host(int node_idx) const
Row index of the usage hosted by inlet-junction node node_idx, or -1.
Definition InfraData.hpp:224
std::vector< double > local_width
Local depression width (user length units)
Definition InfraData.hpp:180
std::vector< double > local_depress
Local gutter depression (user length units)
Definition InfraData.hpp:179
std::vector< double > stat_peak_flow
Peak captured flow (cfs)
Definition InfraData.hpp:234
std::vector< int > placement
0=auto, 1=on_grade, 2=on_sag
Definition InfraData.hpp:176
std::vector< double > clog_factor
1.0 - pctClogged/100
Definition InfraData.hpp:177
int count() const
Definition InfraData.hpp:169
std::vector< int > link_index
Host conduit link index (-1 for an inlet junction)
Definition InfraData.hpp:171
std::vector< double > stat_backflow_vol
Total backflow volume (ft³)
Definition InfraData.hpp:233
void resize_stats(int n)
Definition InfraData.hpp:236
std::vector< double > stat_bypass_vol
Total bypassed volume (ft³)
Definition InfraData.hpp:232
Definition InfraData.hpp:70
std::vector< double > gutter_depres
Definition InfraData.hpp:78
std::vector< double > h_curb
Definition InfraData.hpp:75
std::vector< double > back_slope
Definition InfraData.hpp:82
std::vector< double > sx
Cross slope (%)
Definition InfraData.hpp:76
std::vector< double > back_n
Definition InfraData.hpp:83
std::vector< double > back_width
Definition InfraData.hpp:81
std::vector< double > gutter_width
Definition InfraData.hpp:79
int count() const
Definition InfraData.hpp:71
std::vector< double > t_crown
Definition InfraData.hpp:74
std::vector< int > sides
Definition InfraData.hpp:80
std::vector< std::string > names
Definition InfraData.hpp:73
std::vector< double > n_road
Definition InfraData.hpp:77
Definition InfraData.hpp:42
std::vector< std::string > comments
Free-form description per transect (DA-ENG-09)
Definition InfraData.hpp:46
std::vector< double > x_left_encroachment
Definition InfraData.hpp:56
std::vector< double > x_left_bank
Definition InfraData.hpp:50
std::vector< double > y_factor
Definition InfraData.hpp:59
std::vector< double > x_right_bank
Definition InfraData.hpp:51
std::vector< double > n_left
Definition InfraData.hpp:47
std::vector< std::vector< double > > stations
Station-elevation pairs per transect.
Definition InfraData.hpp:62
std::vector< double > x_factor
Definition InfraData.hpp:58
std::vector< double > n_channel
Definition InfraData.hpp:49
std::vector< std::vector< double > > elevations
Definition InfraData.hpp:63
std::vector< double > length_factor
Definition InfraData.hpp:60
int count() const
Definition InfraData.hpp:43
std::vector< double > x_right_encroachment
Definition InfraData.hpp:57
std::vector< std::string > names
Definition InfraData.hpp:45
std::vector< double > n_right
Definition InfraData.hpp:48