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

Post-parse cross-reference resolution for the input system. More...

#include <string>
Include dependency graph for PostParseResolver.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  openswmm
 
namespace  openswmm::input
 

Functions

void openswmm::input::resolve_cross_references (SimulationContext &ctx)
 Resolve all cross-references in ctx after all sections are parsed.
 
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).
 
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::recompute_conduit_flow_properties (SimulationContext &ctx, int j)
 Recompute a single conduit's derived dynamic-wave flow properties.
 

Detailed Description

Post-parse cross-reference resolution for the input system.

After all sections are parsed, some object references that appear forward (e.g., a subcatchment referencing a gage that appears later in the file) need to be resolved. This module performs a single sweep to fix up all -1 indices.

Resolutions performed:

  • subcatch.gage[i] — re-look up by gage name
  • subcatch.outlet_node — re-look up outlet by name
  • gages.ts_index — re-look up time series by name
  • nodes.outfall_param for TIDAL/TIMESERIES outfalls — resolve curve index
  • links.pump_curve — resolve pump curve by name
See also
InputReader.hpp — calls resolve() after all sections are dispatched
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n MIT License