OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
LidLayerCommon.hpp File Reference

LID layer topology and geometry, shared by every species track. More...

#include <vector>
#include "../../data/LidLayerSpeciesData.hpp"
#include "../../hydrology/LID.hpp"
Include dependency graph for LidLayerCommon.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  openswmm::transport::Donors
 

Namespaces

namespace  openswmm
 
namespace  openswmm::transport
 

Functions

Donors openswmm::transport::donorsFor (lid::LIDType t, bool has_soil)
 
void openswmm::transport::layerVolumes (const lid::LIDGroupSoA &g, std::size_t ui, double(&v)[kNL])
 
std::vector< int > openswmm::transport::buildOffsets (const lid::LIDSolver &solver)
 Flat index of each per-type group's first unit; back() == n_units.
 

Variables

constexpr int openswmm::transport::kNL = LidLayerSpeciesState::kLayerCount
 
constexpr int openswmm::transport::kExternal = -1
 -1 means "external to the unit"; -2 means "this type has no such layer".
 
constexpr int openswmm::transport::kAbsent = -2
 
constexpr int openswmm::transport::kSurf = static_cast<int>(LidLayer::SURFACE)
 
constexpr int openswmm::transport::kPave = static_cast<int>(LidLayer::PAVEMENT)
 
constexpr int openswmm::transport::kSoil = static_cast<int>(LidLayer::SOIL)
 
constexpr int openswmm::transport::kStor = static_cast<int>(LidLayer::STORAGE)
 

Detailed Description

LID layer topology and geometry, shared by every species track.

A4 wrote these as file-local helpers in WaterAgeLid.cpp, when age was the only species. H5b adds temperature and needs the same three facts: which layer feeds which, how much water each holds, and how the per-type groups flatten to unit indices.

They are extracted rather than copied. Copies of exactly this kind of shared expression are what let RadiativeExchange acquire its own element traversal and thereby its own copy of H2's divergence (D-H5e, lesson 81) — and the donor map is worse to duplicate than a traversal, because it encodes eight hand-checked per-type stacks.

The donor map is also the PHYSICAL adjacency
For a vertical stack, "which layer feeds which" and "which layers touch" are the same relation. H5b's conduction term therefore reads this map rather than introducing a second stacking table that could disagree with it.
See also
src/engine/data/LidLayerSpeciesData.hpp
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n Apache-2.0