HydroCouple  2.0.0-alpha.1
HydroCouple Interface Definitions
Loading...
Searching...
No Matches
HydroCouple::Spatial::IMeshView Class Referenceabstract

IMeshView is a bulk, structure-of-arrays view of an unstructured mesh or network: flat coordinate spans plus CSR (compressed sparse row) connectivity. More...

#include <hydrocouplespatial.h>

Collaboration diagram for HydroCouple::Spatial::IMeshView:

Public Member Functions

virtual ~IMeshView ()=default
 IMeshView destructor.
 
virtual int64_t nodeCount () const =0
 The number of nodes (vertices) in the mesh.
 
virtual int64_t edgeCount () const =0
 The number of edges in the mesh.
 
virtual int64_t faceCount () const =0
 The number of faces (patches/cells) in the mesh; 0 for a pure network.
 
virtual std::span< const double > nodeX () const =0
 x coordinates of all nodes; the span has nodeCount() elements.
 
virtual std::span< const double > nodeY () const =0
 y coordinates of all nodes; the span has nodeCount() elements.
 
virtual std::span< const double > nodeZ () const =0
 z coordinates of all nodes; the span has nodeCount() elements, or is empty for a 2D mesh.
 
virtual std::span< const int64_t > faceNodeOffsets () const =0
 CSR row offsets into faceNodes(): the nodes of face f are faceNodes()[faceNodeOffsets()[f] ... faceNodeOffsets()[f+1]).
 
virtual std::span< const int64_t > faceNodes () const =0
 Concatenated node indexes of all faces, ordered counter-clockwise per face.
 
virtual std::span< const int64_t > edgeNodes () const =0
 Node index pairs of all edges: edge e connects edgeNodes()[2*e] and edgeNodes()[2*e + 1].
 

Detailed Description

IMeshView is a bulk, structure-of-arrays view of an unstructured mesh or network: flat coordinate spans plus CSR (compressed sparse row) connectivity.

The layout is deliberately congruent with the UGRID conventions so that persistence (face_node_connectivity, node coordinate arrays), message packing, and device staging can all consume the view without transformation. All spans remain valid until the underlying mesh topology or geometry changes. Obtained from INetwork::meshView(), IPolyhedralSurface::meshView(), and their specializations.

Constructor & Destructor Documentation

◆ ~IMeshView()

virtual HydroCouple::Spatial::IMeshView::~IMeshView ( )
virtualdefault

IMeshView destructor.

Member Function Documentation

◆ edgeCount()

virtual int64_t HydroCouple::Spatial::IMeshView::edgeCount ( ) const
nodiscardpure virtual

The number of edges in the mesh.

◆ edgeNodes()

virtual std::span< const int64_t > HydroCouple::Spatial::IMeshView::edgeNodes ( ) const
nodiscardpure virtual

Node index pairs of all edges: edge e connects edgeNodes()[2*e] and edgeNodes()[2*e + 1].

The span has 2 * edgeCount() elements.

◆ faceCount()

virtual int64_t HydroCouple::Spatial::IMeshView::faceCount ( ) const
nodiscardpure virtual

The number of faces (patches/cells) in the mesh; 0 for a pure network.

◆ faceNodeOffsets()

virtual std::span< const int64_t > HydroCouple::Spatial::IMeshView::faceNodeOffsets ( ) const
nodiscardpure virtual

CSR row offsets into faceNodes(): the nodes of face f are faceNodes()[faceNodeOffsets()[f] ... faceNodeOffsets()[f+1]).

The span has faceCount() + 1 elements; it is empty for a pure network.

◆ faceNodes()

virtual std::span< const int64_t > HydroCouple::Spatial::IMeshView::faceNodes ( ) const
nodiscardpure virtual

Concatenated node indexes of all faces, ordered counter-clockwise per face.

◆ nodeCount()

virtual int64_t HydroCouple::Spatial::IMeshView::nodeCount ( ) const
nodiscardpure virtual

The number of nodes (vertices) in the mesh.

◆ nodeX()

virtual std::span< const double > HydroCouple::Spatial::IMeshView::nodeX ( ) const
nodiscardpure virtual

x coordinates of all nodes; the span has nodeCount() elements.

◆ nodeY()

virtual std::span< const double > HydroCouple::Spatial::IMeshView::nodeY ( ) const
nodiscardpure virtual

y coordinates of all nodes; the span has nodeCount() elements.

◆ nodeZ()

virtual std::span< const double > HydroCouple::Spatial::IMeshView::nodeZ ( ) const
nodiscardpure virtual

z coordinates of all nodes; the span has nodeCount() elements, or is empty for a 2D mesh.


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