![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
Abstract time integrator for the 2D surface-routing ODE system. More...
#include <ISurfaceSolver.hpp>
Classes | |
| struct | RunStats |
Public Member Functions | |
| virtual | ~ISurfaceSolver ()=default |
| virtual void | initialize (MeshData &mesh, SurfaceStateData &state, SolverOptions2D &opts)=0 |
One-time setup. mesh and state must outlive the solver. | |
| virtual double | advance (double t_current, double t_target)=0 |
| virtual void | reinitialize (double t0)=0 |
Reinitialize the integrator at t0 after external state edits. | |
| virtual void | resyncFromVolumes (double t0) |
| virtual void | finalize ()=0 |
| Release all backend resources. | |
| virtual long | last_num_steps () const noexcept=0 |
| Number of internal integrator steps in the last advance() call. | |
| virtual double | last_step_size () const noexcept=0 |
| Last internal step size used by the integrator. | |
| virtual const std::vector< double > & | last_coupling_exchange () const noexcept |
| virtual RunStats | run_stats () const noexcept |
| Read cumulative statistics. Default: zeros (backend has no counters). | |
| virtual bool | is_initialized () const noexcept=0 |
| True once initialize() has completed and the solver is ready. | |
Abstract time integrator for the 2D surface-routing ODE system.
The method set mirrors the lifecycle SurfaceRouter2D drives: one-time setup, repeated advance, optional reinitialize after external state edits (hot start), and teardown. The status accessors expose the most recent integrator step count and step size for runtime reporting.
Implementations are non-copyable (they own backend resources) and owned by SurfaceRouter2D through a unique_ptr<ISurfaceSolver>; the virtual destructor makes that deletion correct.
|
virtualdefault |
|
pure virtual |
Advance the solution from t_current to t_target (s).
Implemented in openswmm::twoD::ExplicitInertialSolver, and openswmm::twoD::gpu::ExplicitKokkosSurfaceSolver.
|
pure virtual |
Release all backend resources.
Implemented in openswmm::twoD::ExplicitInertialSolver, and openswmm::twoD::gpu::ExplicitKokkosSurfaceSolver.
|
pure virtual |
One-time setup. mesh and state must outlive the solver.
Implemented in openswmm::twoD::ExplicitInertialSolver, and openswmm::twoD::gpu::ExplicitKokkosSurfaceSolver.
|
pure virtualnoexcept |
True once initialize() has completed and the solver is ready.
Implemented in openswmm::twoD::ExplicitInertialSolver, and openswmm::twoD::gpu::ExplicitKokkosSurfaceSolver.
|
inlinevirtualnoexcept |
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 in openswmm::twoD::ExplicitInertialSolver, and openswmm::twoD::gpu::ExplicitKokkosSurfaceSolver.
|
pure virtualnoexcept |
Number of internal integrator steps in the last advance() call.
Implemented in openswmm::twoD::ExplicitInertialSolver, and openswmm::twoD::gpu::ExplicitKokkosSurfaceSolver.
|
pure virtualnoexcept |
Last internal step size used by the integrator.
Implemented in openswmm::twoD::ExplicitInertialSolver, and openswmm::twoD::gpu::ExplicitKokkosSurfaceSolver.
|
pure virtual |
Reinitialize the integrator at t0 after external state edits.
Implemented in openswmm::twoD::ExplicitInertialSolver, and openswmm::twoD::gpu::ExplicitKokkosSurfaceSolver.
|
inlinevirtual |
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 in openswmm::twoD::ExplicitInertialSolver, and openswmm::twoD::gpu::ExplicitKokkosSurfaceSolver.
|
inlinevirtualnoexcept |
Read cumulative statistics. Default: zeros (backend has no counters).
Reimplemented in openswmm::twoD::ExplicitInertialSolver, and openswmm::twoD::gpu::ExplicitKokkosSurfaceSolver.