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

Post-parse cross-reference resolution. More...

#include "PostParseResolver.hpp"
#include <array>
#include "MultiColumnSeriesFile.hpp"
#include "../core/Constants.hpp"
#include "../core/ErrorCodes.hpp"
#include "../core/PathResolver.hpp"
#include "../core/PerfTimers.hpp"
#include "../core/SimulationContext.hpp"
#include "../core/DateTime.hpp"
#include "../core/UnitConversion.hpp"
#include "../hydraulics/xsect_tables.hpp"
#include "../hydraulics/XSectBatch.hpp"
#include "../hydraulics/Link.hpp"
#include "../hydraulics/Street.hpp"
#include "../hydraulics/ForceMain.hpp"
#include "../edit/VirtualJunctionOps.hpp"
#include "../transport/MsxInitialQuality.hpp"
#include "Tokenizer.hpp"
#include "InputParseUtils.hpp"
#include <fstream>
#include <system_error>
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <filesystem>
#include <map>
#include <string>
#include <unordered_map>
#include <utility>
Include dependency graph for PostParseResolver.cpp:

Namespaces

namespace  openswmm
 
namespace  openswmm::input
 

Enumerations

enum  openswmm::input::WarnCode
 

Functions

void openswmm::input::resolve_external_file_slots (SimulationContext &ctx, const std::string &anchor_dir)
 Slice IO-3: Resolve every external-file slot's .original token against an anchor directory and populate .absolute.
 
void openswmm::input::load_external_rain_files (SimulationContext &ctx)
 (Re)load every FILE-source rain gage's data from disk.
 
void openswmm::input::recompute_conduit_flow_properties (SimulationContext &ctx, int j)
 Recompute a single conduit's derived dynamic-wave flow properties.
 
void openswmm::input::convert_internal_to_display (SimulationContext &ctx)
 Convert the input fields the reader scaled to internal units back to display units (matching ctx.options.flow_units).
 
bool openswmm::input::needs_authored_conversion (const SimulationContext &ctx)
 True when the context holds parse-time normalisations that the .inp writer must undo: LINK_OFFSETS=ELEVATION (offsets stored as depths) or any conduit reversed for adverse slope (direction == -1).
 
int openswmm::input::restore_authored_orientation (SimulationContext &ctx)
 Undo the parse-time adverse-slope reversal on every conduit with direction == -1 (node1/node2, offset1/offset2, q0 sign, inlet/outlet losses, slope sign) and reset direction to +1.
 
void openswmm::input::convert_internal_to_authored (SimulationContext &ctx)
 Restore authored link data for writing: un-reverse adverse-slope conduits (node1/node2, offset1/offset2, q0 sign, inlet/outlet losses) and, in ELEVATION offset mode, re-add each node's invert to the depth-normalised offsets and weir/outlet crests.
 
void openswmm::input::resolve_cross_references (SimulationContext &ctx)
 Resolve all cross-references in ctx after all sections are parsed.
 
std::string openswmm::input::format_error (int code, std::string_view name="")
 Format an error message with object name substitution.
 
std::string openswmm::input::format_warning (int code, std::string_view name="")
 Format a warning message with object name substitution.
 

Detailed Description

Post-parse cross-reference resolution.

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