![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
Classes | |
| struct | TransectData |
Functions | |
| void | buildTables (TransectData &td) |
| Build tabulated geometry from station-elevation data. | |
| void | buildCustomTables (TransectData &td, double y_full, const double *curve_x, const double *curve_y, int n_pts) |
| Build tabulated geometry from a CUSTOM shape curve. | |
| bool | buildFromStore (const TransectStore &ts, int index, double ucf_length, TransectData &td) |
| Build one transect's geometry tables from the raw [TRANSECTS] store. | |
Variables | |
| constexpr int | N_TRANSECT_TBL = 51 |
| void openswmm::transect::buildCustomTables | ( | TransectData & | td, |
| double | y_full, | ||
| const double * | curve_x, | ||
| const double * | curve_y, | ||
| int | n_pts ) |
Build tabulated geometry from a CUSTOM shape curve.
The shape curve defines normalized (y/yFull) vs (width/wMax). This function integrates area and computes hyd-radius tables that can be used by XSectBatch's per-link lookup kernel.
| td | [out] TransectData to populate (tables and full properties). |
| y_full | Full depth of the cross-section. |
| curve_x | Normalized depth values (y/yFull) from shape curve. |
| curve_y | Normalized width values (w/wMax) from shape curve. |
| n_pts | Number of curve points. |
| bool openswmm::transect::buildFromStore | ( | const TransectStore & | ts, |
| int | index, | ||
| double | ucf_length, | ||
| TransectData & | td ) |
Build one transect's geometry tables from the raw [TRANSECTS] store.
Copies the store entry into td, applies the legacy parse-time transforms (Station = x·Xfactor/UCF; Elev = (y + Yfactor)/UCF with Yfactor = y_factor/UCF; banks = (x/UCF)·Xfactor — see transect.c::setParams/addStation) to the COPY only, then calls buildTables(). The store itself stays raw/display so [TRANSECTS] round-trips losslessly. Shared by PostParseResolver (per-store resolve pass) and swmm_link_set_xsect (IRREGULAR assignment of a transect added after open) — the two must stay bit-identical.
| ts | Raw transect store. |
| index | Store row to build. |
| ucf_length | UCF(LENGTH) for the model's unit system. |
| td | [out] Built tables. |
| void openswmm::transect::buildTables | ( | TransectData & | td | ) |
Build tabulated geometry from station-elevation data.
Computes area, hydraulic radius, and width at each of N_TRANSECT_TBL equal depth increments from thalweg to maximum depth, then normalizes.
| td | [in/out] TransectData with stations/elevations filled. On output, tables and full-depth properties are set. |
|
constexpr |