|
| void | init (SimulationContext &ctx) |
| | Build eight type groups and initialize water state from resolved LID controls and usage.
|
| |
| LIDSolver | waterTrial () const |
| | Copy water parameters, runtime state and ledgers for an independent trial.
|
| |
| void | executeCompleted (double dt, double start, double recovery_factor, const std::vector< CompletedUnitInput > &inputs) |
| | Advance selected units with already-resolved completed-source forcing.
|
| |
| LIDGroupSoA & | group (int type_index) |
| | Borrow mutable parameters and water state for a type group.
|
| |
| const LIDGroupSoA & | group (int type_index) const |
| | Borrow read-only parameters and water state for a type group.
|
| |
| int | numGroups () const |
| | Return the number of currently allocated type groups.
|
| |
| const std::vector< std::pair< int, int > > & | usageOrder () const |
| | Borrow the deterministic legacy accumulation order for usage rows.
|
| |
| double | storedVolume (const std::vector< int > *source_owners=nullptr) const |
| | Sum current planar, void-weighted layer storage for ordinary runoff continuity.
|
| |
| void | checkpoint (detail::CompletedSourceArchive &a, bool model, bool lazy_buffers=false) |
| | Visit LID model identity or accepted-boundary water state in archive order.
|
| |
| void | validateCheckpoint (const LIDSolver &model, std::size_t runoff_count) const |
| | Check restored LID water state against an initialized model.
|
| |
| double | totalStoredVolume () const |
| | Sum the latest kernel water-balance final-store ledger over all unit footprints.
|
| |
| double | totalInitVolume () const |
| | Sum the initialized water-balance store ledger over all unit footprints.
|
| |
| double | totalInfilVolume () const |
| | Sum cumulative native plus spatial bottom exfiltration over all unit footprints.
|
| |
| double | totalEvapVolume () const |
| | Sum cumulative evaporation over all unit footprints.
|
| |
| void | execute (SimulationContext &ctx, double dt, double rainfall, double evap_rate, const std::vector< int > *source_owners=nullptr) |
| | Advance ordinary LID units with staged inflow and context-resolved evaporation.
|
| |
| void | setRunoffTime (double old_runoff_sec) |
| | Set the old runoff clock used by regeneration and report timestamps.
|
| |
| void | setNativeInfil (std::vector< double > native, std::vector< double > max_native) |
| | Take ownership of per-subcatchment native-soil rates for subsequent ordinary steps.
|
| |
| void | setInfilFactors (std::vector< double > infil_factor, double recovery_factor) |
| | Take ownership of infiltration multipliers and set the evaporation recovery factor.
|
| |
| bool | anyWet (const std::vector< int > *source_owners=nullptr) const |
| | Test the last evaluated wet flags of included units.
|
| |
|
| static void | batchBioCellFlux (LIDGroupSoA &g, double rainfall, const double *evap_rate, double dt) |
| | Advance a standalone biocell/rain-garden group through the shared legacy kernel.
|
| |
| static void | batchBarrelFlux (LIDGroupSoA &g, double rainfall, double dt) |
| | Advance a standalone rain-barrel group through the shared legacy kernel.
|
| |
| static void | batchSwaleFlux (LIDGroupSoA &g, double rainfall, const double *evap_rate, double dt) |
| | Advance a standalone vegetative-swale group through the shared legacy kernel.
|
| |
| static void | batchGreenRoofFlux (LIDGroupSoA &g, double rainfall, const double *evap_rate, double dt) |
| | Advance a standalone green-roof group through the shared legacy kernel.
|
| |
| static void | batchInfilTrenchFlux (LIDGroupSoA &g, double rainfall, const double *evap_rate, double dt) |
| | Advance a standalone infiltration-trench group through the shared legacy kernel.
|
| |
| static void | batchPavementFlux (LIDGroupSoA &g, double rainfall, const double *evap_rate, double dt) |
| | Advance a standalone permeable-pavement group through the shared legacy kernel.
|
| |
| static void | batchRoofDisconFlux (LIDGroupSoA &g, double rainfall, const double *evap_rate, double dt) |
| | Advance a standalone roof-disconnection group through the shared legacy kernel.
|
| |
| static void | batchSwaleModPuls (LIDGroupSoA &g, double rainfall, const double *evap_rate, double dt) |
| | Advance a standalone Modified Puls swale group through the shared legacy kernel.
|
| |
| void openswmm::lid::LIDSolver::batchBarrelFlux |
( |
LIDGroupSoA & | g, |
|
|
double | rainfall, |
|
|
double | dt ) |
|
static |
Advance a standalone rain-barrel group through the shared legacy kernel.
Updates depths, rates, ledgers, wet/dry clocks and drain history without a context or report IO. Native infiltration is zero, its ceiling 1e10 ft/s, factors 1 and old runoff time zero. All wrappers use the same dispatcher; swales iterate with omega=0.5, other ordinary types use one explicit Modified Puls evaluation. Evaporation is zero for this entry point.
- Parameters
-
| [in,out] | g | Initialized parallel arrays for the intended rain-barrel type; dispatch actually follows g.type, not the wrapper name. Each unit needs positive geometry required by that type. |
| [in] | rainfall | Fallback inflow in ft/s when a unit staged inflow is not positive; covered rain barrels force inflow to zero. |
| [in] | dt | Positive interval in seconds; unchecked. |
| void openswmm::lid::LIDSolver::batchBioCellFlux |
( |
LIDGroupSoA & | g, |
|
|
double | rainfall, |
|
|
const double * | evap_rate, |
|
|
double | dt ) |
|
static |
Advance a standalone biocell/rain-garden group through the shared legacy kernel.
Updates depths, rates, ledgers, wet/dry clocks and drain history without a context or report IO. Native infiltration is zero, its ceiling 1e10 ft/s, factors 1 and old runoff time zero. All wrappers use the same dispatcher; swales iterate with omega=0.5, other ordinary types use one explicit Modified Puls evaluation. The PET array is borrowed and never retained.
- Parameters
-
| [in,out] | g | Initialized parallel arrays for the intended biocell/rain-garden type; dispatch actually follows g.type, not the wrapper name. Each unit needs positive geometry required by that type. |
| [in] | rainfall | Fallback inflow in ft/s when a unit staged inflow is not positive; covered rain barrels force inflow to zero. |
| [in] | evap_rate | Optional readable g.count-element PET array in ft/s, used only during this call; null means zero. |
| [in] | dt | Positive interval in seconds; unchecked. |
| void openswmm::lid::LIDSolver::batchGreenRoofFlux |
( |
LIDGroupSoA & | g, |
|
|
double | rainfall, |
|
|
const double * | evap_rate, |
|
|
double | dt ) |
|
static |
Advance a standalone green-roof group through the shared legacy kernel.
Updates depths, rates, ledgers, wet/dry clocks and drain history without a context or report IO. Native infiltration is zero, its ceiling 1e10 ft/s, factors 1 and old runoff time zero. All wrappers use the same dispatcher; swales iterate with omega=0.5, other ordinary types use one explicit Modified Puls evaluation. The PET array is borrowed and never retained.
- Parameters
-
| [in,out] | g | Initialized parallel arrays for the intended green-roof type; dispatch actually follows g.type, not the wrapper name. Each unit needs positive geometry required by that type. |
| [in] | rainfall | Fallback inflow in ft/s when a unit staged inflow is not positive; covered rain barrels force inflow to zero. |
| [in] | evap_rate | Optional readable g.count-element PET array in ft/s, used only during this call; null means zero. |
| [in] | dt | Positive interval in seconds; unchecked. |
| void openswmm::lid::LIDSolver::batchInfilTrenchFlux |
( |
LIDGroupSoA & | g, |
|
|
double | rainfall, |
|
|
const double * | evap_rate, |
|
|
double | dt ) |
|
static |
Advance a standalone infiltration-trench group through the shared legacy kernel.
Updates depths, rates, ledgers, wet/dry clocks and drain history without a context or report IO. Native infiltration is zero, its ceiling 1e10 ft/s, factors 1 and old runoff time zero. All wrappers use the same dispatcher; swales iterate with omega=0.5, other ordinary types use one explicit Modified Puls evaluation. The PET array is borrowed and never retained.
- Parameters
-
| [in,out] | g | Initialized parallel arrays for the intended infiltration-trench type; dispatch actually follows g.type, not the wrapper name. Each unit needs positive geometry required by that type. |
| [in] | rainfall | Fallback inflow in ft/s when a unit staged inflow is not positive; covered rain barrels force inflow to zero. |
| [in] | evap_rate | Optional readable g.count-element PET array in ft/s, used only during this call; null means zero. |
| [in] | dt | Positive interval in seconds; unchecked. |
| void openswmm::lid::LIDSolver::batchPavementFlux |
( |
LIDGroupSoA & | g, |
|
|
double | rainfall, |
|
|
const double * | evap_rate, |
|
|
double | dt ) |
|
static |
Advance a standalone permeable-pavement group through the shared legacy kernel.
Updates depths, rates, ledgers, wet/dry clocks and drain history without a context or report IO. Native infiltration is zero, its ceiling 1e10 ft/s, factors 1 and old runoff time zero. All wrappers use the same dispatcher; swales iterate with omega=0.5, other ordinary types use one explicit Modified Puls evaluation. The PET array is borrowed and never retained.
- Parameters
-
| [in,out] | g | Initialized parallel arrays for the intended permeable-pavement type; dispatch actually follows g.type, not the wrapper name. Each unit needs positive geometry required by that type. |
| [in] | rainfall | Fallback inflow in ft/s when a unit staged inflow is not positive; covered rain barrels force inflow to zero. |
| [in] | evap_rate | Optional readable g.count-element PET array in ft/s, used only during this call; null means zero. |
| [in] | dt | Positive interval in seconds; unchecked. |
| void openswmm::lid::LIDSolver::batchRoofDisconFlux |
( |
LIDGroupSoA & | g, |
|
|
double | rainfall, |
|
|
const double * | evap_rate, |
|
|
double | dt ) |
|
static |
Advance a standalone roof-disconnection group through the shared legacy kernel.
Updates depths, rates, ledgers, wet/dry clocks and drain history without a context or report IO. Native infiltration is zero, its ceiling 1e10 ft/s, factors 1 and old runoff time zero. All wrappers use the same dispatcher; swales iterate with omega=0.5, other ordinary types use one explicit Modified Puls evaluation. The PET array is borrowed and never retained.
- Parameters
-
| [in,out] | g | Initialized parallel arrays for the intended roof-disconnection type; dispatch actually follows g.type, not the wrapper name. Each unit needs positive geometry required by that type. |
| [in] | rainfall | Fallback inflow in ft/s when a unit staged inflow is not positive; covered rain barrels force inflow to zero. |
| [in] | evap_rate | Optional readable g.count-element PET array in ft/s, used only during this call; null means zero. |
| [in] | dt | Positive interval in seconds; unchecked. |
| void openswmm::lid::LIDSolver::batchSwaleFlux |
( |
LIDGroupSoA & | g, |
|
|
double | rainfall, |
|
|
const double * | evap_rate, |
|
|
double | dt ) |
|
static |
Advance a standalone vegetative-swale group through the shared legacy kernel.
Updates depths, rates, ledgers, wet/dry clocks and drain history without a context or report IO. Native infiltration is zero, its ceiling 1e10 ft/s, factors 1 and old runoff time zero. All wrappers use the same dispatcher; swales iterate with omega=0.5, other ordinary types use one explicit Modified Puls evaluation. The PET array is borrowed and never retained.
- Parameters
-
| [in,out] | g | Initialized parallel arrays for the intended vegetative-swale type; dispatch actually follows g.type, not the wrapper name. Each unit needs positive geometry required by that type. |
| [in] | rainfall | Fallback inflow in ft/s when a unit staged inflow is not positive; covered rain barrels force inflow to zero. |
| [in] | evap_rate | Optional readable g.count-element PET array in ft/s, used only during this call; null means zero. |
| [in] | dt | Positive interval in seconds; unchecked. |
| void openswmm::lid::LIDSolver::batchSwaleModPuls |
( |
LIDGroupSoA & | g, |
|
|
double | rainfall, |
|
|
const double * | evap_rate, |
|
|
double | dt ) |
|
static |
Advance a standalone Modified Puls swale group through the shared legacy kernel.
Updates depths, rates, ledgers, wet/dry clocks and drain history without a context or report IO. Native infiltration is zero, its ceiling 1e10 ft/s, factors 1 and old runoff time zero. All wrappers use the same dispatcher; swales iterate with omega=0.5, other ordinary types use one explicit Modified Puls evaluation. The PET array is borrowed and never retained.
- Parameters
-
| [in,out] | g | Initialized parallel arrays for the intended Modified Puls swale type; dispatch actually follows g.type, not the wrapper name. Each unit needs positive geometry required by that type. |
| [in] | rainfall | Fallback inflow in ft/s when a unit staged inflow is not positive; covered rain barrels force inflow to zero. |
| [in] | evap_rate | Optional readable g.count-element PET array in ft/s, used only during this call; null means zero. |
| [in] | dt | Positive interval in seconds; unchecked. |
| void openswmm::lid::LIDSolver::execute |
( |
SimulationContext & | ctx, |
|
|
double | dt, |
|
|
double | rainfall, |
|
|
double | evap_rate, |
|
|
const std::vector< int > * | source_owners = nullptr ) |
Advance ordinary LID units with staged inflow and context-resolved evaporation.
A mismatched ownership-map size throws std::invalid_argument before evaluation. Skips nonpositive footprints; uses previously staged native infiltration/factors and runoff start time. Updates water states, fluxes, ledgers, wet flags and dry clocks, and lazily writes configured report files. No rollback is provided after evaluation starts. The per-unit old_drain_flow/drain_open history is left as stored; standalone batch entry points explicitly refresh it.
- Parameters
-
| [in,out] | ctx | Initialized model, names, forcing and simulation dates used to resolve PET and format optional reports; this routine does not scatter unit runoff/drains to context totals. |
| [in] | dt | Positive runoff interval in seconds; unchecked before divisions in the kernel. |
| [in] | rainfall | Compatibility argument, ignored; each group inflow must already contain rain plus captured runoff. |
| [in] | evap_rate | Climate potential evaporation fallback in ft/s; DRY_ONLY suppresses it during rain, and prescribed parent-subcatchment PET can override it. |
| [in] | source_owners | Optional ownership map exactly ctx.n_subcatches() long; nonnegative entries exclude units owned by completed sources. Null evaluates all eligible units. |
| void openswmm::lid::LIDSolver::executeCompleted |
( |
double | dt, |
|
|
double | start, |
|
|
double | recovery_factor, |
|
|
const std::vector< CompletedUnitInput > & | inputs ) |
Advance selected units with already-resolved completed-source forcing.
Validates the entire input batch before evaluation, throwing std::invalid_argument on a bad interval, key or value. Zero/nonpositive-area units are skipped. Updates selected water states, per-layer rates, ledgers, resolved inflow/PET/rain and dry clocks using completed-volume rules; it does not resolve forcing, write report files or scatter runoff to the context. Existing old_drain_flow/drain_open history is not refreshed by this entry point. Evaluation is in-place after validation; use waterTrial() for transactional trial ownership.
- Parameters
-
| [in] | dt | Finite positive interval length in seconds. |
| [in] | start | Finite nonnegative interval start in elapsed runoff seconds, used for pavement regeneration. |
| [in] | recovery_factor | Finite nonnegative Green-Ampt recovery multiplier. |
| [in] | inputs | Strictly increasing unique (type, unit) keys within initialized group bounds. All rate/ceiling/factor fields must be finite and nonnegative; spatial_fraction must be -1 or in [0,1]. Rates are ft/s; fractions and factors are dimensionless. |
Build eight type groups and initialize water state from resolved LID controls and usage.
Converts authored lengths, areas and rates to internal ft/ft2/ft/s, resolves drain destinations, seeds moisture, Green-Ampt history and water ledgers, and orders units by subcatchment then reverse usage parse order. Invalid control indices or unknown type codes are skipped. Intended for a fresh solver: existing report streams and ancillary forcing buffers are not cleared; the zero-usage early return also leaves usage_order_ unchanged. No report file is opened here; allocation failures propagate.
- Parameters
-
| [in,out] | ctx | Validated model with parallel control/usage arrays; usage water ledgers and subcatchment total_lid_area_ft2 are updated. |
| void openswmm::lid::LIDSolver::validateCheckpoint |
( |
const LIDSolver & | model, |
|
|
std::size_t | runoff_count ) const |
Check restored LID water state against an initialized model.
Throws std::runtime_error on the first invalid state/material: mismatched counts, open report streams, invalid clocks, buffer values/shapes, nonfinite runtime fields, invalid moisture/depth/flags/ledgers, changed initial volumes or changed Green-Ampt material. Small negative depth/ledger roundoff is tolerated to 1e-12 and soil moisture to porosity + 1e-8. Fixed-array shape compatibility must already have been enforced by archive loading; this method uses unchecked indexing within each unit.
- Parameters
-
| [in] | model | Compatible initialized reference with matching group counts and already-compatible array shapes; not modified. |
| [in] | runoff_count | Required size of any nonempty per-subcatchment forcing buffer. |