OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmm::landuse::SurfaceQualitySoA Struct Reference

#include <Landuse.hpp>

Collaboration diagram for openswmm::landuse::SurfaceQualitySoA:

Public Member Functions

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.
 

Public Attributes

int n_subcatch = 0
 
int n_landuses = 0
 
int n_pollutants = 0
 
std::vector< double > buildup
 
std::vector< double > washoff_conc
 Washoff concentration [subcatch * n_pollutants + pollutant] (mass/vol)
 

Member Function Documentation

◆ 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]scValid nonnegative subcatchment index.
[in]luValid landuse below n_landuses.
[in]pValid 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_scNonnegative subcatchment count.
[in]n_luNonnegative landuse count.
[in]n_pollNonnegative 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.

Member Data Documentation

◆ 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: