OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmm::twoD::ExplicitInertialSolver Class Referencefinal

#include <ExplicitInertialSolver.hpp>

Inheritance diagram for openswmm::twoD::ExplicitInertialSolver:
Collaboration diagram for openswmm::twoD::ExplicitInertialSolver:

Public Member Functions

void publishMomentumVelocity ()
 
void initialize (MeshData &mesh, SurfaceStateData &state, SolverOptions2D &opts) override
 Prepare the CPU finite-volume marcher from authoritative surface volume and resolved model.
 
double advance (double t_current, double t_target) override
 Advance one accepted CPU surface/groundwater window to its target horizon.
 
double completedSourceTime () const noexcept override
 Read the finest accepted source synchronization horizon.
 
void reinitialize (double t0) override
 Reconstruct externally edited volume after discarding stale surface momentum/side packets.
 
void resyncFromVolumes (double t0) override
 Reconstruct head/depth after authoritative external volume transfers without losing momentum.
 
void pinExternalSourceCells (const std::vector< int > &cells)
 External outfall transfers keep these cells and their halo on tier zero.
 
void setCommonSourceStage (CommonSourceStage &stage)
 Internal qualification adapter; owned externally and attached at time zero.
 
void setChannelGround (ChannelGroundState &)
 Attach a borrowed active channel/soil finite thermal owner before first advance.
 
void setSourceResultHistory (SourceResultHistory &history)
 Capture initial state and every finest accepted source interval, after all due groundwater firings/node sampling; externally owned recorder.
 
std::string saveCheckpoint (const std::string &path) const
 Internal accepted CPU source boundary or standalone water-only RK2 component checkpoint; not a whole-engine hotstart. Borrowed owners are guarded.
 
std::string loadCheckpoint (const std::string &path)
 Restore a component checkpoint into fresh initialized matching exclusive owners.
 
void resumeSourceResultHistory (SourceResultHistory &history)
 Bind a saved exact source-history prefix after a marcher restore.
 
std::string configureRk2Reactions (const SimulationContext &)
 Configure the standalone coupled RK2 surface reaction owner at time zero.
 
std::string configureRk2BoundarySignals (SimulationContext &, double stage_scale, double flow_scale)
 Resolve owned cursor-free surface boundary forcing for the fresh coupled RK2 owner.
 
void resolveRk2BoundarySignals (double time)
 Evaluate owned project boundary signals at the current coupled stage time/state.
 
double surfaceReactionLoss (int row) const noexcept
 Read one row's cumulative qualified RK2 native reaction loss.
 
void finalize () override
 Detach source/checkpoint recorders, settle CPU surface packets and release marching work lists.
 
void refreshBoundaries ()
 Refresh changed perimeter topology between completed advances.
 
long last_num_steps () const noexcept override
 Read base substeps executed by the most recent accepted advance.
 
double last_step_size () const noexcept override
 Read the most recent accepted base or tail duration.
 
RunStats run_stats () const noexcept override
 Snapshot cumulative CPU marcher work and rebuild-sampled active/tier statistics.
 
bool is_initialized () const noexcept override
 Read the marcher's stored lifecycle activation flag.
 
const std::vector< double > & last_coupling_exchange () const noexcept override
 Borrow the last advance's integrated live junction exchange.
 
double spillDeficit () const noexcept
 C3: cumulative spill volume (m³) the coupled nodes could not supply from their ponded storage. Should stay 0 on a well-posed deck; a growing value means the orifice is sized to move more water than the nodes hold above the rim.
 
void setExchangeHeadSlopes (std::vector< double > slopes)
 Experimental (OPENSWMM_2D_HEAD_RAMP): per-coupling-point 1D head trend slope (m/s, 2D frame) extrapolated across the batch — the exchange evaluates against h_1d + slope·τ instead of the held batch-start head. Empty = held heads (default).
 
void setSubsurface (SubsurfaceSolver *gw) noexcept
 Attach (or detach, with nullptr) the groundwater kernel. Must be called before the first advance and after initialize.
 
