Per-(unit, layer, species) state for every LID unit in the model.
More...
#include <LidLayerSpeciesData.hpp>
|
| bool | active () const noexcept |
| |
| std::size_t | layer_index (int unit, LidLayer layer, int species) const noexcept |
| |
| void | resize (int units, int species, const std::vector< int > &offsets) |
| |
| void | ensureSized (int units, int species, const std::vector< int > &offsets) |
| | Size the block if it is not already the requested shape.
|
| |
| void | clear () |
| |
Per-(unit, layer, species) state for every LID unit in the model.
Values are whatever the species means — seconds for AGE. The update is complete-mix per layer: what is held ages, what arrives mixes in by volume, and what leaves does so at the layer's own value, which is why only the INFLOW is needed.
◆ active()
| bool openswmm::LidLayerSpeciesState::active |
( |
| ) |
const |
|
inlinenoexcept |
◆ clear()
| void openswmm::LidLayerSpeciesState::clear |
( |
| ) |
|
|
inline |
◆ ensureSized()
| void openswmm::LidLayerSpeciesState::ensureSized |
( |
int | units, |
|
|
int | species, |
|
|
const std::vector< int > & | offsets ) |
|
inline |
Size the block if it is not already the requested shape.
H5b: the block is now shared by TWO capabilities that are independently switchable. A4's initLidLayerAge both sized and seeded, under a water_age guard — so a HEAT-only deck would never have sized it, and an AGE-only deck would have left the temperature row at 0 °C, which D-H5c exists to say is a real temperature and not a sentinel.
Both initialisers now call this first and seed only their own row, so neither depends on the other having run. That is the lesson-20 configuration trap, whose eighth instance this would otherwise have been.
◆ layer_index()
| std::size_t openswmm::LidLayerSpeciesState::layer_index |
( |
int | unit, |
|
|
LidLayer | layer, |
|
|
int | species ) const |
|
inlinenoexcept |
◆ resize()
| void openswmm::LidLayerSpeciesState::resize |
( |
int | units, |
|
|
int | species, |
|
|
const std::vector< int > & | offsets ) |
|
inline |
- Note
- No defaulted arguments, deliberately. A3's round removed a default from
WaterAgeState::resize because a short call compiled and emptied the new arrays at runtime, where nothing could observe it — every call site was guarded by a size mismatch that repaired itself on the next step. Requiring both counts keeps that failure at the compiler.
◆ drain_value
| std::vector<double> openswmm::LidLayerSpeciesState::drain_value |
[unit * n_species + species] — what leaves through the underdrain. Decision (2026-08-18): the drain draws from the STORAGE layer, so this is the storage row for every type that has one.
◆ group_offset
| std::vector<int> openswmm::LidLayerSpeciesState::group_offset |
[type] flat index of that group's first unit; size = numGroups() + 1, so group_offset.back() == n_units.
◆ inflow_value
| std::vector<double> openswmm::LidLayerSpeciesState::inflow_value |
[unit * n_species + species] — the value of the water arriving at the unit from its subcatchment (rainfall, captured subarea runoff, and run-on where the LID occupies the whole subcatchment), flow-weighted at the point those terms are assembled.
◆ kLayerCount
| int openswmm::LidLayerSpeciesState::kLayerCount = static_cast<int>(LidLayer::COUNT_) |
|
staticconstexpr |
◆ n_species
| int openswmm::LidLayerSpeciesState::n_species = 0 |
◆ n_units
| int openswmm::LidLayerSpeciesState::n_units = 0 |
◆ value
| std::vector<double> openswmm::LidLayerSpeciesState::value |
[(unit * kLayerCount + layer) * n_species + species]
◆ vol_prev
| std::vector<double> openswmm::LidLayerSpeciesState::vol_prev |
[unit * kLayerCount + layer] — the layer's stored water at the END of the previous step, as a depth per unit area (ft), void-weighted the way LIDSolver::storedVolume() weights it. Kept because the solver overwrites its depths in place, so the old volume is otherwise gone by the time the age update runs.
The documentation for this struct was generated from the following file: