39#ifndef OPENSWMM_ENGINE_2D_I_SURFACE_SOLVER_HPP
40#define OPENSWMM_ENGINE_2D_I_SURFACE_SOLVER_HPP
100 virtual double advance(
double t_current,
double t_target) = 0;
179 static const std::vector<double> kEmpty;
Abstract time integrator for the 2D surface-routing ODE system.
Definition ISurfaceSolver.hpp:61
virtual void initialize(MeshData &mesh, SurfaceStateData &state, SolverOptions2D &opts)=0
One-time setup. mesh and state must outlive the solver.
virtual bool is_initialized() const noexcept=0
True once initialize() has completed and the solver is ready.
virtual double advance(double t_current, double t_target)=0
Advance the solution from t_current to t_target (s).
virtual void reinitialize(double t0)=0
Reinitialize the integrator at t0 after external state edits.
virtual RunStats run_stats() const noexcept
Read cumulative statistics. Default: zeros (backend has no counters).
Definition ISurfaceSolver.hpp:208
virtual double completedSourceTime() const noexcept
Horizon through which ALL cell sources have actually landed, including lazy inactive cells and LTS ac...
Definition ISurfaceSolver.hpp:111
virtual void resyncFromVolumes(double t0)
Re-time the integrator at t0 keeping the SIGNED cell volumes from state.volume. Used by the failed-wi...
Definition ISurfaceSolver.hpp:136
virtual void finalize()=0
Release all backend resources.
virtual const std::vector< double > & last_coupling_exchange() const noexcept
Per-point ∫Q dt (m³) from the live node-coupling macro-step path. Default returns empty for backends ...
Definition ISurfaceSolver.hpp:178
virtual long last_num_steps() const noexcept=0
Number of internal integrator steps in the last advance() call.
virtual ~ISurfaceSolver()=default
Destroy a backend solver through its polymorphic interface.
virtual double last_step_size() const noexcept=0
Last internal step size used by the integrator.
Definition ExchangeLaw.hpp:60
Definition ISurfaceSolver.hpp:185
double active_frac_mean
mean active-cell fraction
Definition ISurfaceSolver.hpp:194
int n_tiers
populated tier count (≤ 8)
Definition ISurfaceSolver.hpp:197
double last_h
last accepted internal step (s)
Definition ISurfaceSolver.hpp:188
long nsteps
internal (marcher) substeps
Definition ISurfaceSolver.hpp:186
double active_frac_min
min active-cell fraction (rebuild samples)
Definition ISurfaceSolver.hpp:193
double active_frac_max
max active-cell fraction
Definition ISurfaceSolver.hpp:195
long nrhs
face-kernel evaluations
Definition ISurfaceSolver.hpp:187
double avg_h
sim-time / nsteps (s), filled by the caller
Definition ISurfaceSolver.hpp:189
long tier_cells[8]
cumulative rebuild-sampled cells per LTS tier
Definition ISurfaceSolver.hpp:196
SoA storage for 2D mixed triangle/quad mesh geometry and topology.
Definition MeshData.hpp:65
Definition SolverOptions2D.hpp:257
Definition SurfaceStateData.hpp:64