16#ifndef OPENSWMM_ENGINE_2D_SURFACE_STATE_DATA_HPP
17#define OPENSWMM_ENGINE_2D_SURFACE_STATE_DATA_HPP
86 void resize(
int n_triangles,
int n_vertices) {
87 auto nt =
static_cast<std::size_t
>(n_triangles);
88 auto nv =
static_cast<std::size_t
>(n_vertices);
91 depth.assign(nt, 0.0);
117 depth.size() *
sizeof(
double));
141 double dt)
noexcept {
142 for (std::size_t i = 0; i <
depth.size(); ++i) {
Definition NodeCoupling.cpp:15
SoA storage for 2D surface routing state variables.
Definition SurfaceStateData.hpp:32
std::vector< double > grad_hy_lim
Limited gradient Y.
Definition SurfaceStateData.hpp:45
std::vector< double > grad_hy
∂h/∂y (unlimited gradient)
Definition SurfaceStateData.hpp:43
void save_state() noexcept
Definition SurfaceStateData.hpp:115
std::vector< int8_t > coupling_forced
0=computed, 1=override, 2=add
Definition SurfaceStateData.hpp:65
std::vector< double > coupling_flux
Exchange with SWMM node (m/s, + = into 2D)
Definition SurfaceStateData.hpp:55
std::vector< int8_t > rainfall_forced
0=computed, 1=override, 2=add
Definition SurfaceStateData.hpp:62
std::vector< double > stat_max_depth
Maximum depth seen at each cell.
Definition SurfaceStateData.hpp:79
std::vector< double > net_source
Net source/sink per cell (m/s)
Definition SurfaceStateData.hpp:56
std::vector< double > rainfall_force_val
Forced rainfall value.
Definition SurfaceStateData.hpp:64
std::vector< double > stat_cum_volume
Cumulative volume through cell.
Definition SurfaceStateData.hpp:80
void clear_reset_forcings() noexcept
Clear RESET forcings after each step.
Definition SurfaceStateData.hpp:126
std::vector< double > depth
Overland flow depth ψ_o (m)
Definition SurfaceStateData.hpp:38
void update_statistics(const std::vector< double > &tri_area, double dt) noexcept
Update cumulative statistics.
Definition SurfaceStateData.hpp:140
std::vector< double > grad_hx
∂h/∂x (unlimited gradient)
Definition SurfaceStateData.hpp:42
std::vector< double > rainfall
Rainfall intensity (m/s)
Definition SurfaceStateData.hpp:54
std::vector< double > coupling_force_val
Forced coupling value.
Definition SurfaceStateData.hpp:67
std::vector< double > vert_head
Head reconstructed at vertices.
Definition SurfaceStateData.hpp:48
void reset_state() noexcept
Definition SurfaceStateData.hpp:120
std::vector< double > head
Total head h_o = z_s + ψ_o (m)
Definition SurfaceStateData.hpp:39
std::vector< double > grad_hx_lim
Limited gradient X.
Definition SurfaceStateData.hpp:44
std::vector< int8_t > coupling_persist
0=reset, 1=persist
Definition SurfaceStateData.hpp:66
void resize(int n_triangles, int n_vertices)
Definition SurfaceStateData.hpp:86
std::vector< double > old_depth
Depth at start of coupling interval.
Definition SurfaceStateData.hpp:73
std::vector< int8_t > rainfall_persist
0=reset, 1=persist
Definition SurfaceStateData.hpp:63
std::vector< double > edge_flux
Normal flux through each edge.
Definition SurfaceStateData.hpp:51