OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmm::lard::SegmentStore Class Reference

#include <SegmentStore.hpp>

Collaboration diagram for openswmm::lard::SegmentStore:

Public Member Functions

void resize (int n_links, int n_species, int cap=kMaxSegmentsPerLink)
 
int count (int l) const
 
int species () const
 
int capacity () const
 
double total_volume (int l) const
 
double seg_volume (int l, int i) const
 
double seg_conc (int l, int i, int s) const
 
void set_seg_conc (int l, int i, int s, double c)
 
void mean_conc (int l, double *out) const
 
void clear_link (int l)
 Remove one whole link's contents (init/re-seed).
 
double drain_back (int l, double vol_target, double *mass_out)
 Drain up to vol_target from the BACK (downstream end).
 
double drain_front (int l, double vol_target, double *mass_out)
 
void push_front (int l, double volume, const double *c)
 Release a new segment at the FRONT (upstream end).
 
void reverse (int l)
 §4.4 flow reversal: front becomes back, in place.
 
void add_species (int s, double delta)
 Add a constant to one species on every LIVE segment.
 
double decay_species (int s, double factor)
 Exact-exponential decay on one species over every LIVE segment.
 

Member Function Documentation

◆ add_species()

void openswmm::lard::SegmentStore::add_species ( int s,
double delta )
inline

Add a constant to one species on every LIVE segment.

X4: the water-age row ages by exactly +dt per routing step in every parcel (zero-order growth, water age plan §1). Only live segments are touched — stale slot contents never age.

Here is the call graph for this function:

◆ capacity()

int openswmm::lard::SegmentStore::capacity ( ) const
inline

◆ clear_link()

void openswmm::lard::SegmentStore::clear_link ( int l)
inline

Remove one whole link's contents (init/re-seed).

◆ count()

int openswmm::lard::SegmentStore::count ( int l) const
inline
Here is the caller graph for this function:

◆ decay_species()

double openswmm::lard::SegmentStore::decay_species ( int s,
double factor )
inline

Exact-exponential decay on one species over every LIVE segment.

Parameters
factorexp(-k·dt), applied multiplicatively.
Returns
the total mass removed (for the reacted ledger row).
Here is the call graph for this function:

◆ drain_back()

double openswmm::lard::SegmentStore::drain_back ( int l,
double vol_target,
double * mass_out )
inline

Drain up to vol_target from the BACK (downstream end).

Parameters
mass_outns_ entries, ACCUMULATED into (not reset) — the mass carried by the drained water.
Returns
the volume actually drained (< target iff the link emptied).
Here is the call graph for this function:

◆ drain_front()

double openswmm::lard::SegmentStore::drain_front ( int l,
double vol_target,
double * mass_out )
inline

Same as drain_back but from the FRONT (upstream end) — the volume- reconciliation path for a link that shrank by more than its outflow.

Here is the call graph for this function:

◆ mean_conc()

void openswmm::lard::SegmentStore::mean_conc ( int l,
double * out ) const
inline

Volume-weighted mean concentration over the link's segments. out has ns_ entries; an empty link reports 0.

Here is the call graph for this function:

◆ push_front()

void openswmm::lard::SegmentStore::push_front ( int l,
double volume,
const double * c )
inline

Release a new segment at the FRONT (upstream end).

Merges into the existing front segment when every species is within the §4.5 tolerance; on a full ring the two front segments merge first (D-L5) so the push never reallocates.

Here is the call graph for this function:

◆ resize()

void openswmm::lard::SegmentStore::resize ( int n_links,
int n_species,
int cap = kMaxSegmentsPerLink )
inline

◆ reverse()

void openswmm::lard::SegmentStore::reverse ( int l)
inline

§4.4 flow reversal: front becomes back, in place.

Here is the call graph for this function:

◆ seg_conc()

double openswmm::lard::SegmentStore::seg_conc ( int l,
int i,
int s ) const
inline
Here is the caller graph for this function:

◆ seg_volume()

double openswmm::lard::SegmentStore::seg_volume ( int l,
int i ) const
inline
Here is the caller graph for this function:

◆ set_seg_conc()

void openswmm::lard::SegmentStore::set_seg_conc ( int l,
int i,
int s,
double c )
inline

X3b: the RWPT exchange rewrites segment concentrations in place (mass-conserving by its own construction — every debit pairs with a credit; see RwptDispersion::exchange).

◆ species()

int openswmm::lard::SegmentStore::species ( ) const
inline
Here is the caller graph for this function:

◆ total_volume()

double openswmm::lard::SegmentStore::total_volume ( int l) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: