Function t8_forest_cmesh_ltreeid_to_ltreeid

Function Documentation

t8_locidx_t t8_forest_cmesh_ltreeid_to_ltreeid(t8_forest_t forest, t8_locidx_t lctreeid)

Given the local id of a tree in the coarse mesh of a forest, compute the tree’s local id in the forest.

See also

https://github.com/DLR-AMR/t8code/wiki/Tree-indexing for more details about tree indexing.

Note

For forest local trees, this is the inverse function of t8_forest_ltreeid_to_cmesh_ltreeid.

Parameters:
  • forest[in] The forest.

  • lctreeid[in] The local id of a tree in the coarse mesh of forest.

Returns:

The local id of the tree in the forest. -1 if the tree is not forest local. forest must be committed before calling this function.