25#ifndef OPENSWMM_FORCING_DATA_HPP
26#define OPENSWMM_FORCING_DATA_HPP
110 void resize(
int n_nodes,
int n_links,
int n_subcatches,
111 int n_gages,
int n_pollutants) {
118 auto un =
static_cast<std::size_t
>(n_nodes);
119 auto ul =
static_cast<std::size_t
>(n_links);
120 auto us =
static_cast<std::size_t
>(n_subcatches);
121 auto ug =
static_cast<std::size_t
>(n_gages);
122 auto unp =
static_cast<std::size_t
>(n_nodes) *
123 static_cast<std::size_t
>(n_pollutants);
162 auto set_none = [](
auto& mode_vec) {
183 auto clear_resets = [](
auto& mode_vec,
const auto& persist_vec) {
184 for (std::size_t i = 0; i < mode_vec.size(); ++i) {
Definition Controls.cpp:24
ForcingPersist
Definition ForcingData.hpp:43
@ PERSIST
Keep until explicitly cleared.
@ RESET
Auto-clear after each timestep.
ForcingMode
Definition ForcingData.hpp:37
@ OVERRIDE
Replace computed value with user value.
@ ADD
Add user value to computed value.
@ NONE
Use model-computed value (no forcing)
Definition ForcingData.hpp:52
void clear_reset_entries()
Clear only RESET-persistence entries (called at end of each step).
Definition ForcingData.hpp:182
std::vector< double > subcatch_rainfall_value
user units (in/hr or mm/hr)
Definition ForcingData.hpp:82
std::vector< ForcingMode > node_lat_inflow_mode
Definition ForcingData.hpp:56
void resize(int n_nodes, int n_links, int n_subcatches, int n_gages, int n_pollutants)
Allocate all arrays and initialise to NONE / 0 / RESET.
Definition ForcingData.hpp:110
std::vector< double > link_setting_value
0.0–1.0 for pump/orifice/weir
Definition ForcingData.hpp:76
std::vector< ForcingMode > gage_rainfall_mode
Definition ForcingData.hpp:91
int n_pollutants_
Definition ForcingData.hpp:101
std::vector< ForcingPersist > subcatch_evap_persist
Definition ForcingData.hpp:87
void clear_all()
Reset ALL forcing modes to NONE (called on simulation restart).
Definition ForcingData.hpp:161
int n_links_
Definition ForcingData.hpp:98
std::vector< double > node_lat_inflow_value
Definition ForcingData.hpp:57
std::vector< ForcingMode > subcatch_rainfall_mode
Definition ForcingData.hpp:81
std::vector< double > subcatch_evap_value
ft/sec (internal units)
Definition ForcingData.hpp:86
int n_subcatches_
Definition ForcingData.hpp:99
std::vector< ForcingMode > link_setting_mode
Definition ForcingData.hpp:75
std::vector< ForcingMode > node_quality_mode
Definition ForcingData.hpp:65
std::vector< double > gage_rainfall_value
user units (in/hr or mm/hr)
Definition ForcingData.hpp:92
std::vector< ForcingPersist > gage_rainfall_persist
Definition ForcingData.hpp:93
std::vector< ForcingPersist > link_flow_persist
Definition ForcingData.hpp:73
std::vector< double > link_flow_value
Definition ForcingData.hpp:72
std::vector< ForcingPersist > node_lat_inflow_persist
Definition ForcingData.hpp:58
std::vector< ForcingMode > link_flow_mode
Definition ForcingData.hpp:71
std::vector< ForcingMode > node_head_boundary_mode
Definition ForcingData.hpp:60
std::vector< ForcingPersist > node_quality_persist
Definition ForcingData.hpp:67
std::vector< ForcingPersist > subcatch_rainfall_persist
Definition ForcingData.hpp:83
std::vector< ForcingPersist > node_head_boundary_persist
Definition ForcingData.hpp:62
std::vector< ForcingPersist > link_setting_persist
Definition ForcingData.hpp:77
std::vector< double > node_head_boundary_value
Definition ForcingData.hpp:61
int n_gages_
Definition ForcingData.hpp:100
std::vector< ForcingMode > subcatch_evap_mode
Definition ForcingData.hpp:85
int n_nodes_
Definition ForcingData.hpp:97
std::vector< double > node_quality_value
mass rate (mass/sec)
Definition ForcingData.hpp:66