void refreshSubsurfaceRows ()
 Rebuild exact-name native surface-to-groundwater row mapping after owners are prepared.
 
const InertialEdges & inertialEdges () const noexcept
 The unique interior-edge topology this marcher built. Exposed so the groundwater kernel can put its lateral Darcy flux on the SAME faces rather than build a second, necessarily-consistent copy of the same graph. Valid only after initialize.
 
- Public Member Functions inherited from openswmm::twoD::ISurfaceSolver
virtual ~ISurfaceSolver ()=default
 Destroy a backend solver through its polymorphic interface.
 

Friends

struct ExplicitInertialSolverTestAccess
 
class SurfaceRouter2D
 
class openswmm::SWMMEngine
 

Member Function Documentation

◆ advance()

double openswmm::twoD::ExplicitInertialSolver::advance ( double t_current,
double t_target )
overridevirtual

Advance one accepted CPU surface/groundwater window to its target horizon.

Parameters
[in]t_currentFinite elapsed start s, consistent with current canonical owners; common-source and coupled-RK2 modes require exact equality with their accepted completed clocks.
[in]t_targetFinite target s at least t_current, caller scheduled at applicable forcing cuts.
Returns
t_target after success, or directly for ordinary uninitialized/nonforward calls. Coupled RK2/common-source qualification may reject those invalid clock/profile states before that no-op.
Exceptions
std::invalid_argumentInvalid completed-clock/common-stage input.
std::runtime_errorUnsupported coupled RK2 profile or delegated physics/source/recording failure.
Note
Invokes advanceImpl(): tiered finite-volume cycles/global equal tails, pending settlement, lazy-source landing, paired groundwater/node work and final edge publication. Coupled groundwater RK2 snapshots marcher/surface/ground and selected boundary receipts/forcing arrays, restoring them on exceptions; arbitrary external callback/recorder effects are not included in that snapshot. Other modes can retain partial progress after failure. Requires initialized matching stable owners, serial outer advancement and provisioned internal worker scratch; allocation exceptions propagate. Does not update canonical 1D router state or engine calendar by itself.

Implements openswmm::twoD::ISurfaceSolver.

◆ completedSourceTime()

double openswmm::twoD::ExplicitInertialSolver::completedSourceTime ( ) const
inlineoverridevirtualnoexcept

Read the finest accepted source synchronization horizon.

Returns
t_last_sync_ in elapsed s while initialized, otherwise -1. Does not flush pending lazy sources or advance a provider; stable owner access is required.

Reimplemented from openswmm::twoD::ISurfaceSolver.

◆ configureRk2BoundarySignals()

std::string openswmm::twoD::ExplicitInertialSolver::configureRk2BoundarySignals ( SimulationContext & ctx,
double stage_scale,
double flow_scale )

Resolve owned cursor-free surface boundary forcing for the fresh coupled RK2 owner.

Stage immutable project surface time-series/rating bindings for the initial coupled RK2 owner.

  • Argument stage_scale (in): Finite positive input-stage to SI m factor.
  • Argument flow_scale (in): Finite positive input flow to prepared boundary-flow units factor.
    Returns
    Empty on acceptance, otherwise diagnostic. Context reference is borrowed during resolution; time-series/rating payloads are copied. Definition details profile, staging and initial evaluation. No physical advance, table cursor mutation or automatic runtime override activation occurs.
    Parameters
    [in,out]ctxPrepared project tables/names/start calendar. Read during this call; owned signal/ rating copies are retained, while the outer heat/reaction owners have their separate borrow contracts.
    [in]stage_scaleFinite positive authored stage/curve-coordinate to SI m factor.
    [in]flow_scaleFinite positive authored flow-ordinate to the boundary's SI flow convention factor; stored per-edge flow is the downstream boundary law's unit discharge, not an extra edge sum.
    Returns
    Empty for success/no boundary owner, otherwise initial-profile, kind/name/index/table, finite conversion or initial interpolation diagnostic; caught std::exception text is returned.
    Note
    Requires initialized initial-time second-order FULL_SWE with groundwater. Accepts only single-column in-memory ordered supported tables, copies rating data and elapsed signal knots, resolves names, skips active runtime-overridden slots and evaluates each initial value privately. Publishes configured signals/calendar anchor and the staged boundary only after all validation. No shared table cursor or engine calendar advance; temporary allocation can fail. Requires exclusive boundary/marcher configuration and matching stable model identity for future RK2 evaluation.
