![]() |
OpenSWMM Engine
6.0.0-alpha.3
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.3)
|
Comprehensive .inp serialisation — round-trip identical output. More...
#include "InpWriter.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/BoundaryData.hpp"#include "../2d/data/PendingRows2D.hpp"#include "../2d/data/Serialize2D.hpp"#include <cmath>#include <cstdio>#include <cstring>#include <filesystem>#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. | |
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, JUNCTIONS, OUTFALLS, DIVIDERS, STORAGE, CONDUITS, PUMPS, ORIFICES, WEIRS, OUTLETS, XSECTIONS, LOSSES, TRANSECTS, STREETS, INLETS, CONTROLS, REPORT, POLLUTANTS, LANDUSES, BUILDUP, WASHOFF, TREATMENT, INFLOWS, DWF, RDII, PATTERNS, TIMESERIES, CURVES, MAP, COORDINATES, VERTICES, Polygons, SYMBOLS, USER_FLAGS, USER_FLAG_VALUES, PLUGINS, 2D_OPTIONS, 2D_MESH_FILE (external mode) or 2D_VERTICES, 2D_TRIANGLES, 2D_VERTEX_NODE_MAP, 2D_TRIANGLE_NODE_MAP, 2D_BOUNDARY_CONDITIONS, 2D_EDGE_CONVEYANCE (inline mode)