44#ifndef OPENSWMM_ENGINE_FV_NETWORK_MESH_DATA_HPP
45#define OPENSWMM_ENGINE_FV_NETWORK_MESH_DATA_HPP
251 for (
int f = 0; f <
n_faces(); ++f) {
252 const auto uf =
static_cast<std::size_t
>(f);
255 static_cast<std::size_t
>(c) <
cell_geom.size())
256 ?
cell_geom[
static_cast<std::size_t
>(c)] : 0;
527 void resize(
int n_cells,
int n_nodes,
int n_species_in) {
528 const auto nc =
static_cast<std::size_t
>(n_cells);
529 const auto nn =
static_cast<std::size_t
>(n_nodes);
539 cell_phi.assign(nc *
static_cast<std::size_t
>(n_species_in), 0.0);
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 ExplicitFvSolver.cpp:25
@ kNodeJunction
Definition NetworkMeshData.hpp:475
@ kNodeOutfall
Definition NetworkMeshData.hpp:478
@ kNodeVirtual
Definition NetworkMeshData.hpp:476
@ kNodeStorage
Definition NetworkMeshData.hpp:477
constexpr int kI1Samples
Definition NetworkMeshData.hpp:61
constexpr int kNodeVolSamples
Samples in a STORAGE node's flattened depth→volume table.
Definition NetworkMeshData.hpp:64
Definition XSectBatch.hpp:110
Cross-section closure for one conduit's cell chain.
Definition NetworkMeshData.hpp:77
double r_full
hydraulic radius when full (ft)
Definition NetworkMeshData.hpp:91
const xsect::XsectEval * eval
Definition NetworkMeshData.hpp:86
double rough_factor
g·(n/PHI)² — friction denominator factor
Definition NetworkMeshData.hpp:119
double a_full
area when full (ft²)
Definition NetworkMeshData.hpp:89
double t_slot
Definition NetworkMeshData.hpp:104
double slope
Definition NetworkMeshData.hpp:129
uint8_t is_open
open section: no crown, no slot taper
Definition NetworkMeshData.hpp:114
double i1_crown
I₁(y_full) — the table's last entry, cached for the same reason.
Definition NetworkMeshData.hpp:112
double h_tbl[kI1Samples]
Definition NetworkMeshData.hpp:169
double barrel_scale
Definition NetworkMeshData.hpp:95
double i1_tbl[2 *kI1Samples]
Definition NetworkMeshData.hpp:152
double roughness
Manning n.
Definition NetworkMeshData.hpp:118
double y_crown
Definition NetworkMeshData.hpp:100
hydkernels::CulvertCurve culvert_curve
Definition NetworkMeshData.hpp:135
uint8_t culvert_mitered
Definition NetworkMeshData.hpp:136
double loss_inlet
entrance loss coefficient K
Definition NetworkMeshData.hpp:120
double a_crown
Definition NetworkMeshData.hpp:109
double y_full
full depth (ft)
Definition NetworkMeshData.hpp:88
double w_max
width at widest point (ft)
Definition NetworkMeshData.hpp:90
int barrels
parallel identical barrels
Definition NetworkMeshData.hpp:123
double loss_outlet
exit loss coefficient K
Definition NetworkMeshData.hpp:121
int culvert_code
Definition NetworkMeshData.hpp:128
XSectParams xs
section parameters (owns transect table ptrs)
Definition NetworkMeshData.hpp:78
SoA mesh geometry and topology for the FV network solver.
Definition NetworkMeshData.hpp:176
std::vector< int > cell_geom
index into geom
Definition NetworkMeshData.hpp:182
std::vector< double > node_sur_depth
SURCHARGE_DEPTH above the rim (ft)
Definition NetworkMeshData.hpp:392
std::vector< double > node_ponded_area
ponding area above the rim (ft²)
Definition NetworkMeshData.hpp:391
std::vector< int8_t > face_dir_r
Definition NetworkMeshData.hpp:286
std::vector< double > face_zb
bed elevation at the interface (ft)
Definition NetworkMeshData.hpp:272
int n_faces() const noexcept
Definition NetworkMeshData.hpp:439
std::vector< double > node_face_sign
+1 flux ENTERS the node, −1 leaves it
Definition NetworkMeshData.hpp:378
std::vector< double > node_full_depth
crown / rim depth (ft)
Definition NetworkMeshData.hpp:390
std::vector< int > face_cr
right cell (-1 ⇒ node on the right)
Definition NetworkMeshData.hpp:215
std::vector< double > node_area
Definition NetworkMeshData.hpp:410
std::vector< int > conduit_cell_count
cells in conduit row r
Definition NetworkMeshData.hpp:315
std::vector< double > node_face_zb
Definition NetworkMeshData.hpp:383
std::vector< uint8_t > struct_is_dummy
Definition NetworkMeshData.hpp:361
std::vector< int > cell_face0
Definition NetworkMeshData.hpp:200
std::vector< int8_t > cell_side1
Definition NetworkMeshData.hpp:203
std::vector< uint8_t > face_virtual
Definition NetworkMeshData.hpp:291
std::vector< int > cell_conduit
ConduitData row (for reporting)
Definition NetworkMeshData.hpp:183
std::vector< int > node_face_idx
face indices
Definition NetworkMeshData.hpp:377
std::vector< int > struct_n1
upstream node
Definition NetworkMeshData.hpp:356
std::vector< double > node_vol_atop
surface area above dmax (ft²)
Definition NetworkMeshData.hpp:425
std::vector< double > cell_dzdx
Definition NetworkMeshData.hpp:193
std::vector< double > cell_dx
cell length (ft)
Definition NetworkMeshData.hpp:184
std::vector< int > struct_n2
downstream node
Definition NetworkMeshData.hpp:357
std::vector< int > conduit_link
base LinkData index of conduit row r
Definition NetworkMeshData.hpp:316
int n_chains() const noexcept
Definition NetworkMeshData.hpp:336
std::vector< int > cell_chain
chain of each cell
Definition NetworkMeshData.hpp:333
std::vector< int > face_cl
left cell (-1 ⇒ node on the left)
Definition NetworkMeshData.hpp:214
std::vector< int > cell_chain_pos
position within that chain
Definition NetworkMeshData.hpp:334
void deriveFaceGeom()
Definition NetworkMeshData.hpp:248
std::vector< double > node_vol_dmax
depth at the table top (ft)
Definition NetworkMeshData.hpp:424
std::vector< double > node_invert
invert elevation (ft)
Definition NetworkMeshData.hpp:389
std::vector< int > conduit_cell_begin
first cell of conduit row r
Definition NetworkMeshData.hpp:314
int n_nodes() const noexcept
Definition NetworkMeshData.hpp:440
int n_conduits() const noexcept
Definition NetworkMeshData.hpp:441
std::vector< int > face_node
coupled node (-1 for interior faces)
Definition NetworkMeshData.hpp:216
std::vector< double > face_dx
centre-to-centre distance (ft)
Definition NetworkMeshData.hpp:273
std::vector< int8_t > cell_side0
Definition NetworkMeshData.hpp:202
std::vector< int > chain_cells
cell indices in walk order
Definition NetworkMeshData.hpp:331
std::vector< int > node_vol_off
offset into node_vol_tbl, −1 = none
Definition NetworkMeshData.hpp:423
std::vector< int > face_vj_node
Definition NetworkMeshData.hpp:299
void clear()
Definition NetworkMeshData.hpp:445
std::vector< int8_t > face_dir_l
Definition NetworkMeshData.hpp:285
std::vector< uint8_t > node_kind
Definition NetworkMeshData.hpp:401
std::vector< int > face_culvert
Definition NetworkMeshData.hpp:271
std::vector< uint8_t > node_can_pond
Definition NetworkMeshData.hpp:397
std::vector< int > struct_link
LinkData index.
Definition NetworkMeshData.hpp:355
std::vector< uint8_t > face_gate
Definition NetworkMeshData.hpp:266
std::vector< double > node_vol_tbl
kNodeVolSamples volumes per node
Definition NetworkMeshData.hpp:426
std::vector< int > face_geom
index into geom
Definition NetworkMeshData.hpp:236
std::vector< int > node_face_ptr
[n_nodes + 1] row pointers
Definition NetworkMeshData.hpp:376
int n_cells() const noexcept
Definition NetworkMeshData.hpp:438
std::vector< int > node_vj_face
Definition NetworkMeshData.hpp:307
std::vector< int > cell_face1
Definition NetworkMeshData.hpp:201
std::vector< FvGeometry > geom
Definition NetworkMeshData.hpp:432
std::vector< int > chain_ptr
[n_chains + 1] row pointers
Definition NetworkMeshData.hpp:330
std::vector< int8_t > chain_dir
cell axis vs. chain direction (±1)
Definition NetworkMeshData.hpp:332
std::vector< double > cell_zb
bed elevation at cell centre (ft)
Definition NetworkMeshData.hpp:185
std::vector< uint8_t > node_dummy_drain
Definition NetworkMeshData.hpp:368
Mutable solver state — the conserved variables and the node volumes.
Definition NetworkMeshData.hpp:489
std::vector< double > cell_q
discharge (cfs)
Definition NetworkMeshData.hpp:493
std::vector< double > node_head
water-surface elevation (ft)
Definition NetworkMeshData.hpp:503
std::vector< double > cell_phi
Definition NetworkMeshData.hpp:513
std::vector< double > cell_h
depth (ft)
Definition NetworkMeshData.hpp:497
int n_species
Definition NetworkMeshData.hpp:514
std::vector< uint8_t > cell_tpa
Definition NetworkMeshData.hpp:525
std::vector< double > cell_a
flow area (ft²)
Definition NetworkMeshData.hpp:492
std::vector< double > node_surf_area
storage area used this routing step (ft²)
Definition NetworkMeshData.hpp:504
std::vector< double > node_volume
stored volume (ft³)
Definition NetworkMeshData.hpp:502
std::vector< double > node_overflow
flooding rate this substep (cfs)
Definition NetworkMeshData.hpp:505
std::vector< double > node_overflow_vol
Definition NetworkMeshData.hpp:509
void resize(int n_cells, int n_nodes, int n_species_in)
Definition NetworkMeshData.hpp:527
Inlet-control curve coefficients for one culvert type code.
Definition HydClosureKernels.hpp:110
The geometry layer itself, parameterized on where its tables live.
Definition XSectKernels.hpp:328