Here is the call graph for this function:

◆ configureRk2Reactions()

std::string openswmm::twoD::ExplicitInertialSolver::configureRk2Reactions ( const SimulationContext & ctx)

Configure the standalone coupled RK2 surface reaction owner at time zero.

Bind qualified surface pollutant decay and compiled BULK PIPE laws at initial coupled time.

Configure initial qualified surface decay and compiled PIPE reaction ownership.

Returns
Empty on success, otherwise profile/layout/dependency diagnostic. Context reference supplies matching prepared identities; active compiled ReactionData remains borrowed and must stay stable/alive. No reaction is executed. Allocation may follow partial binding; definition details supported variables, row units, staged validation and counter initialization. Exclusive initial-time setup required.
Parameters
[in]ctxPrepared native pollutant/MSX layout, finite nonnegative decay 1/s and compiled reaction token/term/species tables. ReactionData is borrowed on kinetics success and must outlive solver uses without identity mutation.
Returns
Empty on success, otherwise fresh-owner, decay-layout/value, uncompiled/unavailable BULK species or unsupported hydrologic expression dependency diagnostic.
Note
Allows only enabled BULK/pollutant dependencies and DT/TEMP variables. Stages validation then installs copied decay/row mapping and borrowed reaction system, serialized identity, workspace and zeroed signed native loss/report counters. No reaction/water/heat advance. Allocation/serialization can throw after some binding fields install; configure serially before any advance.
Here is the call graph for this function:

◆ finalize()

void openswmm::twoD::ExplicitInertialSolver::finalize ( )
overridevirtual

Detach source/checkpoint recorders, settle CPU surface packets and release marching work lists.

Note
Clears borrowed common/history/stream pointers and checkpoint flags, settles/flushes remaining surface worker books when initialized, optionally overwrites telemetry CSV and clears major momentum/ side/active/tier/boundary vectors plus active-fraction telemetry. File-open failure is silently ignored. Marks uninitialized; does not destroy external canonical mesh/state/groundwater/physical owners, advance leftover source time or write their final result balances. Some scratch/bindings/counters remain until replacement/destruction; run_stats() should be sampled before finalize. Requires exclusive stable owners through settlement; unexpected delegated errors can leave partial cleanup.

Implements openswmm::twoD::ISurfaceSolver.

Here is the call graph for this function:

◆ inertialEdges()

const InertialEdges & openswmm::twoD::ExplicitInertialSolver::inertialEdges ( ) const
inlinenoexcept

The unique interior-edge topology this marcher built. Exposed so the groundwater kernel can put its lateral Darcy flux on the SAME faces rather than build a second, necessarily-consistent copy of the same graph. Valid only after initialize.

Returns
Solver-owned const unique interior-edge geometry/CSR, valid after initialize. Shares exact topology with groundwater; initialization/restore/replacement invalidates views. No copy, rebuild, ownership transfer or physical mutation occurs. Requires stable owner access.

◆ initialize()

void openswmm::twoD::ExplicitInertialSolver::initialize ( MeshData & mesh,
SurfaceStateData & state,
SolverOptions2D & opts )
overridevirtual

Prepare the CPU finite-volume marcher from authoritative surface volume and resolved model.

