Function t8_forest_pos

Function Documentation

static t8_locidx_t t8_forest_pos(t8_forest_t forest, t8_eclass_t tree_class, const t8_scheme *scheme, t8_element_array_t *telements, const t8_locidx_t telements_pos)

Return the index of the first family member of a given family in an array of elements.

See also

t8_forest_adapt_coarsen_recursive.

Note

The element with index telements_pos must be the last child in its family.

Note

If the element with index telements_pos in telement can not be coarsened recursively, return INT32_MIN.

Parameters:
  • forest[in] The forest

  • tree_class[in] The eclass of tree the elements are part of.

  • scheme[in] The element scheme for elements in telements.

  • telements[in] The array of newly created (adapted) elements.

  • telements_pos[in] The index of an element in telement array which could be coarsened recursively.

Returns:

The index of the first family member whose family is defined by telements_pos in telement.