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

Implementation of 2D input section parsers. More...

#include "SectionHandlers2D.hpp"
#include "core/FileIO.hpp"
#include "../data/BoundaryData.hpp"
#include "../data/Report2DVars.hpp"
#include "../../input/InputParseUtils.hpp"
#include "../../input/InputReader.hpp"
#include "../../input/Tokenizer.hpp"
#include "../../core/ErrorCodes.hpp"
#include "../../core/NodeCoupling2D.hpp"
#include "../../core/SimulationContext.hpp"
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <filesystem>
#include <fstream>
#include <sstream>
#include <string_view>
Include dependency graph for SectionHandlers2D.cpp:

Namespaces

namespace  openswmm
 
namespace  openswmm::twoD
 

Functions

std::string openswmm::twoD::parse2DOptionsLine (const std::vector< std::string > &tokens, SolverOptions2D &opts, std::vector< std::string > *warnings=nullptr)
 Parse a single line from the [2D_OPTIONS] section.
 
bool openswmm::twoD::is2DRetiredOptionKey (const std::string &key)
 True when key (case-insensitive) is a [2D_OPTIONS] parameter retired with the CVODE/ARKODE stack (D2, 2026-07-29).
 
bool openswmm::twoD::is2DOptionKey (const std::string &key)
 True when key (case-insensitive) is a [2D_OPTIONS] parameter accepted by parse2DOptionsLine.
 
std::span< const char *const > openswmm::twoD::current2DOptionKeys ()
 Every current [2D_OPTIONS] key accepted by is2DOptionKey, in documentation order.
 
const std::vector< std::string > & openswmm::twoD::report2DVarTokens ()
 Borrow canonical report-group keyword tokens in defined bit order.
 
std::string openswmm::twoD::parseReport2DVars (const std::string &text, unsigned &mask)
 Parse report-group keyword list/preset through the shared mask grammar.
 
std::string openswmm::twoD::formatReport2DVars (unsigned mask)
 Format a report bitmask using canonical presets or ordered keyword list.
 
std::string openswmm::twoD::format2DOptionValue (const SolverOptions2D &opts, const std::string &key)
 Format a stored 2D option as a canonical authoring/display token.
 
std::string openswmm::twoD::format2DOptionValueEx (const SolverOptions2D &opts, const Infil2D *infil, const std::string &key)
 Format stored 2D policy with optional infiltration/aquifer authoring fallback.
 
std::string openswmm::twoD::format2DOptionValueEx (const SolverOptions2D &opts, const Infil2D *infil, const SubsurfaceConfig *aquifer, const std::string &key)
 Format stored 2D policy with optional infiltration/aquifer authoring fallback.
 
std::string openswmm::twoD::parse2DVertexLine (const std::vector< std::string > &tokens, MeshData &mesh)
 Parse a single line from the [2D_VERTICES] section.
 
std::string openswmm::twoD::parse2DTriangleLine (const std::vector< std::string > &tokens, MeshData &mesh)
 Parse a single line from the [2D_TRIANGLES] section.
 
std::string openswmm::twoD::parse2DQuadLine (const std::vector< std::string > &tokens, MeshData &mesh)
 Parse a single line from the [2D_QUADS] section.
 
std::string openswmm::twoD::parse2DInitialVelocityLine (const std::vector< std::string > &tokens, MeshData &mesh)
 Parse a single line from the [2D_INITIAL_VELOCITY] section.
 
std::string openswmm::twoD::parse2DVertexNodeMapLine (const std::vector< std::string > &tokens, MeshData &mesh)
 Parse a single line from the [2D_VERTEX_NODE_MAP] section.
 
std::string openswmm::twoD::parse2DTriangleNodeMapLine (const std::vector< std::string > &tokens, MeshData &mesh)
 Parse a single line from the [2D_TRIANGLE_NODE_MAP] section.
 
