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

#include <ExplicitFvSolver.hpp>

Inheritance diagram for openswmm::fv::ExplicitFvSolver:
Collaboration diagram for openswmm::fv::ExplicitFvSolver:

Public Member Functions

 ExplicitFvSolver ()=default
 
 ~ExplicitFvSolver () override=default
 
 ExplicitFvSolver (const ExplicitFvSolver &)=delete
 
ExplicitFvSolveroperator= (const ExplicitFvSolver &)=delete
 
void initialize (NetworkMeshData &mesh, NetworkStateData &state, const FvOptions &opts) override
 One-time setup. mesh, state and opts must outlive the solver.
 
double advance (double t_current, double t_target, const FvStepForcing &forcing) override
 
void reinitialize (double t0) override
 Reinitialize at t0 after external state edits (hot start, API writes).
 
void finalize () override
 Release all backend resources.
 
long last_num_steps () const noexcept override
 Substep count used by the last advance() call.
 
double last_step_size () const noexcept override
 Last internal substep size (s).
 
double suggested_step () const noexcept override
 
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.
 
bool divergence (Divergence &d) const noexcept override
 
const std::vector< double > & node_exchange () const noexcept
 
const std::vector< double > & node_inflow_volume () const noexcept
 
const std::vector< double > & node_outflow_volume () const noexcept
 
const std::vector< uint8_t > & inlet_control () const noexcept
 
const std::vector< double > & node_flood_volume () const noexcept
 Per-node flooding VOLUME (ft³) over the last advance().
 
const std::vector< double > & dummy_volume () const noexcept
 
const std::vector< std::uint8_t > & node_passthrough () const noexcept
 
const std::vector< std::uint8_t > & node_publish_stage () const noexcept
 
const std::vector< double > & cell_flow_integral () const noexcept
 
double nodeVolumeFromDepth (int node, double depth) const
 
int lts_tiers () const noexcept
 
const std::array< long, kMaxLtsTiers > & tier_occupancy () const noexcept
 
- Public Member Functions inherited from openswmm::fv::INetworkSolver
virtual ~INetworkSolver ()=default
 

Constructor & Destructor Documentation

◆ ExplicitFvSolver() [1/2]

openswmm::fv::ExplicitFvSolver::ExplicitFvSolver ( )
default
Here is the caller graph for this function:

◆ ~ExplicitFvSolver()

openswmm::fv::ExplicitFvSolver::~ExplicitFvSolver ( )
overridedefault

◆ ExplicitFvSolver() [2/2]

openswmm::fv::ExplicitFvSolver::ExplicitFvSolver ( const ExplicitFvSolver & )
delete
Here is the call graph for this function:

Member Function Documentation

◆ advance()

double openswmm::fv::ExplicitFvSolver::advance ( double t_current,
double t_target,
const FvStepForcing & forcing )
overridevirtual

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

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

Implements openswmm::fv::INetworkSolver.

Here is the call graph for this function:

◆ cell_flow_integral()

const std::vector< double > & openswmm::fv::ExplicitFvSolver::cell_flow_integral ( ) const
inlinenoexcept

Time-integrated cell discharge (ft³) over the last advance(), used to publish a routing-step MEAN link flow rather than an end-of-step snapshot — the snapshot aliases badly when a routing step spans many substeps.

◆ divergence()

bool openswmm::fv::ExplicitFvSolver::divergence ( Divergence & d) const
inlineoverridevirtualnoexcept

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 from openswmm::fv::INetworkSolver.

◆ dummy_volume()

const std::vector< double > & openswmm::fv::ExplicitFvSolver::dummy_volume ( ) const
inlinenoexcept

Per-structure-entry pass-through VOLUME (ft³) over the last advance(), parallel to mesh.struct_link. Nonzero only for DUMMY entries, whose discharge the solver derives rather than receiving in the forcing — the Router has no other way to report their flow or book their node ledger.

◆ finalize()

void openswmm::fv::ExplicitFvSolver::finalize ( )
overridevirtual

Release all backend resources.

Implements openswmm::fv::INetworkSolver.

◆ initialize()

void openswmm::fv::ExplicitFvSolver::initialize ( NetworkMeshData & mesh,
NetworkStateData & state,
const FvOptions & opts )
overridevirtual

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

Implements openswmm::fv::INetworkSolver.

Here is the call graph for this function:

◆ inlet_control()

const std::vector< uint8_t > & openswmm::fv::ExplicitFvSolver::inlet_control ( ) const
inlinenoexcept

Per-conduit flag: did HEC-5 inlet control cap this culvert's inflow at any point in the last advance()? Reported as the "Inlet Ctrl" column.

◆ is_initialized()

