![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
Comprehensive .inp serialisation — round-trip identical output. More...
#include "InpWriter.hpp"#include "Constants.hpp"#include "PathResolver.hpp"#include "SimulationContext.hpp"#include "../data/StorageGeometry.hpp"#include "DateTime.hpp"#include "UnitConversion.hpp"#include "../input/PostParseResolver.hpp"#include "../2d/data/MeshData.hpp"#include "../2d/data/SolverOptions2D.hpp"#include "../2d/data/Report2DVars.hpp"#include "../2d/gw/GwTransportData.hpp"#include "../2d/subsurface/SubsurfaceSections.hpp"#include "../2d/data/BoundaryData.hpp"#include "../2d/data/PendingRows2D.hpp"#include "../2d/data/Serialize2D.hpp"#include <cmath>#include <cstdio>#include <cstring>#include <filesystem>#include <fstream>#include <iterator>#include "../plugins/ProcessComponentRegistry.hpp"#include "../edit/VirtualJunctionOps.hpp"#include <string>#include <unordered_map>#include <vector>Namespaces | |
| namespace | openswmm |
| namespace | openswmm::inp_writer |
Functions | |
| int | openswmm::inp_writer::writeInpFile (const SimulationContext &ctx, const std::string &path, std::vector< std::string > *warnings=nullptr) |
| Write the full model to a SWMM .inp file. | |
| int | openswmm::inp_writer::writeInpFile (const SimulationContext &ctx_internal, const std::string &path, std::vector< std::string > *warnings, const InpWriteOptions &opts) |
Comprehensive .inp serialisation — round-trip identical output.
Writes every SWMM input section with exact column layouts matching the legacy format so that read -> write -> read produces identical model state. Shape names, enum strings, and field widths are taken directly from legacy text.h and keywords.c.
All standard SWMM sections implemented: TITLE, OPTIONS, EVAPORATION, TEMPERATURE, SNOWPACKS, ADJUSTMENTS, EVENTS, RAINGAGES, SUBCATCHMENTS, SUBAREAS, INFILTRATION, AQUIFERS, GROUNDWATER, GWF, JUNCTIONS, OUTFALLS, DIVIDERS, STORAGE, CONDUITS, PUMPS, ORIFICES, WEIRS, OUTLETS, XSECTIONS, LOSSES, TRANSECTS, STREETS, INLETS, INLET_USAGE, CONTROLS, REPORT, POLLUTANTS, LANDUSES, COVERAGES, BUILDUP, WASHOFF, LOADINGS, TREATMENT, INFLOWS, DWF, RDII, PATTERNS, TIMESERIES, CURVES, MAP, COORDINATES, VERTICES, Polygons, SYMBOLS, USER_FLAGS, USER_FLAG_VALUES, PLUGINS, 2D_OPTIONS, 2D_INFILTRATION_OPTIONS, 2D_INFILTRATION_DEFAULTS, 2D_INFILTRATION, 2D_MESH_FILE (external mode) or 2D_VERTICES, 2D_TRIANGLES, 2D_QUADS, 2D_VERTEX_NODE_MAP, 2D_TRIANGLE_NODE_MAP, 2D_BOUNDARY_CONDITIONS, 2D_EDGE_CONVEYANCE (inline mode), 2D_INITIAL_QUALITY, 2D_BOUNDARY_QUALITY