#include <Landuse.hpp>
|
| std::size_t | bu_idx (int sc, int lu, int p) const |
| | Index into buildup array for (subcatch, landuse, pollutant)
|
| |
| void | resize (int n_sc, int n_lu, int n_poll) |
| | Reset surface quality storage to requested subcatchment/landuse/pollutant dimensions.
|
| |
◆ bu_idx()
| std::size_t openswmm::landuse::SurfaceQualitySoA::bu_idx |
( |
int | sc, |
|
|
int | lu, |
|
|
int | p ) const |
|
inline |
Index into buildup array for (subcatch, landuse, pollutant)
Flatten a complete subcatchment/landuse/pollutant buildup coordinate.
- Parameters
-
| [in] | sc | Valid nonnegative subcatchment index. |
| [in] | lu | Valid landuse below n_landuses. |
| [in] | p | Valid pollutant below n_pollutants. |
- Returns
- (sc*n_landuses+lu)*n_pollutants+p; products must fit int for the n_landuses*n_pollutants intermediate. No bounds/overflow checks, allocation or state mutation.
◆ resize()
| void openswmm::landuse::SurfaceQualitySoA::resize |
( |
int | n_sc, |
|
|
int | n_lu, |
|
|
int | n_poll ) |
Reset surface quality storage to requested subcatchment/landuse/pollutant dimensions.
- Parameters
-
| [in] | n_sc | Nonnegative subcatchment count. |
| [in] | n_lu | Nonnegative landuse count. |
| [in] | n_poll | Nonnegative pollutant count; all products must fit signed int before size_t cast. |
- Note
- Replaces dimension fields, zero-assigns buildup n_sc*n_lu*n_poll and concentration n_sc*n_poll. Invalidates prior views/discards evolved stores. Allocation can throw after dimensions/earlier array changed; exclusive setup access, no conservation ledger/physical clock update.
◆ buildup
| std::vector<double> openswmm::landuse::SurfaceQualitySoA::buildup |
Per-landuse buildup: [subcatch * n_landuses * n_pollutants + lu * n_pollutants + p] Matches legacy Subcatch[j].landFactor[lu].buildup[p] (mass per normalizer unit)
◆ n_landuses
| int openswmm::landuse::SurfaceQualitySoA::n_landuses = 0 |
◆ n_pollutants
| int openswmm::landuse::SurfaceQualitySoA::n_pollutants = 0 |
◆ n_subcatch
| int openswmm::landuse::SurfaceQualitySoA::n_subcatch = 0 |
◆ washoff_conc
| std::vector<double> openswmm::landuse::SurfaceQualitySoA::washoff_conc |
Washoff concentration [subcatch * n_pollutants + pollutant] (mass/vol)
The documentation for this struct was generated from the following files:
- /home/runner/work/openswmm.engine/openswmm.engine/src/engine/quality/Landuse.hpp
- /home/runner/work/openswmm.engine/openswmm.engine/src/engine/quality/Landuse.cpp