Mallard 0.8.0
Unstructured, GPU accelerated, high-order finite volume CFD solver
Mallard website
Loading...
Searching...
No Matches
MeshBlock Struct Reference

Contiguous ranges of a mesh's cells and nodes and a set of its boundary faces. Global ids are positions in the whole mesh: cell first_cell + i is local cell i, node first_node + i local node i. Cells and boundary faces list global node ids; cell types follow from the node count (triangle 3, quadrilateral 4; tetrahedron 4, pyramid 5, prism 6, hexahedron 8; Gmsh/VTK node order). Concatenating the blocks of ranks 0, 1, ... gives the whole mesh. More...

#include <mesh_block.h>

Public Member Functions

uint64_t n_cells () const
 
uint64_t n_nodes () const
 
uint64_t n_faces () const
 
template<typename Range >
void add_cell (const Range &nodes)
 
void add_cell (std::initializer_list< uint64_t > nodes)
 
template<typename Range >
void add_face (const Range &nodes, uint32_t zone)
 

Public Attributes

uint64_t first_cell = 0
 
uint64_t first_node = 0
 
std::vector< uint64_t > cell_offsets {0}
 
std::vector< uint64_t > cell_nodes
 
std::vector< std::array< double, N_DIM > > node_coords
 
std::vector< uint64_t > face_offsets {0}
 
std::vector< uint64_t > face_nodes
 
std::vector< uint32_t > face_zone
 
std::vector< std::string > zone_names
 
std::vector< uint64_t > face_high_order_offsets
 
std::vector< std::array< double, N_DIM > > face_high_order_nodes
 

Detailed Description

Contiguous ranges of a mesh's cells and nodes and a set of its boundary faces. Global ids are positions in the whole mesh: cell first_cell + i is local cell i, node first_node + i local node i. Cells and boundary faces list global node ids; cell types follow from the node count (triangle 3, quadrilateral 4; tetrahedron 4, pyramid 5, prism 6, hexahedron 8; Gmsh/VTK node order). Concatenating the blocks of ranks 0, 1, ... gives the whole mesh.

Member Function Documentation

◆ add_cell() [1/2]

template<typename Range >
void MeshBlock::add_cell ( const Range &  nodes)
inline

◆ add_cell() [2/2]

void MeshBlock::add_cell ( std::initializer_list< uint64_t >  nodes)
inline

◆ add_face()

template<typename Range >
void MeshBlock::add_face ( const Range &  nodes,
uint32_t  zone 
)
inline

◆ n_cells()

uint64_t MeshBlock::n_cells ( ) const
inline

◆ n_faces()

uint64_t MeshBlock::n_faces ( ) const
inline

◆ n_nodes()

uint64_t MeshBlock::n_nodes ( ) const
inline

Member Data Documentation

◆ cell_nodes

std::vector<uint64_t> MeshBlock::cell_nodes

◆ cell_offsets

std::vector<uint64_t> MeshBlock::cell_offsets {0}

◆ face_high_order_nodes

std::vector<std::array<double, N_DIM> > MeshBlock::face_high_order_nodes

◆ face_high_order_offsets

std::vector<uint64_t> MeshBlock::face_high_order_offsets

◆ face_nodes

std::vector<uint64_t> MeshBlock::face_nodes

◆ face_offsets

std::vector<uint64_t> MeshBlock::face_offsets {0}

◆ face_zone

std::vector<uint32_t> MeshBlock::face_zone

◆ first_cell

uint64_t MeshBlock::first_cell = 0

◆ first_node

uint64_t MeshBlock::first_node = 0

◆ node_coords

std::vector<std::array<double, N_DIM> > MeshBlock::node_coords

◆ zone_names

std::vector<std::string> MeshBlock::zone_names

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