OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
LidLayerCommon.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2//
3// Copyright 2026 Caleb Buahin
4//
5// Licensed under the Apache License, Version 2.0 (the "License");
6// you may not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8//
9// http://www.apache.org/licenses/LICENSE-2.0
10//
11// Unless required by applicable law or agreed to in writing, software
12// distributed under the License is distributed on an "AS IS" BASIS,
13// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14// See the License for the specific language governing permissions and
15// limitations under the License.
16
46
47#ifndef OPENSWMM_ENGINE_TRANSPORT_LID_LAYER_COMMON_HPP
48#define OPENSWMM_ENGINE_TRANSPORT_LID_LAYER_COMMON_HPP
49
50#include <vector>
51
54
55namespace openswmm::transport {
56
58
60constexpr int kExternal = -1;
61constexpr int kAbsent = -2;
62
63constexpr int kSurf = static_cast<int>(LidLayer::SURFACE);
64constexpr int kPave = static_cast<int>(LidLayer::PAVEMENT);
65constexpr int kSoil = static_cast<int>(LidLayer::SOIL);
66constexpr int kStor = static_cast<int>(LidLayer::STORAGE);
67
72struct Donors {
74};
75
76Donors donorsFor(lid::LIDType t, bool has_soil);
77
80void layerVolumes(const lid::LIDGroupSoA& g, std::size_t ui, double (&v)[kNL]);
81
83std::vector<int> buildOffsets(const lid::LIDSolver& solver);
84
85} // namespace openswmm::transport
86
87#endif // OPENSWMM_ENGINE_TRANSPORT_LID_LAYER_COMMON_HPP
Low Impact Development (LID) control modules.
Phase A4 — per-(LID unit, layer, species) transported state.
Definition LID.hpp:316
LIDType
Definition LID.hpp:69
Definition ExplicitFvSolver.hpp:53
constexpr int kPave
Definition LidLayerCommon.hpp:64
constexpr int kSoil
Definition LidLayerCommon.hpp:65
constexpr int kNL
Definition LidLayerCommon.hpp:57
std::vector< int > buildOffsets(const lid::LIDSolver &solver)
Build flattened conventional-LID group/unit prefix offsets.
Definition LidLayerCommon.cpp:94
constexpr int kStor
Definition LidLayerCommon.hpp:66
void layerVolumes(const lid::LIDGroupSoA &g, std::size_t ui, double(&v)[kNL])
Void-weighted water held in each layer, as a depth per unit area (ft). The four terms are exactly tho...
Definition LidLayerCommon.cpp:81
constexpr int kAbsent
Definition LidLayerCommon.hpp:61
constexpr int kSurf
Definition LidLayerCommon.hpp:63
constexpr int kExternal
-1 means "external to the unit"; -2 means "this type has no such layer".
Definition LidLayerCommon.hpp:60
Donors donorsFor(lid::LIDType t, bool has_soil)
Resolve immediate inflow donors/physical vertical adjacency for each LID layer.
Definition LidLayerCommon.cpp:39
@ PAVEMENT
Definition LidLayerSpeciesData.hpp:52
@ SURFACE
Definition LidLayerSpeciesData.hpp:52
@ SOIL
Definition LidLayerSpeciesData.hpp:52
@ STORAGE
Definition LidLayerSpeciesData.hpp:52
static constexpr int kLayerCount
Definition LidLayerSpeciesData.hpp:100
Definition LID.hpp:128
Definition LidLayerCommon.hpp:72
int pavement
Definition LidLayerCommon.hpp:73
int soil
Definition LidLayerCommon.hpp:73
int storage
Definition LidLayerCommon.hpp:73
int surface
Definition LidLayerCommon.hpp:73