Parameters
[in,out]meshPrepared SI triangle/quad mesh, complete topology/stencils/material/initial- velocity arrays. Borrowed for the marcher lifetime; geometry identity remains stable while running.
[in,out]stateMatching canonical water/native/thermal owner, with live optional boundary, node/coupling and groundwater bindings. Borrowed; seeded volume is authoritative and head/depth are reconstructed. Allocates species boundary composition and ensures boundary receipt rows.
[in,out]optsResolved controls, borrowed. FULL_SWE reduces CFL>0.5 and order-two LTS tiers>1 with stderr advisories; unsupported standalone second-order overland transport uses first order.
Exceptions
std::runtime_errorAuthored boundary quality targets a WALL/nonboundary edge or invalid row.
std::invalid_argumentSurface/groundwater native row names are incomplete.
Note
Resets source/channel/recorder/reaction/RK2-boundary bindings, builds unique edges, side water/ native/momentum buffers, padded worker ledgers, active/tier/pin and boundary lists, seeds momentum from initial SI velocity, resets clocks/counters/telemetry, then marks initialized. Empty mesh returns without activation after some binding resets. Requires consistent positive geometry/count products, finite controls and exclusive owner access. Allocation or delegated failure leaves partial state; not an atomic reset and no whole-engine initialization/time advance.

Implements openswmm::twoD::ISurfaceSolver.

Here is the call graph for this function:

◆ is_initialized()

bool openswmm::twoD::ExplicitInertialSolver::is_initialized ( ) const
inlineoverridevirtualnoexcept

Read the marcher's stored lifecycle activation flag.

Returns
True after initialization and before finalize. Does not validate borrowed geometry/context, current checkpoint phase or external source lifetime. Allocation-free and read-only.

Implements openswmm::twoD::ISurfaceSolver.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ last_coupling_exchange()

const std::vector< double > & openswmm::twoD::ExplicitInertialSolver::last_coupling_exchange ( ) const
inlineoverridevirtualnoexcept

Borrow the last advance's integrated live junction exchange.

Returns
Solver-owned m3 per non-outfall coupling point, positive surface-to-node. Reset/updated by advances; initialization/restore/replacement invalidates views. Does not consume receipts or deliver canonical 1D water/native mass; stable serialized owner access is required.

Reimplemented from openswmm::twoD::ISurfaceSolver.

◆ last_num_steps()

long openswmm::twoD::ExplicitInertialSolver::last_num_steps ( ) const
inlineoverridevirtualnoexcept

Read base substeps executed by the most recent accepted advance.

Returns
Stored last_steps_, zero after initialization; not cumulative firings across all tiers. No synchronization, reset or solver work occurs; caller reads stable owner telemetry.

Implements openswmm::twoD::ISurfaceSolver.

◆ last_step_size()

double openswmm::twoD::ExplicitInertialSolver::last_step_size ( ) const
inlineoverridevirtualnoexcept

Read the most recent accepted base or tail duration.

Returns
Stored last_dt_ s, initially zero. Does not recompute stability or imply every tier fired at that duration; no mutation/synchronization occurs.

Implements openswmm::twoD::ISurfaceSolver.

◆ loadCheckpoint()

std::string openswmm::twoD::ExplicitInertialSolver::loadCheckpoint ( const std::string & path)

Restore a component checkpoint into fresh initialized matching exclusive owners.

Read and restore a qualified component checkpoint into fresh prepared matching owners.

  • Argument path (in): Readable bounded checkpoint path.
    Returns
    Empty on success, otherwise freshness/model/decode/file diagnostic.
    Note
    Uses private candidates and preserves borrowed owner identities. Full restore scope, validation and callback side effects are documented on the byte overload; no full-engine restore.
    Parameters
    [in]pathReadable checkpoint file path within the internal size bound.
    Returns
    Empty on success; joint-router ownership refusal, read/decode/qualification or caught standard exception diagnostic otherwise.
    Note
    Delegates to loadCheckpointBytes; no live history recorder, evolved numerical owner or mismatched model is admitted. Component restore preserves borrowed owner identities and does not restore arbitrary whole-engine/output state. Requires exclusive matching owners.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pinExternalSourceCells()

void openswmm::twoD::ExplicitInertialSolver::pinExternalSourceCells ( const std::vector< int > & cells)

External outfall transfers keep these cells and their halo on tier zero.

