Struct t8_cmesh_vertex_connectivity
Defined in File t8_cmesh_vertex_connectivity.hxx
Struct Documentation
-
struct t8_cmesh_vertex_connectivity
A class to hold the vertex connectivity of a cmesh.
Public Types
Public Functions
-
inline t8_cmesh_vertex_connectivity()
Constructor.
-
inline ~t8_cmesh_vertex_connectivity()
Destructor.
-
inline void set_global_vertex_ids_of_tree_vertices(const t8_cmesh_t cmesh, const t8_gloidx_t global_tree, const t8_gloidx_t *global_tree_vertices, const int num_vertices)
Set all global vertex ids of a local tree.
Note
cmesh must not be committed.
- Parameters:
cmesh – [in] The considered cmesh
global_tree – [in] A global tree id of cmesh
global_tree_vertices – [in] The ids of the global vertices in order of local_tree’s vertices.
num_vertices – [in] Must match the number of vertices of local_tree
-
inline void build_vertex_to_tree()
Function to fill vtt from the stored ttv information. Sets all global ids and associated tree vertices from the associated cmesh. Afterwards, this class is ready to be used and cannot be altered.
-
inline t8_gloidx_t get_global_number_of_vertices() const
Return the total number of global vertices of a cmesh (across all processes).
- Returns:
The total number of global vertices of cmesh.
-
inline t8_gloidx_t get_local_number_of_vertices()
Return the number of process local global vertices of a cmesh.
- Returns:
The number of process local global vertices of cmesh.
-
inline state get_state() const
Return the state of the connectivity.
- Returns:
The current state (initialized, committed, etc) of this object. state
-
inline const tree_vertex_list &vertex_to_trees(const t8_gloidx_t vertex_id) const
Given a global vertex id, return the list of trees that share this vertex.
- Parameters:
vertex_id – [in] A global vertex id.
- Returns:
The trees and their local vertex ids matching vertex_id.
-
inline const std::span<const t8_gloidx_t> tree_to_vertices(const t8_locidx_t ltree) const
Given a local tree (or ghost) return the list of global vertices this tree has (in order of its local vertices).
- Parameters:
ltree – [in] A local tree id.
- Returns:
The list of global vertices that this tree has.
-
inline t8_gloidx_t treevertex_to_vertex(const t8_locidx_t ltree, const t8_locidx_t ltree_vertex) const
Given a local tree (or ghost) and a local vertex of that tree return the global vertex id of that vertex.
- Parameters:
ltree – [in] A local tree.
ltree_vertex – [in] A local vertex of ltree.
- Returns:
The global vertex associated with ltree_vertex.
-
inline const std::span<const t8_gloidx_t> get_global_vertices_of_tree(const t8_locidx_t local_tree) const
Get the global vertex indices of a tree in its local vertex order.
- Parameters:
local_tree – [in] A local tree in cmesh.
- Returns:
The global vertices of local_tree
-
inline t8_gloidx_t get_global_vertex_of_tree(const t8_locidx_t local_tree, const int local_tree_vertex) const
Get a single global vertex index of a local tree’s local vertex.
- Parameters:
local_tree – [in] A local tree in cmesh.
local_tree_vertex – [in] A local vertex of local_tree
- Returns:
The global vertex matching local_tree_vertex of local_tree.
-
inline const tree_vertex_list &get_tree_list_of_vertex(const t8_gloidx_t global_vertex_id) const
Get the list of global trees and local vertex ids a global vertex is connected to.
- Parameters:
global_vertex_id – [in] The global id of a vertex in the cmesh.
- Returns:
The list of global tree ids and local vertex ids of global_vertex_id.
-
inline int get_num_trees_at_vertex(const t8_gloidx_t global_vertex_id) const
Get the number of global trees a global vertex is connected to.
Note
if a tree is contained multiple times it is counted as multiple entries. Example: For a quad where all 4 vertices map to a single global vertex this function will return 4.
- Parameters:
global_vertex_id – [in] The global id of a vertex in the cmesh.
-
inline t8_cmesh_vertex_connectivity()