Function t8_forest_iterate_faces

Function Documentation

void t8_forest_iterate_faces(const t8_forest_t forest, const t8_locidx_t ltreeid, const t8_element_t *element, const int face, const t8_element_array_t *const leaf_elements, const t8_locidx_t tree_lindex_of_first_leaf, const t8_forest_iterate_face_fn callback, void *user_data)

Iterate over all leaves of an element that touch a given face of the element.

Callback is called in each recursive step with element as input. leaf_index is only not negative if element is a leaf, in which case it indicates the index of the leaf in the leaves of the tree. If it is negative, it is

  • (index + 1) Top-down iteration and callback is called on each intermediate level. If it returns false, the current element is not traversed further

Note

tree_lindex_of_first_leaf is not an index in leaf_elements. leaf_elements may only be a part of the tree’s leaves.

Parameters:
  • forest[in] A committed forest.

  • ltreeid[in] Local index of the tree containing the element.

  • element[in] The considered element.

  • face[in] The integer index of the considered face of element.

  • leaf_elements[in] The array of leaf elements that are descendants of element. Sorted by linear index.

  • tree_lindex_of_first_leaf[in] Index of the first leaf of element in the tree’s leaves. The corresponding leaf does not necessarily lie on the face of element.

  • callback[in] The callback function.

  • user_data[in] The user data passed to the callback function.