bool openswmm::fv::ExplicitFvSolver::is_initialized ( ) const
inlineoverridevirtualnoexcept

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

Implements openswmm::fv::INetworkSolver.

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

◆ last_num_steps()

long openswmm::fv::ExplicitFvSolver::last_num_steps ( ) const
inlineoverridevirtualnoexcept

Substep count used by the last advance() call.

Implements openswmm::fv::INetworkSolver.

◆ last_step_size()

double openswmm::fv::ExplicitFvSolver::last_step_size ( ) const
inlineoverridevirtualnoexcept

Last internal substep size (s).

Implements openswmm::fv::INetworkSolver.

◆ lts_tiers()

int openswmm::fv::ExplicitFvSolver::lts_tiers ( ) const
inlinenoexcept

Number of LTS tiers the last macro cycle ran with. 1 means tiering found nothing to separate and the solver took the global-dt path.

◆ node_exchange()

const std::vector< double > & openswmm::fv::ExplicitFvSolver::node_exchange ( ) const
inlinenoexcept

Per-node net exchange VOLUME (ft³) accumulated over the last advance(). Signed positive INTO the node. The Router glue turns this into the node inflow/outflow rates the reporting and mass-balance paths expect.

◆ node_flood_volume()

const std::vector< double > & openswmm::fv::ExplicitFvSolver::node_flood_volume ( ) const
inlinenoexcept

Per-node flooding VOLUME (ft³) over the last advance().

◆ node_inflow_volume()

const std::vector< double > & openswmm::fv::ExplicitFvSolver::node_inflow_volume ( ) const
inlinenoexcept

Per-node conduit-face exchange VOLUME split into arriving and departing magnitudes (ft³) over the last advance(). SWMM's node ledger is not a net figure — inflow and outflow are separate magnitudes, and the mass balance books an outfall's system discharge from inflow alone — so the split has to be accumulated here, per substep, rather than reconstructed from the net afterwards.

◆ node_outflow_volume()

const std::vector< double > & openswmm::fv::ExplicitFvSolver::node_outflow_volume ( ) const
inlinenoexcept

◆ node_passthrough()

const std::vector< std::uint8_t > & openswmm::fv::ExplicitFvSolver::node_passthrough ( ) const
inlinenoexcept

Pass-through classification (clean degree-2 junctions whose faces present the neighbouring cells to each other directly; refreshed with the structure flows). The publish path reads it to reconstruct those nodes' REPORTED heads face-consistently — the solver-internal head stays the stable wet-mean, which also serves as the ghost boundary state under LTS tier holds.

◆ node_publish_stage()

const std::vector< std::uint8_t > & openswmm::fv::ExplicitFvSolver::node_publish_stage ( ) const
inlinenoexcept

Nodes whose PUBLISHED stage should be reconstructed from the incident wet cells rather than reported as the solver's own head. A superset of node_passthrough(): the same cleanliness and structure/carry tests, but at any degree, because the degree-2 restriction exists only for the solver's direct-face bypass.

Measured on Example1 under FLOW_ROUTING FV: nodes outside this set published a stage up to 0.91 ft above their own adjacent cell at FV_MIN_CELLS 1, falling ~first-order with refinement (a datum term), while nodes inside it never exceeded 0.0002 ft at any refinement. See tests/manual/fv_node_stage/RESULTS.md.

◆ nodeVolumeFromDepth()

double openswmm::fv::ExplicitFvSolver::nodeVolumeFromDepth ( int node,
double depth ) const

Depth → volume through the node's own storage relation. Exposed for the Router glue's seeding path and for the conservation tests.

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

◆ operator=()

ExplicitFvSolver & openswmm::fv::ExplicitFvSolver::operator= ( const ExplicitFvSolver & )
delete
Here is the call graph for this function:

◆ reinitialize()

void openswmm::fv::ExplicitFvSolver::reinitialize ( double t0)
overridevirtual

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

Implements openswmm::fv::INetworkSolver.

◆ run_stats()

INetworkSolver::RunStats openswmm::fv::ExplicitFvSolver::run_stats ( ) const
overridevirtualnoexcept

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

Reimplemented from openswmm::fv::INetworkSolver.

◆ suggested_step()

double openswmm::fv::ExplicitFvSolver::suggested_step ( ) const
inlineoverridevirtualnoexcept

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

Implements openswmm::fv::INetworkSolver.

◆ tier_occupancy()

const std::array< long, kMaxLtsTiers > & openswmm::fv::ExplicitFvSolver::tier_occupancy ( ) const
inlinenoexcept

Cells per tier over the run — the §6.12 histogram that proves tiering is genuinely active on a case rather than degenerating to K = 1.


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