Parameters
[in]cellsValid prepared zero-based surface cells; duplicates are harmless.
Exceptions
std::out_of_rangeInvalid cell through pin_t0_.at(); earlier valid pins remain set.
Note
Marks each cell pinned then forces next-entry tier/active rebuild. Halo activation occurs during that rebuild, not here. Does not book water, clear pins, reconstruct state or advance clocks; caller serializes configuration with all firings.
Here is the caller graph for this function:

◆ publishMomentumVelocity()

void openswmm::twoD::ExplicitInertialSolver::publishMomentumVelocity ( )

Publish FULL_SWE velocity from accepted conserved momentum, using the internal negative-outflow display convention. No flux change.

◆ refreshBoundaries()

void openswmm::twoD::ExplicitInertialSolver::refreshBoundaries ( )

Refresh changed perimeter topology between completed advances.

Note
Inactive/missing-boundary returns. Settles pending surface packets, rebuilds non-WALL and SWE wall lists, zeros new boundary window integrals, preserves prognostic q for surviving slots, rebuilds prescribed/runtime native tuples, ensures receipt entries, resolves qualified RK2 boundary signals at completed time and schedules an active/tier rebuild. Wall output flux is zeroed; previous cell pins are retained rather than cleared. Requires valid species/slot indices and runtime tuple shapes. Allocates/mutates progressively and can throw after partial reconfiguration; call exclusively between completed advances, not during a face/cell/source phase.
Here is the call graph for this function:

◆ refreshSubsurfaceRows()

void openswmm::twoD::ExplicitInertialSolver::refreshSubsurfaceRows ( )

Rebuild exact-name native surface-to-groundwater row mapping after owners are prepared.

Exceptions
std::invalid_argumentActive surface/groundwater layout lacks exactly one name per row.
Note
Replaces gw_row_map_ with -1 then matches exact names; duplicate groundwater names select its last matching index. Inactive/no groundwater leaves unmapped rows. Does not move inventory, convert concentrations or validate unit equivalence; initialization supplies compatible native units. Allocates and may fail after replacement; requires live stable owners and exclusive mapping access.
Here is the caller graph for this function:

◆ reinitialize()

void openswmm::twoD::ExplicitInertialSolver::reinitialize ( double t0)
overridevirtual

Reconstruct externally edited volume after discarding stale surface momentum/side packets.

Parameters
[in]t0Retained interface time, ignored by this implementation.
Exceptions
std::runtime_errorA common source stage is attached; generic rollback/edit is unqualified.
Note
Otherwise inactive returns. Zeros face/boundary and side water/SWE momentum packets, zeroes prognostic SWE cell momentum, clears the pending flag and reconstructs head/depth. Does not clear native side packets/producer ledgers, reset source clocks or force a tier rebuild itself; caller coordinates the qualified external edit/restart protocol. Requires exclusive matching prepared state.

Implements openswmm::twoD::ISurfaceSolver.

◆ resolveRk2BoundarySignals()

void openswmm::twoD::ExplicitInertialSolver::resolveRk2BoundarySignals ( double time)

Evaluate owned project boundary signals at the current coupled stage time/state.

Parameters
[in]timeFinite elapsed time s for immutable signal interpolation; rating curves instead query current canonical volume-derived SI head divided by their authored coordinate scale.
Exceptions
std::runtime_errorChanged table identity or nonfinite converted query/value. Guarded slot/volume indexing can throw std::out_of_range.
Note
Skips slots held by runtime_original overrides; writes only boundary head/flow arrays. No signal cursor/calendar, boundary receipt or canonical water change. Evaluation is sequential: later failure can follow earlier slot updates. Requires configured live boundary/mesh/state and exclusive stage access; enclosing RK2 transaction saves/restores relevant arrays on failure.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ resumeSourceResultHistory()

void openswmm::twoD::ExplicitInertialSolver::resumeSourceResultHistory ( SourceResultHistory & history)

Bind a saved exact source-history prefix after a marcher restore.

