Function t8_forest_compute_data_index
Defined in File t8_vtk_write_ASCII.cxx
Function Documentation
-
static t8_locidx_t t8_forest_compute_data_index(const t8_forest_t forest, const t8_locidx_t ltree_or_ghost_id, const t8_locidx_t element_in_tree_index)
Given a tree id and an element in the tree compute the data index, that is the index 0 <= I < num_local_elements + num_local_ghosts corresponding to the element.
- Parameters:
forest – [in] A committed forest
ltree_or_ghost_id – [in] The Id of a local tree or ghost. 0 <= ltree_or_ghost_id < num_local_trees + num_ghost_trees
element_in_tree_index – [in] An index of an element of the tree. 0 <= element_in_tree_index < num_elements_of_tree(ltree_or_ghost_id)
- Returns:
The index I, 0 <= I < num_local_elements + num_local_ghosts corresponding to the data entry of the element as used in array for i.e. t8_forest_ghost_exchange_data or t8_forest_partition_data.