OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
openswmm::twoD::ISurfaceSolver Class Referenceabstract

Abstract time integrator for the 2D surface-routing ODE system. More...

#include <ISurfaceSolver.hpp>

Inheritance diagram for openswmm::twoD::ISurfaceSolver:
Collaboration diagram for openswmm::twoD::ISurfaceSolver:

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 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 bool is_initialized () const noexcept=0
 True once initialize() has completed and the solver is ready.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ~ISurfaceSolver()

virtual openswmm::twoD::ISurfaceSolver::~ISurfaceSolver ( )
virtualdefault

Member Function Documentation

◆ advance()

virtual double openswmm::twoD::ISurfaceSolver::advance ( double t_current,
double t_target )
pure virtual

Advance the solution from t_current to t_target (s).

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

Implemented in openswmm::twoD::gpu::ArkodeKokkosSurfaceSolver, and openswmm::twoD::gpu::CvodeKokkosSurfaceSolver.

◆ finalize()

virtual void openswmm::twoD::ISurfaceSolver::finalize ( )
pure virtual

◆ initialize()

virtual void openswmm::twoD::ISurfaceSolver::initialize ( MeshData & mesh,
SurfaceStateData & state,
SolverOptions2D & opts )
pure virtual

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

Implemented in openswmm::twoD::gpu::ArkodeKokkosSurfaceSolver, and openswmm::twoD::gpu::CvodeKokkosSurfaceSolver.

◆ is_initialized()

virtual bool openswmm::twoD::ISurfaceSolver::is_initialized ( ) const
pure virtualnoexcept

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

Implemented in openswmm::twoD::gpu::ArkodeKokkosSurfaceSolver, and openswmm::twoD::gpu::CvodeKokkosSurfaceSolver.

◆ last_coupling_exchange()

virtual const std::vector< double > & openswmm::twoD::ISurfaceSolver::last_coupling_exchange ( ) const
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 CvodeSurfaceSolver.

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

◆ last_num_steps()

virtual long openswmm::twoD::ISurfaceSolver::last_num_steps ( ) const
pure virtualnoexcept

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

Implemented in openswmm::twoD::gpu::ArkodeKokkosSurfaceSolver, and openswmm::twoD::gpu::CvodeKokkosSurfaceSolver.

◆ last_step_size()

virtual double openswmm::twoD::ISurfaceSolver::last_step_size ( ) const
pure virtualnoexcept

Last internal step size used by the integrator.

Implemented in openswmm::twoD::gpu::ArkodeKokkosSurfaceSolver, and openswmm::twoD::gpu::CvodeKokkosSurfaceSolver.

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

◆ reinitialize()

virtual void openswmm::twoD::ISurfaceSolver::reinitialize ( double t0)
pure virtual

Reinitialize the integrator at t0 after external state edits.

Implemented in openswmm::twoD::gpu::ArkodeKokkosSurfaceSolver, and openswmm::twoD::gpu::CvodeKokkosSurfaceSolver.


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