Parameters
[in,out]historyBorrowed saved recorder prefix, whose exact accepted checkpoint state must match the restored common source stage. Must outlive subsequent capture/refresh use.
Exceptions
std::invalid_argumentInvalid checkpoint boundary, another attached recorder or history resume mismatch. Append/identity allocation errors can also propagate.
Note
Stores pointer only after successful resume. Does not replay physical source intervals, replace canonical solver state or load a file. Call exclusively after qualified marcher restore.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ resyncFromVolumes()

void openswmm::twoD::ExplicitInertialSolver::resyncFromVolumes ( double t0)
overridevirtual

Reconstruct head/depth after authoritative external volume transfers without losing momentum.

Parameters
[in]t0Retained interface time, ignored.
Exceptions
std::runtime_errorA common source stage is attached, because arbitrary external edits are not qualified with its receipt clocks.
Note
Inactive returns. Preserves face/cell momentum and pending side packets, reconstructs current volume, then forces next-entry active/tier rebuild so newly wet cells participate. Does not settle receipts, reset clocks or validate transfer mass balance; caller owns paired canonical edits.

Reimplemented from openswmm::twoD::ISurfaceSolver.

◆ run_stats()

ISurfaceSolver::RunStats openswmm::twoD::ExplicitInertialSolver::run_stats ( ) const
overridevirtualnoexcept

Snapshot cumulative CPU marcher work and rebuild-sampled active/tier statistics.

Returns
Value containing total base substeps, cumulative face work, last duration s, sample-weighted active min/max/mean and accumulated tier occupancy. Not elapsed-time-weighted wet area or a new stability solve. Read before finalize resets active samples/tier lists; no allocation or mutation. Requires stable serialized access to host counters.

Reimplemented from openswmm::twoD::ISurfaceSolver.

◆ saveCheckpoint()

std::string openswmm::twoD::ExplicitInertialSolver::saveCheckpoint ( const std::string & path) const

Internal accepted CPU source boundary or standalone water-only RK2 component checkpoint; not a whole-engine hotstart. Borrowed owners are guarded.

Publish a qualified component checkpoint through the temporary-file publisher.

  • Argument path (in): Writable component checkpoint destination; exclusive writer required.
    Returns
    Empty on success, otherwise qualification/serialization/publication diagnostic.
    Note
    Requires an accepted qualified component boundary. Live joint coupling uses the router checkpoint. No physics/calendar advance; definition details publication and temporary-file failure.
    Parameters
    [in]pathDestination filesystem path, with a writable existing parent and exclusive writer.
    Returns
    Empty on success; joint-router ownership refusal, serialization or caught standard file exception text otherwise. A failed publication may leave a temporary file; see publish().
    Note
    Does not settle or advance the marcher. Captures the selected qualified first-order or RK2 component boundary, not a complete engine/output hotstart. No source/model ownership transfers.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setChannelGround()

void openswmm::twoD::ExplicitInertialSolver::setChannelGround ( ChannelGroundState & stage)

Attach a borrowed active channel/soil finite thermal owner before first advance.

Borrow a prepared active shared channel/physical-ground owner at the initial CPU source clock.

Note
The stage reference and its external canonical dependencies must remain alive/stable. Rejects uninitialized/nonzero-time/common-source modes, ignores inactive stage, allocates shared source scratch and pins owned cells. Definition documents partial attachment on allocation/index failure.
Parameters
[in,out]stageExternal finite channel/ground mapping and canonical borrowed owners, stable and alive through all marcher use. Inactive stage is ignored without attachment.
Exceptions
std::invalid_argumentMarcher is uninitialized, accepted source time is nonzero or a common source stage is attached.
Note
Stores pointer, sizes per-cell source/mixed-temperature scratch and pins the contact cells. Allocation or invalid cell can throw after pointer/scratch changes; no whole-call rollback. Does not initialize contacts, perform heat exchange or advance hydraulic/thermal clocks.
Here is the call graph for this function:

◆ setCommonSourceStage()

void openswmm::twoD::ExplicitInertialSolver::setCommonSourceStage ( CommonSourceStage & stage)

