-
Notifications
You must be signed in to change notification settings - Fork 58
Element indexing
Element indexing in t8code refers to the different ways of uniquely identifying mesh elements. In t8code, we work with four types of indices to identify elements: the global index, the local index, the tree local index, and the linear ID.
Most of our functions require a tree id and a tree local index as input.
When iterating over the elements in a mesh we recommend to iterate over all local trees and for each tree to iterate over its elements.
See also Tree indexing
The global index refers to the unique identification of all elements across all processes. This means that every element in the mesh, regardless of which process it is handled by, is given a unique number in the range 0 to N−1, where N is the total number of elements across all processes.
The local index is specific to the elements handled by a single process. Each process has its own set of elements, which are numbered locally from 0 to n-1, where n is the total number of elements of the current process.
t8_forest_get_first_local_element_id
function returns the global index of the first element of a process.
Thus, we can convert between global index and local index by:
global_index = t8_forest_get_first_local_element_id(forest) + local_index
The tree local index is specific to elements that belong to a particular tree within a process. Each process can manage multiple trees and each tree contains a subset of elements. The tree local index enumerates elements within a particular tree from 0 to t−1, where t is the number of elements in that tree on the current process.
The function t8_forest_get_tree_element_offset
returns the local index of a tree's first element.
We can convert between local index and tree local index by:
local index = t8_forest_get_tree_element_offset(forest, treeid) + tree local index
The linear id is a hypothetical index of the element in a uniform grid. It is mostly used internally.
Installation Guide
Configure Options
Setup t8code on JUWELS and other Slurm based systems
Setup t8code for VTK
General
Step 0 Hello World
Step 1 Creating a coarse mesh
Step 2 Creating a uniform forest
Step 3 Adapting a forest
Step 4 Partition,-Balance,-Ghost
Step 5 Store element data
Step 6 Computing stencils
Step 7 Interpolation
Features
Prerequisites & Compilation
t8_time_forest_partition
t8_time_fractal
t8_time_new_refine
t8_time_partition
t8_time_prism
t8_time_set_join_by_vertices