Solver-neutral hooks for reading and writing solver-internal state (infiltration, groundwater) at hot-start save/load time.
More...
#include <SimulationContext.hpp>
|
| bool | can_read () const noexcept |
| | True iff the read-side accessors are wired.
|
| |
| bool | can_write () const noexcept |
| | True iff the write-side accessors are wired.
|
| |
|
| std::function< bool()> | has_fv_retained_dry_mass |
| | Guard saves when a caller has no FV dry-inventory accessor.
|
| |
| std::function< std::string()> | get_fv_dry_state |
| |
| std::function< std::string(const std::string &, bool)> | set_fv_dry_state |
| |
| std::function< std::vector< double >()> | get_fv_retained_pollutant_mass |
| |
| std::function< std::vector< double >()> | get_fv_retained_species_mass |
| |
| std::function< std::vector< ChannelThermalRegion >()> | get_channel_thermal_regions |
| |
| std::function< std::string(const std::vector< ChannelThermalIncrement > &)> | apply_channel_thermal_increments |
| |
| std::function< std::vector< ChannelSpeciesRegion >()> | get_channel_species_regions |
| |
| std::function< std::string(const std::vector< ChannelSpeciesIncrement > &)> | apply_channel_species_increments |
| |
| std::function< std::string()> | get_snow_state |
| |
| std::function< std::string(const std::string &, bool)> | set_snow_state |
| |
| std::function< std::string()> | get_surface_state |
| |
| std::function< std::string(const std::string &, bool)> | set_surface_state |
| |
| std::function< bool(int subcatch_index, int &out_model, double *out_infil)> | get_infil_state |
| |
| std::function< bool(int subcatch_index, int model, const double *infil)> | set_infil_state |
| |
| std::function< bool(int subcatch_index, double &out_theta, double &out_lower_depth)> | get_gw_state |
| | Read groundwater zone state (upper-zone moisture and lower-zone depth).
|
| |
| std::function< bool(int subcatch_index, double theta, double lower_depth)> | set_gw_state |
| | Apply groundwater zone state to a subcatchment.
|
| |
Solver-neutral hooks for reading and writing solver-internal state (infiltration, groundwater) at hot-start save/load time.
The state-IO plugin layer intentionally does not depend on runoff::RunoffSolver or groundwater::GWSolver types — those are implementation details of the engine. SWMMEngine wires the engine's live solvers into these callbacks at open() time so plugins can read/write per-subcatchment state through SimulationContext alone.
Each callback returns true if it handled the call, false if no handler is wired (in which case the caller may choose to fall back to default values or skip that part of the snapshot).
◆ can_read()
| bool openswmm::StateAccessors::can_read |
( |
| ) |
const |
|
inlinenoexcept |
True iff the read-side accessors are wired.
◆ can_write()
| bool openswmm::StateAccessors::can_write |
( |
| ) |
const |
|
inlinenoexcept |
True iff the write-side accessors are wired.
◆ apply_channel_species_increments
| std::function<std::string(const std::vector<ChannelSpeciesIncrement>&)> openswmm::StateAccessors::apply_channel_species_increments |
◆ apply_channel_thermal_increments
| std::function<std::string(const std::vector<ChannelThermalIncrement>&)> openswmm::StateAccessors::apply_channel_thermal_increments |
◆ get_channel_species_regions
| std::function<std::vector<ChannelSpeciesRegion>()> openswmm::StateAccessors::get_channel_species_regions |
◆ get_channel_thermal_regions
| std::function<std::vector<ChannelThermalRegion>()> openswmm::StateAccessors::get_channel_thermal_regions |
◆ get_fv_dry_state
| std::function<std::string()> openswmm::StateAccessors::get_fv_dry_state |
◆ get_fv_retained_pollutant_mass
| std::function<std::vector<double>()> openswmm::StateAccessors::get_fv_retained_pollutant_mass |
◆ get_fv_retained_species_mass
| std::function<std::vector<double>()> openswmm::StateAccessors::get_fv_retained_species_mass |
◆ get_gw_state
| std::function<bool(int subcatch_index, double& out_theta, double& out_lower_depth)> openswmm::StateAccessors::get_gw_state |
Read groundwater zone state (upper-zone moisture and lower-zone depth).
◆ get_infil_state
| std::function<bool(int subcatch_index, int& out_model, double* out_infil)> openswmm::StateAccessors::get_infil_state |
Read infiltration model id and the 6-double infiltration state into the caller-provided buffers. out_infil must point to a 6-element array.
◆ get_snow_state
| std::function<std::string()> openswmm::StateAccessors::get_snow_state |
◆ get_surface_state
| std::function<std::string()> openswmm::StateAccessors::get_surface_state |
Subcatchment surface state for the native hot start (V16): subarea ponded depths, groundwater flow, and the pollutant and reaction species surface stores, keyed by name. Same contract as the snow pair: an empty result from the setter means valid; false validates without applying.
◆ has_fv_retained_dry_mass
| std::function<bool()> openswmm::StateAccessors::has_fv_retained_dry_mass |
Guard saves when a caller has no FV dry-inventory accessor.
◆ set_fv_dry_state
| std::function<std::string(const std::string&,bool)> openswmm::StateAccessors::set_fv_dry_state |
◆ set_gw_state
| std::function<bool(int subcatch_index, double theta, double lower_depth)> openswmm::StateAccessors::set_gw_state |
Apply groundwater zone state to a subcatchment.
◆ set_infil_state
| std::function<bool(int subcatch_index, int model, const double* infil)> openswmm::StateAccessors::set_infil_state |
Apply infiltration state to a subcatchment. infil must point to a 6-element array.
◆ set_snow_state
| std::function<std::string(const std::string&, bool)> openswmm::StateAccessors::set_snow_state |
◆ set_surface_state
| std::function<std::string(const std::string&, bool)> openswmm::StateAccessors::set_surface_state |
The documentation for this struct was generated from the following file: