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

Dataset groups the 2D results writer can emit ([2D_OPTIONS] REPORT_2D_VARIABLES). One bit per group; the tokens are the names below. Unselected groups are NOT created in the file, so readers treat every time-varying dataset as optional. More...

Enumerations

enum  Var : unsigned {
  DEPTH = 1u << 0 ,
  VELOCITY = 1u << 1 ,
  EDGE_FLUX = 1u << 2 ,
  NODE_HEAD = 1u << 3 ,
  SPECIES = 1u << 4 ,
  RAINFALL = 1u << 5 ,
  INFILTRATION = 1u << 6 ,
  COUPLING = 1u << 7 ,
  GRADIENTS = 1u << 8 ,
  CONTINUITY = 1u << 9 ,
  ENVELOPES = 1u << 10 ,
  ALL_MASK = (1u << 11) - 1u ,
  DEFAULT_MASK ,
  MINIMAL_MASK = DEPTH | NODE_HEAD | ENVELOPES
}
 

Functions

const std::vector< std::string > & tokens ()
 Group tokens in bit order (index i ↔ bit 1u << i).
 
bool iequalsTok (const std::string &a, const char *b)
 
std::vector< std::string > splitList (const std::string &text)
 Split on whitespace / commas.
 
std::string parseMask (const std::string &text, unsigned &mask)
 Parse a token list or a preset (DEFAULT | MINIMAL | ALL | NONE) into a bitmask. DEPTH is always included — every reader keys the time axis on it. Returns an error string, empty on success.
 
std::string formatMask (unsigned mask)
 Preset name when the mask equals one, else the space-separated token list.
 
std::string formatSpecies (const std::vector< std::string > &species)
 "ALL" for an empty (unfiltered) list, else the space-separated names.
 
std::vector< std::string > parseSpecies (const std::string &text)
 Species list from text; "ALL" (alone) → empty list.
 
std::string formatStep (double seconds)
 HH:MM:SS (REPORT_STEP spelling).
 

Detailed Description

Dataset groups the 2D results writer can emit ([2D_OPTIONS] REPORT_2D_VARIABLES). One bit per group; the tokens are the names below. Unselected groups are NOT created in the file, so readers treat every time-varying dataset as optional.

Enumeration Type Documentation

◆ Var

Enumerator
DEPTH 

Mesh2_face_depth, Mesh2_face_head.

VELOCITY 

Mesh2_face_vx, Mesh2_face_vy.

EDGE_FLUX 

Mesh2_edge_flux (GUI velocity reconstruction, profile flux)

NODE_HEAD 

Mesh2_node_head, Mesh2_node_depth (render reconstruction)

SPECIES 

Mesh2_face_species_conc (when transport rows exist)

RAINFALL 

Mesh2_face_rainfall, Mesh2_face_rain_cum.

INFILTRATION 

Mesh2_face_infil_rate, Mesh2_face_infil_cum.

COUPLING 

Mesh2_face_coupling_flux, Mesh2_face_net_source.

GRADIENTS 

Mesh2_face_grad_hx/hy and the _lim pair (solver diagnostics)

CONTINUITY 

Mesh2_face_continuity_err (solver diagnostic)

ENVELOPES 

Mesh2_face_max_depth / _max_velocity / _max_continuity_err.

ALL_MASK 
DEFAULT_MASK 

DEFAULT: everything a user renders or plots; solver diagnostics off.

MINIMAL_MASK 

MINIMAL: depth map + render reconstruction + envelopes only.

Function Documentation

◆ formatMask()

std::string openswmm::twoD::report2d::formatMask ( unsigned mask)
inline

Preset name when the mask equals one, else the space-separated token list.

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

◆ formatSpecies()

std::string openswmm::twoD::report2d::formatSpecies ( const std::vector< std::string > & species)
inline

"ALL" for an empty (unfiltered) list, else the space-separated names.

Here is the caller graph for this function:

◆ formatStep()

std::string openswmm::twoD::report2d::formatStep ( double seconds)
inline

HH:MM:SS (REPORT_STEP spelling).

Here is the caller graph for this function:

◆ iequalsTok()

bool openswmm::twoD::report2d::iequalsTok ( const std::string & a,
const char * b )
inline
Here is the caller graph for this function:

◆ parseMask()

std::string openswmm::twoD::report2d::parseMask ( const std::string & text,
unsigned & mask )
inline

Parse a token list or a preset (DEFAULT | MINIMAL | ALL | NONE) into a bitmask. DEPTH is always included — every reader keys the time axis on it. Returns an error string, empty on success.

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

◆ parseSpecies()

std::vector< std::string > openswmm::twoD::report2d::parseSpecies ( const std::string & text)
inline

Species list from text; "ALL" (alone) → empty list.

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

◆ splitList()

std::vector< std::string > openswmm::twoD::report2d::splitList ( const std::string & text)
inline

Split on whitespace / commas.

Here is the caller graph for this function:

◆ tokens()

const std::vector< std::string > & openswmm::twoD::report2d::tokens ( )
inline

Group tokens in bit order (index i ↔ bit 1u << i).

Here is the caller graph for this function: