OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
openswmm::twoD::MeshData Struct Reference

SoA storage for 2D triangular mesh geometry and topology. More...

#include <MeshData.hpp>

Collaboration diagram for openswmm::twoD::MeshData:

Public Member Functions

int n_vertices () const noexcept
 
int n_triangles () const noexcept
 
void resize_vertices (int nv)
 
void resize_triangles (int nt)
 

Public Attributes

std::vector< double > vx
 Vertex X coordinate.
 
std::vector< double > vy
 Vertex Y coordinate.
 
std::vector< double > vz
 Vertex Z (ground elevation)
 
std::vector< std::string > vtag
 Optional vertex tag.
 
std::vector< int > tri_v0
 Vertex 0 index.
 
std::vector< int > tri_v1
 Vertex 1 index.
 
std::vector< int > tri_v2
 Vertex 2 index.
 
std::vector< int > tri_nbr0
 Neighbour across edge opposite v0.
 
std::vector< int > tri_nbr1
 Neighbour across edge opposite v1.
 
std::vector< int > tri_nbr2
 Neighbour across edge opposite v2.
 
std::vector< double > tri_area
 Planimetric area (m²)
 
std::vector< double > tri_cx
 Centroid X.
 
std::vector< double > tri_cy
 Centroid Y.
 
std::vector< double > tri_cz
 Centroid Z (avg of vertex elevations)
 
std::vector< double > edge_length
 Length of each edge.
 
std::vector< double > edge_nx
 Outward normal X component.
 
std::vector< double > edge_ny
 Outward normal Y component.
 
std::vector< double > edge_mx
 Edge midpoint X.
 
std::vector< double > edge_my
 Edge midpoint Y.
 
std::vector< double > edge_mz
 Edge midpoint Z (interpolated)
 
std::vector< double > mannings_n
 Manning's roughness coefficient.
 
std::vector< std::string > tri_tag
 Optional triangle tag.
 
std::vector< int > vert_stencil_ptr
 [n_vertices + 1] row pointers
 
std::vector< int > vert_stencil_idx
 Column indices (triangle indices)
 
std::vector< double > vert_stencil_wt
 Pseudo-Laplacian weights.
 
std::vector< int > vert_coupled_node
 SWMM node index (-1 = none)
 
std::vector< int > tri_coupled_node
 SWMM node index (-1 = none)
 
std::vector< double > vert_coupling_cd
 Discharge coefficient (default 0.65)
 
std::vector< double > vert_coupling_area
 Effective exchange area (m²)
 
std::vector< double > tri_coupling_cd
 Discharge coefficient.
 
std::vector< double > tri_coupling_area
 Effective exchange area.
 
std::vector< std::string > vert_coupled_node_name
 
std::vector< std::string > tri_coupled_node_name
 

Detailed Description

SoA storage for 2D triangular mesh geometry and topology.

All vertex arrays are indexed by vertex index [0, n_vertices). All triangle arrays are indexed by triangle index [0, n_triangles). Edge arrays are flat 2D: [tri * 3 + edge_local] for edge_local in {0,1,2}.

Member Function Documentation

◆ n_triangles()

int openswmm::twoD::MeshData::n_triangles ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ n_vertices()

int openswmm::twoD::MeshData::n_vertices ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ resize_triangles()

void openswmm::twoD::MeshData::resize_triangles ( int  nt)
inline
Here is the caller graph for this function:

◆ resize_vertices()

void openswmm::twoD::MeshData::resize_vertices ( int  nv)
inline
Here is the caller graph for this function:

Member Data Documentation

◆ edge_length

std::vector<double> openswmm::twoD::MeshData::edge_length

Length of each edge.

◆ edge_mx

std::vector<double> openswmm::twoD::MeshData::edge_mx

Edge midpoint X.

◆ edge_my

std::vector<double> openswmm::twoD::MeshData::edge_my

Edge midpoint Y.

◆ edge_mz

std::vector<double> openswmm::twoD::MeshData::edge_mz

Edge midpoint Z (interpolated)

◆ edge_nx

std::vector<double> openswmm::twoD::MeshData::edge_nx

Outward normal X component.

◆ edge_ny

std::vector<double> openswmm::twoD::MeshData::edge_ny

Outward normal Y component.

◆ mannings_n

std::vector<double> openswmm::twoD::MeshData::mannings_n

Manning's roughness coefficient.

◆ tri_area

std::vector<double> openswmm::twoD::MeshData::tri_area

Planimetric area (m²)

◆ tri_coupled_node

std::vector<int> openswmm::twoD::MeshData::tri_coupled_node

SWMM node index (-1 = none)

◆ tri_coupled_node_name

std::vector<std::string> openswmm::twoD::MeshData::tri_coupled_node_name

◆ tri_coupling_area

std::vector<double> openswmm::twoD::MeshData::tri_coupling_area

Effective exchange area.

◆ tri_coupling_cd

std::vector<double> openswmm::twoD::MeshData::tri_coupling_cd

Discharge coefficient.

◆ tri_cx

std::vector<double> openswmm::twoD::MeshData::tri_cx

Centroid X.

◆ tri_cy

std::vector<double> openswmm::twoD::MeshData::tri_cy

Centroid Y.

◆ tri_cz

std::vector<double> openswmm::twoD::MeshData::tri_cz

Centroid Z (avg of vertex elevations)

◆ tri_nbr0

std::vector<int> openswmm::twoD::MeshData::tri_nbr0

Neighbour across edge opposite v0.

◆ tri_nbr1

std::vector<int> openswmm::twoD::MeshData::tri_nbr1

Neighbour across edge opposite v1.

◆ tri_nbr2

std::vector<int> openswmm::twoD::MeshData::tri_nbr2

Neighbour across edge opposite v2.

◆ tri_tag

std::vector<std::string> openswmm::twoD::MeshData::tri_tag

Optional triangle tag.

◆ tri_v0

std::vector<int> openswmm::twoD::MeshData::tri_v0

Vertex 0 index.

◆ tri_v1

std::vector<int> openswmm::twoD::MeshData::tri_v1

Vertex 1 index.

◆ tri_v2

std::vector<int> openswmm::twoD::MeshData::tri_v2

Vertex 2 index.

◆ vert_coupled_node

std::vector<int> openswmm::twoD::MeshData::vert_coupled_node

SWMM node index (-1 = none)

◆ vert_coupled_node_name

std::vector<std::string> openswmm::twoD::MeshData::vert_coupled_node_name

◆ vert_coupling_area

std::vector<double> openswmm::twoD::MeshData::vert_coupling_area

Effective exchange area (m²)

◆ vert_coupling_cd

std::vector<double> openswmm::twoD::MeshData::vert_coupling_cd

Discharge coefficient (default 0.65)

◆ vert_stencil_idx

std::vector<int> openswmm::twoD::MeshData::vert_stencil_idx

Column indices (triangle indices)

◆ vert_stencil_ptr

std::vector<int> openswmm::twoD::MeshData::vert_stencil_ptr

[n_vertices + 1] row pointers

◆ vert_stencil_wt

std::vector<double> openswmm::twoD::MeshData::vert_stencil_wt

Pseudo-Laplacian weights.

◆ vtag

std::vector<std::string> openswmm::twoD::MeshData::vtag

Optional vertex tag.

◆ vx

std::vector<double> openswmm::twoD::MeshData::vx

Vertex X coordinate.

◆ vy

std::vector<double> openswmm::twoD::MeshData::vy

Vertex Y coordinate.

◆ vz

std::vector<double> openswmm::twoD::MeshData::vz

Vertex Z (ground elevation)


The documentation for this struct was generated from the following file: