44#ifndef OPENSWMM_ENGINE_FV_NETWORK_MESH_DATA_HPP
45#define OPENSWMM_ENGINE_FV_NETWORK_MESH_DATA_HPP
198 for (
int f = 0; f <
n_faces(); ++f) {
199 const auto uf =
static_cast<std::size_t
>(f);
571 void resize(
int n_cells,
int n_nodes,
int n_species_in) {
572 const auto nc =
static_cast<std::size_t
>(n_cells);
573 const auto nn =
static_cast<std::size_t
>(n_nodes);
583 cell_phi.assign(
nc *
static_cast<std::size_t
>(n_species_in), 0.0);
The explicit-FV cross-section closure as a single-source POD kernel: one monotone cubic-Hermite table...
Portable scalar closures shared by the host solvers and the device backend: FHWA HEC-5 culvert inlet ...
Cross-section geometry — unified batch + per-element API.
Portable cross-section geometry kernels — one implementation, three consumers (host dynamic wave,...
Definition AcceptedWaterVolumes.hpp:8
@ kNodeJunction
Definition NetworkMeshData.hpp:509
@ kNodeOutfall
Definition NetworkMeshData.hpp:509
@ kNodeVirtual
Definition NetworkMeshData.hpp:509
@ kNodeStorage
Definition NetworkMeshData.hpp:509
constexpr int kNodeVolSamples
Samples in a STORAGE node's flattened depth→volume table.
Definition NetworkMeshData.hpp:58
Definition NodeCoupling2D.cpp:23
Native cross-section geometry and borrowed optional normalized transect tables.
Definition XSectBatch.hpp:119
One section's closure. Fixed-size POD: inline arrays, no pointers.
Definition FvClosureKernels.hpp:89
Cross-section closure for one conduit's cell chain.
Definition NetworkMeshData.hpp:71
double r_full
hydraulic radius when full (ft)
Definition NetworkMeshData.hpp:77
double a_full
area when full (ft²)
Definition NetworkMeshData.hpp:75
double t_slot
Definition NetworkMeshData.hpp:90
uint8_t is_open
open section: no crown, no slot taper
Definition NetworkMeshData.hpp:100
double i1_crown
I₁(y_full) — the table's last entry, cached for the same reason.
Definition NetworkMeshData.hpp:98
double barrel_scale
Definition NetworkMeshData.hpp:81
double y_crown
Definition NetworkMeshData.hpp:86
double a_crown
Definition NetworkMeshData.hpp:95
double y_full
full depth (ft)
Definition NetworkMeshData.hpp:74
FvClosure closure_tbl
Definition NetworkMeshData.hpp:117
double w_max
width at widest point (ft)
Definition NetworkMeshData.hpp:76
int barrels
parallel identical barrels
Definition NetworkMeshData.hpp:102
XSectParams xs
copied scalars; transect/profile table pointers remain borrowed
Definition NetworkMeshData.hpp:72
SoA mesh geometry and topology for the FV network solver.
Definition NetworkMeshData.hpp:123
std::vector< int > cell_geom
index into geom
Definition NetworkMeshData.hpp:129
std::vector< int > conduit_section
index into geom (shared section block)
Definition NetworkMeshData.hpp:264
std::vector< double > node_sur_depth
SURCHARGE_DEPTH above the rim (ft)
Definition NetworkMeshData.hpp:361
std::vector< double > node_ponded_area
ponding area above the rim (ft²)
Definition NetworkMeshData.hpp:360
std::vector< int8_t > face_dir_r
Definition NetworkMeshData.hpp:233
std::vector< double > face_zb
bed elevation at the interface (ft)
Definition NetworkMeshData.hpp:219
int n_faces() const noexcept
Return the logical faces count from its owning vector.
Definition NetworkMeshData.hpp:420
std::vector< double > node_face_sign
+1 flux ENTERS the node, −1 leaves it
Definition NetworkMeshData.hpp:347
std::vector< double > node_full_depth
crown / rim depth (ft)
Definition NetworkMeshData.hpp:359
std::vector< int > face_cr
right cell (-1 ⇒ node on the right)
Definition NetworkMeshData.hpp:162
std::vector< double > node_area
Definition NetworkMeshData.hpp:379
std::vector< double > conduit_loss_outlet
exit loss coefficient K
Definition NetworkMeshData.hpp:272
std::vector< int > conduit_cell_count
cells in conduit row r
Definition NetworkMeshData.hpp:262
std::vector< double > node_face_zb
Definition NetworkMeshData.hpp:352
std::vector< uint8_t > struct_is_dummy
Definition NetworkMeshData.hpp:330
std::vector< int > cell_face0
Definition NetworkMeshData.hpp:147
std::vector< int8_t > cell_side1
Definition NetworkMeshData.hpp:150
std::vector< uint8_t > face_virtual
Definition NetworkMeshData.hpp:238
std::vector< int > cell_conduit
ConduitData row (for reporting)
Definition NetworkMeshData.hpp:130
std::vector< int > node_face_idx
face indices
Definition NetworkMeshData.hpp:346
std::vector< int > struct_n1
upstream node
Definition NetworkMeshData.hpp:325
std::vector< double > node_vol_atop
surface area above dmax (ft²)
Definition NetworkMeshData.hpp:394
std::vector< double > cell_dzdx
Definition NetworkMeshData.hpp:140
std::vector< double > cell_dx
cell length (ft)
Definition NetworkMeshData.hpp:131
std::vector< int > struct_n2
downstream node
Definition NetworkMeshData.hpp:326
std::vector< int > conduit_link
base LinkData index of conduit row r
Definition NetworkMeshData.hpp:263
std::vector< hydkernels::CulvertCurve > conduit_culvert_curve
Definition NetworkMeshData.hpp:277
int n_chains() const noexcept
Return the logical chains count from its owning vector.
Definition NetworkMeshData.hpp:305
std::vector< int > cell_chain
chain of each cell
Definition NetworkMeshData.hpp:295
std::vector< int > face_cl
left cell (-1 ⇒ node on the left)
Definition NetworkMeshData.hpp:161
std::vector< int > conduit_culvert_code
Definition NetworkMeshData.hpp:274
std::vector< int > cell_chain_pos
position within that chain
Definition NetworkMeshData.hpp:296
void deriveFaceGeom()
Populate missing face section indices from adjacent cell geometry.
Definition NetworkMeshData.hpp:194
std::vector< double > node_vol_dmax
depth at the table top (ft)
Definition NetworkMeshData.hpp:393
std::vector< double > conduit_loss_inlet
entrance loss coefficient K
Definition NetworkMeshData.hpp:271
std::vector< double > node_invert
invert elevation (ft)
Definition NetworkMeshData.hpp:358
std::vector< int > conduit_cell_begin
first cell of conduit row r
Definition NetworkMeshData.hpp:261
int n_nodes() const noexcept
Return the logical nodes count from its owning vector.
Definition NetworkMeshData.hpp:427
std::vector< double > conduit_roughness
Manning n.
Definition NetworkMeshData.hpp:269
int n_conduits() const noexcept
Return the logical conduits count from its owning vector.
Definition NetworkMeshData.hpp:434
std::vector< int > face_node
coupled node (-1 for interior faces)
Definition NetworkMeshData.hpp:163
std::vector< double > face_dx
centre-to-centre distance (ft)
Definition NetworkMeshData.hpp:220
std::vector< int8_t > cell_side0
Definition NetworkMeshData.hpp:149
std::vector< int > chain_cells
cell indices in walk order
Definition NetworkMeshData.hpp:293
std::vector< int > node_vol_off
offset into node_vol_tbl, −1 = none
Definition NetworkMeshData.hpp:392
std::vector< double > conduit_rough_factor
g·(n/PHI)² — friction denominator factor
Definition NetworkMeshData.hpp:270
std::vector< double > conduit_slope
bed slope the HEC-5 equations need
Definition NetworkMeshData.hpp:273
std::vector< int > face_vj_node
Definition NetworkMeshData.hpp:246
void clear()
Remove every mesh/topology/geometry entry while retaining vector capacities.
Definition NetworkMeshData.hpp:444
std::vector< uint8_t > conduit_culvert_mitered
Definition NetworkMeshData.hpp:278
std::vector< int8_t > face_dir_l
Definition NetworkMeshData.hpp:232
std::vector< uint8_t > node_kind
Definition NetworkMeshData.hpp:370
std::vector< int > face_culvert
Definition NetworkMeshData.hpp:218
std::vector< uint8_t > node_can_pond
Definition NetworkMeshData.hpp:366
std::vector< int > struct_link
LinkData index.
Definition NetworkMeshData.hpp:324
std::vector< uint8_t > face_gate
Definition NetworkMeshData.hpp:213
std::vector< double > node_vol_tbl
kNodeVolSamples volumes per node
Definition NetworkMeshData.hpp:395
std::vector< int > face_geom
index into geom
Definition NetworkMeshData.hpp:183
std::vector< int > node_face_ptr
[n_nodes + 1] row pointers
Definition NetworkMeshData.hpp:345
int n_cells() const noexcept
Return the logical cells count from its owning vector.
Definition NetworkMeshData.hpp:413
std::vector< int > node_vj_face
Definition NetworkMeshData.hpp:254
std::vector< int > cell_face1
Definition NetworkMeshData.hpp:148
std::vector< FvGeometry > geom
Definition NetworkMeshData.hpp:401
std::vector< int > chain_ptr
[n_chains + 1] row pointers
Definition NetworkMeshData.hpp:292
std::vector< int8_t > chain_dir
cell axis vs. chain direction (±1)
Definition NetworkMeshData.hpp:294
std::vector< double > cell_zb
bed elevation at cell centre (ft)
Definition NetworkMeshData.hpp:132
std::vector< uint8_t > node_dummy_drain
Definition NetworkMeshData.hpp:337
Mutable solver state — the conserved variables and the node volumes.
Definition NetworkMeshData.hpp:519
std::vector< double > cell_q
discharge (cfs)
Definition NetworkMeshData.hpp:523
std::vector< double > node_head
water-surface elevation (ft)
Definition NetworkMeshData.hpp:533
std::vector< double > cell_phi
Definition NetworkMeshData.hpp:543
std::vector< double > cell_h
depth (ft)
Definition NetworkMeshData.hpp:527
int n_species
Definition NetworkMeshData.hpp:544
std::vector< uint8_t > cell_tpa
Definition NetworkMeshData.hpp:555
std::vector< double > cell_a
flow area (ft²)
Definition NetworkMeshData.hpp:522
std::vector< double > node_surf_area
storage area used this routing step (ft²)
Definition NetworkMeshData.hpp:534
std::vector< double > node_volume
stored volume (ft³)
Definition NetworkMeshData.hpp:532
std::vector< double > node_overflow
flooding rate this substep (cfs)
Definition NetworkMeshData.hpp:535
std::vector< double > node_overflow_vol
Definition NetworkMeshData.hpp:539
void resize(int n_cells, int n_nodes, int n_species_in)
Reset conserved, derived and transport arrays to requested zero-filled dimensions.
Definition NetworkMeshData.hpp:571