OISEAU
A modern DGTD framework
Loading...
Searching...
No Matches
oiseau::dg::DGConnectivity Class Reference

Stores face adjacency for the top-dimensional cells of a 1D, 2D, or 3D mesh. More...

#include <dg_connectivity.hpp>

Classes

struct  FaceConnection
 Connection from one local face to its neighbor. More...

Public Member Functions

 DGConnectivity (mesh::Mesh &mesh)
 Calculates mesh adjacency and builds DG face connections.
const mesh::Mesh & mesh () const
std::span< const FaceConnection > faces (std::size_t mesh_cell_index) const
 Returns the face connections for a mesh cell in local face order.

Static Public Attributes

static constexpr std::size_t no_neighbor = std::numeric_limits<std::size_t>::max()
 Sentinel for missing neighbor cell and face indices.

Detailed Description

Stores face adjacency for the top-dimensional cells of a 1D, 2D, or 3D mesh.

Mesh topology supplies the neighbor indices. Interior faces also store a vertex permutation so a numerical flux can align data from both sides of the interface. Connections follow the cell type's local face order and are indexed by the original mesh cell index.

Constructor & Destructor Documentation

◆ DGConnectivity()

oiseau::dg::DGConnectivity::DGConnectivity ( mesh::Mesh & mesh)
explicit

Calculates mesh adjacency and builds DG face connections.

Updates the source topology through Topology::calculate_connectivity(). Rebuild after changing the mesh topology.

Parameters
meshSource mesh. It must outlive this object.
Exceptions
std::invalid_argumentIf the mesh dimension is outside 1 through 3 or its connectivity is invalid.
std::out_of_rangeIf adjacency references an invalid neighbor cell or face.
std::runtime_errorIf the topology's adjacency counts differ from the cell's face count.

Member Function Documentation

◆ faces()

std::span< const DGConnectivity::FaceConnection > oiseau::dg::DGConnectivity::faces ( std::size_t mesh_cell_index) const

Returns the face connections for a mesh cell in local face order.

Parameters
mesh_cell_indexIndex in the source mesh.
Returns
A view of the stored connections. Lower-dimensional cells return an empty span.
Exceptions
std::out_of_rangeIf the mesh cell index is invalid.

◆ mesh()

const mesh::Mesh & oiseau::dg::DGConnectivity::mesh ( ) const
inline
Returns
A const reference to the source mesh.

The documentation for this class was generated from the following files:
  • /__w/oiseau/oiseau/src/oiseau/dg/dg_connectivity.hpp
  • /__w/oiseau/oiseau/src/oiseau/dg/dg_connectivity.cpp