![]() |
OpenSWMM Engine
6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
|
Solver-neutral hooks for reading and writing solver-internal state (infiltration, groundwater) at hot-start save/load time. More...
#include <SimulationContext.hpp>
Public Member Functions | |
| 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. | |
Public Attributes | |
| 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).
|
inlinenoexcept |
True iff the read-side accessors are wired.
|
inlinenoexcept |
True iff the write-side accessors are wired.
| 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).
| 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.
| std::function<bool(int subcatch_index, double theta, double lower_depth)> openswmm::StateAccessors::set_gw_state |
Apply groundwater zone state to a subcatchment.
| 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.