Function t8_forest_element_find_owner_ext

Function Documentation

int t8_forest_element_find_owner_ext(t8_forest_t forest, t8_gloidx_t gtreeid, t8_element_t *element, t8_eclass_t eclass, int lower_bound, int upper_bound, int guess, int element_is_desc)

Find the owner process of a given element, if bounds for the owner process are known.

Note

If lower_bound = upper_bound, the function assumes that lower_bound is the owner process and immediately returns.

Note

The owner p must satisfy lower_bound <= p <= upper_bound.

Note

The element must not exist in the forest, but an ancestor of its first descendant has to. If the element’s owner is not unique, the owner of the element’s first descendant is returned.

Note

forest must be committed before calling this function.

Parameters:
  • forest[in] The forest.

  • gtreeid[in] The global id of the tree in which the element lies.

  • element[in] The element to look for.

  • eclass[in] The element class of the tree gtreeid.

  • lower_bound[in] A known lower bound for the owner process.

  • upper_bound[in] A known upper bound for the owner process.

  • guess[in] An initial guess for the owner. Must satisfy lower_bound <= guess <= upper_bound

  • element_is_desc[in] This should be true, if element is its own first_descendant at the maximum level. Must be false otherwise.

Returns:

The mpirank of the process that owns element.