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

#include <InitialQualityData.hpp>

Collaboration diagram for openswmm::InitialQualityData:

Public Member Functions

int count () const
 
void add (bool link, const std::string &name, const std::string &cons, double v, int ei=-1, int k=kKindUnresolved, bool fromFile=false)
 
void erase (int idx)
 

Static Public Member Functions

static constexpr int msxKind (int species) noexcept
 
static constexpr int msxSpecies (int k) noexcept
 Species index for an MSX kind, -1 for any other kind.
 

Public Attributes

std::vector< uint8_t > is_link
 0 = NODE row, 1 = LINK row
 
std::vector< std::string > elem_name
 Raw element name (post-parse re-resolution)
 
std::vector< int > elem_idx
 Resolved node/link index (-1 until resolved)
 
std::vector< std::string > constituent
 Raw constituent name (writer round-trip)
 
std::vector< int > kind
 >=0 pollutant idx; kKind* otherwise
 
std::vector< double > value
 
std::vector< uint8_t > from_file
 
std::string file
 

Static Public Attributes

static constexpr int kKindWaterAge = -1
 Classified constituent kinds (see kind).
 
static constexpr int kKindTemperature = -2
 TEMPERATURE (degC)
 
static constexpr int kKindUnresolved = -3
 
static constexpr int kKindMsxFirst = -100
 

Member Function Documentation

◆ add()

void openswmm::InitialQualityData::add ( bool link,
const std::string & name,
const std::string & cons,
double v,
int ei = -1,
int k = kKindUnresolved,
bool fromFile = false )
inline
Here is the caller graph for this function:

◆ count()

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

◆ erase()

void openswmm::InitialQualityData::erase ( int idx)
inline

Remove the entry at idx. No-op if out of range. Subsequent entries shift down by one — callers that hold cached indices must re-resolve.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ msxKind()

static constexpr int openswmm::InitialQualityData::msxKind ( int species)
inlinestaticconstexprnoexcept
Here is the caller graph for this function:

◆ msxSpecies()

static constexpr int openswmm::InitialQualityData::msxSpecies ( int k)
inlinestaticconstexprnoexcept

Species index for an MSX kind, -1 for any other kind.

Here is the caller graph for this function:

Member Data Documentation

◆ constituent

std::vector<std::string> openswmm::InitialQualityData::constituent

Raw constituent name (writer round-trip)

◆ elem_idx

std::vector<int> openswmm::InitialQualityData::elem_idx

Resolved node/link index (-1 until resolved)

◆ elem_name

std::vector<std::string> openswmm::InitialQualityData::elem_name

Raw element name (post-parse re-resolution)

◆ file

std::string openswmm::InitialQualityData::file

U2: [INITIAL_QUALITY] FILE <path> as written (relative to the .inp); empty when none. Read at open, after the .inp parse.

◆ from_file

std::vector<uint8_t> openswmm::InitialQualityData::from_file

U2: 1 when the row came from the [INITIAL_QUALITY] FILE <csv> sidecar. The writer emits the FILE line and the inline rows only; the sidecar is the source of its rows (edit or re-import it).

◆ is_link

std::vector<uint8_t> openswmm::InitialQualityData::is_link

0 = NODE row, 1 = LINK row

◆ kind

std::vector<int> openswmm::InitialQualityData::kind

>=0 pollutant idx; kKind* otherwise

◆ kKindMsxFirst

int openswmm::InitialQualityData::kKindMsxFirst = -100
staticconstexpr

U2 (2026-09-07): MSX species m of the reactions component is encoded as kind = kKindMsxFirst - m (every value <= kKindMsxFirst). The row stays here for the writer ([INITIAL_QUALITY] is the canonical home) and is mirrored into ReactionData::init_elem_* for the engines by transport::mirrorInitialQualityMsxRows.

◆ kKindTemperature

int openswmm::InitialQualityData::kKindTemperature = -2
staticconstexpr

TEMPERATURE (degC)

◆ kKindUnresolved

int openswmm::InitialQualityData::kKindUnresolved = -3
staticconstexpr

Not yet classified

◆ kKindWaterAge

int openswmm::InitialQualityData::kKindWaterAge = -1
staticconstexpr

Classified constituent kinds (see kind).

WATER_AGE (hours)

◆ value

std::vector<double> openswmm::InitialQualityData::value

Raw user-units value


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