std::string openswmm::twoD::parse2DBoundaryConditionsLine (const std::vector< std::string > &tokens, std::vector< SurfaceRouter2D::PendingBoundaryRow > &pending_rows)
 V-E3 — parse a single line from the [2D_BOUNDARY_CONDITIONS] section into a SurfaceRouter2D::PendingBoundaryRow appended to pending_rows.
 
std::string openswmm::twoD::parse2DEdgeConveyanceLine (const std::vector< std::string > &tokens, std::vector< SurfaceRouter2D::PendingEdgeConveyanceRow > &pending_rows)
 §11A — parse a single [2D_EDGE_CONVEYANCE] line.
 
std::string openswmm::twoD::parse2DInfiltrationOptionsLine (const std::vector< std::string > &tokens, Infil2D &infil)
 §5.5 track I — parse a single [2D_INFILTRATION_OPTIONS] line.
 
std::string openswmm::twoD::parse2DInfiltrationDefaultsLine (const std::vector< std::string > &tokens, Infil2D &infil)
 §5.5 track I — parse a single [2D_INFILTRATION_DEFAULTS] line.
 
std::string openswmm::twoD::parse2DInfiltrationLine (const std::vector< std::string > &tokens, Infil2D &infil)
 §5.5 track I — parse a single [2D_INFILTRATION] line.
 
std::string openswmm::twoD::parse2DInitialQualityLine (const std::vector< std::string > &tokens, std::vector< SurfaceRouter2D::PendingInitialQualityRow > &rows)
 Parse one scoped initial surface native concentration authoring row.
 
std::string openswmm::twoD::parse2DInitialBedQualityLine (const std::vector< std::string > &tokens, std::vector< SurfaceRouter2D::PendingInitialBedQualityRow > &rows)
 Parse a finite local-bed native concentration seed without resolving a physical bed.
 
std::string openswmm::twoD::parse2DBoundaryQualityLine (const std::vector< std::string > &tokens, std::vector< SurfaceRouter2D::PendingBoundaryQualityRow > &rows)
 Parse one zero-based surface boundary native concentration row.
 
void openswmm::twoD::register2DSections (MeshData &mesh, SolverOptions2D &options, std::vector< SurfaceRouter2D::PendingBoundaryRow > &pending_bc_rows, std::vector< SurfaceRouter2D::PendingEdgeConveyanceRow > &pending_ec_rows, std::vector< SurfaceRouter2D::PendingInitialQualityRow > &pending_iq_rows, std::vector< SurfaceRouter2D::PendingInitialBedQualityRow > &pending_ibq_rows, std::vector< SurfaceRouter2D::PendingBoundaryQualityRow > &pending_bq_rows, input::SectionRegistry &registry)
 Register mesh/options/native-quality/boundary/infiltration authoring section handlers.
 
std::string openswmm::twoD::load2DMeshExternalFile (MeshData &mesh, SolverOptions2D &opts, std::vector< SurfaceRouter2D::PendingBoundaryRow > &pending_bc_rows, std::vector< SurfaceRouter2D::PendingEdgeConveyanceRow > &pending_ec_rows, Infil2D *infil, const std::string &mesh_file, const std::string &inp_base_dir, std::vector< std::string > *warnings, std::vector< SurfaceRouter2D::PendingInitialQualityRow > *pending_iq_rows, std::vector< SurfaceRouter2D::PendingInitialBedQualityRow > *pending_ibq_rows, std::vector< SurfaceRouter2D::PendingBoundaryQualityRow > *pending_bq_rows)
 Read a mesh sidecar through a local registry into caller-supplied authoring targets.
 
void openswmm::twoD::prescan2DUnitsHeader (const std::string &inp_path, SolverOptions2D &opts)
 Scan an entire UTF-8 input/mesh file for a recognized SI mesh-units comment marker.
 

Detailed Description

Implementation of 2D input section parsers.

See also
SectionHandlers2D.hpp
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License
Apache-2.0