OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
NetworkMeshBuilder.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
35
36#ifndef OPENSWMM_ENGINE_FV_NETWORK_MESH_BUILDER_HPP
37#define OPENSWMM_ENGINE_FV_NETWORK_MESH_BUILDER_HPP
38
39#include <string>
40#include <vector>
41
42#include "FvOptions.hpp"
43#include "NetworkMeshData.hpp"
44
45namespace openswmm {
47}
48
49namespace openswmm::fv {
50
54 int n_cells = 0;
55 int n_faces = 0;
56 int n_conduits = 0;
57 int n_virtual = 0;
58 double min_dx = 0.0;
59 double max_dx = 0.0;
60 std::vector<std::string> warnings;
61 std::vector<std::string> errors;
62};
63
76 const FvOptions& opts,
77 NetworkMeshData& mesh);
78
89void buildGeometry(const XSectParams& xs, bool is_open, double slot_celerity,
90 FvGeometry& g, int barrels = 1);
91
92} // namespace openswmm::fv
93
94#endif // OPENSWMM_ENGINE_FV_NETWORK_MESH_BUILDER_HPP
Option struct for the explicit finite-volume 1D network solver.
SoA storage for the 1D finite-volume network mesh and its state.
Definition ExplicitFvSolver.cpp:25
MeshBuildReport buildNetworkMesh(SimulationContext &ctx, const FvOptions &opts, NetworkMeshData &mesh)
Build the cell/face mesh and the per-conduit geometry closures.
Definition NetworkMeshBuilder.cpp:140
void buildGeometry(const XSectParams &xs, bool is_open, double slot_celerity, FvGeometry &g, int barrels)
Populate one conduit's cross-section closure, including the tapered Preissmann slot and the first-mom...
Definition NetworkMeshBuilder.cpp:91
Definition NodeCoupling.cpp:16
Central, reentrant simulation context.
Definition SimulationContext.hpp:353
Definition XSectBatch.hpp:110
Cross-section closure for one conduit's cell chain.
Definition NetworkMeshData.hpp:77
Knobs for FLOW_ROUTING FV.
Definition FvOptions.hpp:123
Definition NetworkMeshBuilder.hpp:53
int n_conduits
Definition NetworkMeshBuilder.hpp:56
double max_dx
Definition NetworkMeshBuilder.hpp:59
int n_virtual
virtual junctions spliced into interior faces
Definition NetworkMeshBuilder.hpp:57
std::vector< std::string > errors
Definition NetworkMeshBuilder.hpp:61
double min_dx
Definition NetworkMeshBuilder.hpp:58
int n_faces
Definition NetworkMeshBuilder.hpp:55
std::vector< std::string > warnings
Definition NetworkMeshBuilder.hpp:60
int n_cells
Definition NetworkMeshBuilder.hpp:54
SoA mesh geometry and topology for the FV network solver.
Definition NetworkMeshData.hpp:176