Internal qualification adapter; owned externally and attached at time zero.

Parameters
[in,out]stageBorrowed prepared stage matching this exact mesh/state/groundwater identity. Must outlive marcher use, begin at completed time zero and satisfy qualified heat ownership.
Exceptions
std::invalid_argumentExisting attachment, uninitialized/noninitial/second-order state, mismatched owner identity or unsupported catchment/LID heat profile.
Note
Stores pointer and pins managed cells; pin allocation/index failure can follow attachment. Does not activate authored ownership or initialize/advance the external stage. Exclusive setup only.
Here is the call graph for this function:

◆ setExchangeHeadSlopes()

void openswmm::twoD::ExplicitInertialSolver::setExchangeHeadSlopes ( std::vector< double > slopes)
inline

Experimental (OPENSWMM_2D_HEAD_RAMP): per-coupling-point 1D head trend slope (m/s, 2D frame) extrapolated across the batch — the exchange evaluates against h_1d + slope·τ instead of the held batch-start head. Empty = held heads (default).

Parameters
[in]slopesOwned per-coupling-point SI head trends m/s, moved into the solver. Empty selects held heads; caller supplies correct point order/extent and finite values, not validated here.
Note
Experimental head extrapolation uses slope*within-window time, without mutating canonical 1D heads. Requires exclusive configuration between completed windows; does not rebuild topology or activate the experiment by itself.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSourceResultHistory()

void openswmm::twoD::ExplicitInertialSolver::setSourceResultHistory ( SourceResultHistory & history)

Capture initial state and every finest accepted source interval, after all due groundwater firings/node sampling; externally owned recorder.

Borrow and seed an empty source-history recorder at the initial common-stage boundary.

Parameters
[in,out]historyExternal empty recorder, kept alive/stable through subsequent captures. Initial append may allocate and mutates history on success; ownership remains with caller.
Exceptions
std::invalid_argumentNo common stage, any recorder already attached, noninitial time, nonempty tables or recorder append refusal.
Note
Attaches pointer only after successful initial append. Does not capture another interval, advance physical owners, write files or implicitly enable result output. Exclusive setup required.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSubsurface()

void openswmm::twoD::ExplicitInertialSolver::setSubsurface ( SubsurfaceSolver * gw)
inlinenoexcept

Attach (or detach, with nullptr) the groundwater kernel. Must be called before the first advance and after initialize.

Parameters
[in]gwOptional borrowed prepared groundwater owner, null detaches. Must outlive all marcher firings/checkpoints, with matching cell/edge/row identity; callable after initialize and before first advance. Stores pointer only; does not initialize, settle or refresh row mapping.
Note
Requires exclusive completed owner boundary. Replacing a running owner with pending receipts is unsupported without the enclosing coordinated transaction.

◆ spillDeficit()

double openswmm::twoD::ExplicitInertialSolver::spillDeficit ( ) const
inlinenoexcept

C3: cumulative spill volume (m³) the coupled nodes could not supply from their ponded storage. Should stay 0 on a well-posed deck; a growing value means the orifice is sized to move more water than the nodes hold above the rim.

Returns
Cumulative requested node spill m3 unavailable from ponded native storage. Read only; zero does not by itself prove every water/quality balance. Does not reserve, refund or deliver water.

◆ surfaceReactionLoss()

double openswmm::twoD::ExplicitInertialSolver::surfaceReactionLoss ( int row) const
inlinenoexcept

Read one row's cumulative qualified RK2 native reaction loss.

Parameters
[in]rowZero-based native transport row; invalid returns zero.
Returns
Signed native concentration*m3 loss, including negative production where configured. No reaction solve, reporting-ledger drain, allocation or mutation occurs.

Friends And Related Symbol Documentation

◆ ExplicitInertialSolverTestAccess

friend struct ExplicitInertialSolverTestAccess
friend

◆ openswmm::SWMMEngine

friend class openswmm::SWMMEngine
friend

◆ SurfaceRouter2D

friend class SurfaceRouter2D
friend

The documentation for this class was generated from the following files: