OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmm::fv::INetworkSolver Class Referenceabstract

Abstract time integrator for the explicit FV 1D network. More...

#include <INetworkSolver.hpp>

Inheritance diagram for openswmm::fv::INetworkSolver:
Collaboration diagram for openswmm::fv::INetworkSolver:

Classes

struct  Divergence
 
struct  RunStats
 

Public Member Functions

virtual ~INetworkSolver ()=default
 
virtual void initialize (NetworkMeshData &mesh, NetworkStateData &state, const FvOptions &opts)=0
 One-time setup. mesh, state and opts must outlive the solver.
 
virtual double advance (double t_current, double t_target, const FvStepForcing &forcing)=0
 
virtual void reinitialize (double t0)=0
 Reinitialize at t0 after external state edits (hot start, API writes).
 
virtual void finalize ()=0
 Release all backend resources.
 
virtual long last_num_steps () const noexcept=0
 Substep count used by the last advance() call.
 
virtual double last_step_size () const noexcept=0
 Last internal substep size (s).
 
virtual double suggested_step () const noexcept=0
 
virtual RunStats run_stats () const noexcept
 Read cumulative statistics. Default: zeros (backend has no counters).
 
virtual bool divergence (Divergence &d) 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 explicit FV 1D network.

The lifecycle mirrors what Router drives: one-time setup, repeated advance over a routing step (internally substepped at the CFL limit), optional reinitialize after external state edits (hot start / runtime forcing), and teardown.

Implementations are non-copyable (they own backend resources) and owned by Router through a unique_ptr<INetworkSolver>; the virtual destructor makes that deletion correct.

Constructor & Destructor Documentation

◆ ~INetworkSolver()

virtual openswmm::fv::INetworkSolver::~INetworkSolver ( )
virtualdefault

Member Function Documentation

◆ advance()

virtual double openswmm::fv::INetworkSolver::advance ( double t_current,
double t_target,
const FvStepForcing & forcing )
pure virtual

Advance from t_current to t_target (s), substepping at the CFL limit.

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

Implemented in openswmm::fv::ExplicitFvSolver.

◆ divergence()

virtual bool openswmm::fv::INetworkSolver::divergence ( Divergence & d) const
inlinevirtualnoexcept

True when the last advance() left a cell beyond physical bounds (or non-finite), with d describing the worst offender. Default: never reports, for a backend without the check.

Reimplemented in openswmm::fv::ExplicitFvSolver.

◆ finalize()

virtual void openswmm::fv::INetworkSolver::finalize ( )
pure virtual

Release all backend resources.

Implemented in openswmm::fv::ExplicitFvSolver.

◆ initialize()

virtual void openswmm::fv::INetworkSolver::initialize ( NetworkMeshData & mesh,
NetworkStateData & state,
const FvOptions & opts )
pure virtual

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

Implemented in openswmm::fv::ExplicitFvSolver.

◆ is_initialized()

virtual bool openswmm::fv::INetworkSolver::is_initialized ( ) const
pure virtualnoexcept

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

Implemented in openswmm::fv::ExplicitFvSolver.

◆ last_num_steps()

virtual long openswmm::fv::INetworkSolver::last_num_steps ( ) const
pure virtualnoexcept

Substep count used by the last advance() call.

Implemented in openswmm::fv::ExplicitFvSolver.

◆ last_step_size()

virtual double openswmm::fv::INetworkSolver::last_step_size ( ) const
pure virtualnoexcept

Last internal substep size (s).

Implemented in openswmm::fv::ExplicitFvSolver.

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

◆ reinitialize()

virtual void openswmm::fv::INetworkSolver::reinitialize ( double t0)
pure virtual

Reinitialize at t0 after external state edits (hot start, API writes).

Implemented in openswmm::fv::ExplicitFvSolver.

◆ run_stats()

virtual RunStats openswmm::fv::INetworkSolver::run_stats ( ) const
inlinevirtualnoexcept

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

Reimplemented in openswmm::fv::ExplicitFvSolver.

◆ suggested_step()

virtual double openswmm::fv::INetworkSolver::suggested_step ( ) const
pure virtualnoexcept

CFL-limited step the solver would take next, from its most recent census. Router::getAdaptiveStep publishes this as the routing-step suggestion.

Implemented in openswmm::fv::ExplicitFvSolver.

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

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