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 initialize (MeshData &mesh, SurfaceStateData &state, SolverOptions2D &opts) override
 One-time setup. mesh and state must outlive the solver.
 
double advance (double t_current, double t_target) override
 
void reinitialize (double t0) override
 Reinitialize the integrator at t0 after external state edits.
 
void resyncFromVolumes (double t0) override
 
void finalize () override
 Release all backend resources.
 
long last_num_steps () const noexcept override
 Number of internal integrator steps in the last advance() call.
 
double last_step_size () const noexcept override
 Last internal step size used by the integrator.
 
RunStats run_stats () const noexcept override
 Read cumulative statistics. Default: zeros (backend has no counters).
 
bool is_initialized () const noexcept override
 True once initialize() has completed and the solver is ready.
 
const std::vector< double > & last_coupling_exchange () const noexcept override
 
double spillDeficit () const noexcept
 
void setExchangeHeadSlopes (std::vector< double > slopes)
 
void setSubsurface (SubsurfaceSolver *gw) noexcept
 
const InertialEdgesinertialEdges () const noexcept
 
- Public Member Functions inherited from openswmm::twoD::ISurfaceSolver
virtual ~ISurfaceSolver ()=default
 

Member Function Documentation

◆ advance()

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

Advance the solution from t_current to t_target (s).

Returns
the time actually reached (== t_target on success).

Implements openswmm::twoD::ISurfaceSolver.

Here is the call graph for this function:

◆ finalize()

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

Release all backend resources.

Implements openswmm::twoD::ISurfaceSolver.

◆ 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.

◆ initialize()

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

One-time setup. mesh and state must outlive the solver.

Implements openswmm::twoD::ISurfaceSolver.

Here is the call graph for this function:

◆ is_initialized()

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

True once initialize() has completed and the solver is ready.

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

Per-point ∫Q dt (m³) from the live node-coupling macro-step path. Default returns empty for backends that do not implement live coupling (so the caller falls back to the held-flux booking). See ExplicitInertialSolver.

Reimplemented from openswmm::twoD::ISurfaceSolver.

◆ last_num_steps()

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

Number of internal integrator steps in the last advance() call.

Implements openswmm::twoD::ISurfaceSolver.

◆ last_step_size()

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

Last internal step size used by the integrator.

Implements openswmm::twoD::ISurfaceSolver.

◆ reinitialize()

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

Reinitialize the integrator at t0 after external state edits.

Implements openswmm::twoD::ISurfaceSolver.

◆ resyncFromVolumes()

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

Re-time the integrator at t0 keeping the SIGNED cell volumes from state.volume. Used by the failed-window freeze path: reinitialize() reseeds from the reconstructed head, which clamps at the dry anchor and silently zeroes negative-volume debt (creating water); this variant preserves it. Default falls back to reinitialize() for backends that have not implemented volume-exact resync.

Reimplemented from openswmm::twoD::ISurfaceSolver.

◆ run_stats()

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

Read cumulative statistics. Default: zeros (backend has no counters).

Reimplemented from openswmm::twoD::ISurfaceSolver.

◆ 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).

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.

◆ 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.


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