Runtime bed state, one entry per LINK.
More...
#include <BedZoneData.hpp>
|
| void | resizeCells (int n_cells, int n_spec, double t_init) |
| | Replace cell-resolved bed state with initial temperature and zero solutes.
|
| |
| void | resize (int n_links, int n_spec, double t_init) |
| | Replace link bed state and request subsequent concentration seeding.
|
| |
| bool | sized (int n_links) const noexcept |
| | Check the link-temperature array length.
|
| |
| void | clear () |
| | Release all link/cell bed state and reset counts/seeding flags.
|
| |
Runtime bed state, one entry per LINK.
Sized to links rather than to the active engine's own elements (ARD cells, LARD parcels) because the bed does not move and does not subdivide: it is a property of the conduit, and every engine can address it by link index without agreeing on a mesh.
- Warning
- Under
EULERIAN_ARD this means the bed exchanges with the link's VOLUME-WEIGHTED MEAN temperature, not cell by cell, so a bed under a long conduit cannot resolve a front the way the water above it does. That is a real loss of resolution against the reference (whose HTS elements map 1:1 onto channel elements) and it is recorded here rather than in a handoff because the next person to add a cell-resolved bed needs to find it attached to the array they would have to widen.
◆ clear()
| void openswmm::BedZoneState::clear |
( |
| ) |
|
|
inline |
Release all link/cell bed state and reset counts/seeding flags.
Restores default empty state; invalidates borrowed vector entries and leaves sediment configuration elsewhere unchanged.
◆ resize()
| void openswmm::BedZoneState::resize |
( |
int | n_links, |
|
|
int | n_spec, |
|
|
double | t_init ) |
|
inline |
Replace link bed state and request subsequent concentration seeding.
Link concentrations are zero-filled in link-major [link*n_spec+species] layout and seeded=false. Cell state is unchanged. Does not validate temperatures or roll back allocation failure.
- Parameters
-
| [in] | n_links | Link count; negative treated as zero. |
| [in] | n_spec | Species count; negative treated as zero; size product must fit size_t. |
| [in] | t_init | Initial bed temperature in degC. |
◆ resizeCells()
| void openswmm::BedZoneState::resizeCells |
( |
int | n_cells, |
|
|
int | n_spec, |
|
|
double | t_init ) |
|
inline |
Replace cell-resolved bed state with initial temperature and zero solutes.
Concentrations use species-major [species*cell_count+cell] layout in species units. Sets cells_seeded=true after allocations; link state is unchanged. Allocation can leave partially replaced vectors.
- Parameters
-
| [in] | n_cells | Cell count; negative treated as zero. |
| [in] | n_spec | Species count; negative treated as zero. Dimension product must fit size_t. |
| [in] | t_init | Initial bed temperature in degC, copied without validation. |
◆ sized()
| bool openswmm::BedZoneState::sized |
( |
int | n_links | ) |
const |
|
inlinenoexcept |
Check the link-temperature array length.
- Parameters
-
| [in] | n_links | Expected link count; negative treated as zero. |
- Returns
- True for matching link_temp length, independent of species shape, concentrations and seeded flag.
◆ cell_conc
| std::vector<double> openswmm::BedZoneState::cell_conc |
SPECIES-MAJOR [s * n_cells + c] — cell_phi's own layout, because the ARD binding walks both arrays in the same loop and two layouts in one loop is how a stride bug reads plausibly.
◆ cell_n_species
| int openswmm::BedZoneState::cell_n_species = 0 |
◆ cell_temp
| std::vector<double> openswmm::BedZoneState::cell_temp |
◆ cells_seeded
| bool openswmm::BedZoneState::cells_seeded = false |
◆ link_conc
| std::vector<double> openswmm::BedZoneState::link_conc |
[link * n_species + s], concentration in the bed water, in each species' own units. Species-minor to match node_mass_'s layout in the ARD store, which is the binding most likely to index it.
◆ link_temp
| std::vector<double> openswmm::BedZoneState::link_temp |
◆ n_species
| int openswmm::BedZoneState::n_species = 0 |
◆ seeded
| bool openswmm::BedZoneState::seeded = false |
The documentation for this struct was generated from the following file:
- /home/runner/work/openswmm.engine/openswmm.engine/src/engine/data/BedZoneData.hpp