OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
NodesHandler.cpp File Reference

Section handlers for [JUNCTIONS], [OUTFALLS], [DIVIDERS], [STORAGE], [COORDINATES]. More...

#include "NodesHandler.hpp"
#include "../Tokenizer.hpp"
#include "../../core/SimulationContext.hpp"
#include "../../data/NodeData.hpp"
#include "../../core/charconv_compat.hpp"
#include <charconv>
#include <string>
#include <string_view>
Include dependency graph for NodesHandler.cpp:

Namespaces

namespace  openswmm
 
namespace  openswmm::input
 

Functions

void openswmm::input::handle_junctions (SimulationContext &ctx, const std::vector< std::string > &lines)
 Parse [JUNCTIONS] into NodeData + node_names.
 
void openswmm::input::handle_outfalls (SimulationContext &ctx, const std::vector< std::string > &lines)
 Parse [OUTFALLS] — sets outfall-specific fields for nodes of type OUTFALL.
 
void openswmm::input::handle_dividers (SimulationContext &ctx, const std::vector< std::string > &lines)
 Parse [DIVIDERS] — sets divider-specific fields.
 
void openswmm::input::handle_storage (SimulationContext &ctx, const std::vector< std::string > &lines)
 Parse [STORAGE] — adds storage nodes and their geometry.
 
void openswmm::input::handle_coordinates (SimulationContext &ctx, const std::vector< std::string > &lines)
 Parse [COORDINATES] — fills spatial.node_x / node_y.
 

Detailed Description

Section handlers for [JUNCTIONS], [OUTFALLS], [DIVIDERS], [STORAGE], [COORDINATES].

[JUNCTIONS] format (legacy SWMM 5.x)

;; Name Elev MaxDepth InitDepth SurDepth Aponded
J1 0.0 5.0 0.0 0.0 0.0

[OUTFALLS] format

;; Name Elev Type Stage/Tseries Gated RouteTo
Out1 0.0 FREE
Out2 0.0 FIXED 1.5
Out3 0.0 TIMESERIES TSERIES1
EXTERN TTable * Tseries
Definition globals.h:168
#define FREE(x)
Definition macros.h:22

[STORAGE] format

;; Name Elev MaxDepth InitDepth Shape Curve/A1 A2 A0 SurDepth Fevap Seep
Pond1 0.0 10.0 0.0 TABULAR POND_CURVE
Pond2 0.0 5.0 0.0 FUNCTIONAL 100 0 50
EXTERN TShape * Shape
Definition globals.h:171
EXTERN TTable * Curve
Definition globals.h:167
@ FUNCTIONAL
Area versus depth storage from function.
Definition enums.h:838
@ TABULAR
Area versus depth storage from table.
Definition enums.h:836
See also
Legacy reference: src/solver/input.c — readNode(), readOutfall(), readStorage()
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n MIT License