OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
SegmentStore.hpp File Reference

LARD segment slabs — per-link ring buffers of plug-flow segments. More...

#include <algorithm>
#include <cstddef>
#include <vector>
Include dependency graph for SegmentStore.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  openswmm::lard::SegmentStore
 

Namespaces

namespace  openswmm
 
namespace  openswmm::lard
 

Variables

constexpr int openswmm::lard::kMaxSegmentsPerLink = 100
 
constexpr double openswmm::lard::kMergeAtol = 1.0e-6
 
constexpr double openswmm::lard::kMergeRtol = 1.0e-4
 

Detailed Description

LARD segment slabs — per-link ring buffers of plug-flow segments.

Subplan X2 (LARD_AGE_EXPEDITE_SUBPLAN_2026-08-23.md), layout per the strategy's binding §16 amendments:

  • D-L2 slab layout: link l owns physical slots [l*cap, (l+1)*cap) with a per-link head/count ring — prepend at the front (upstream), consume from the back (downstream), no compaction, no mid-step reallocation.
  • D-L1 species-major: conc[s * slab_total + l*cap + slot] — one species is a contiguous stripe across every slab, which is what vectorizes decay and (later) advection sweeps.
  • D-L5: overflow merges the two front segments (mass-conservative) instead of growing under the step.

Front (logical index 0) is the current upstream end; the ring is reversed in place when the link's flow changes sign (§4.4). All operations conserve mass exactly: a drain reports the mass it removed, a push books the mass it added, and a merge is a volume-weighted average.

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n Apache-2.0