Function t8_element_count_leaves
Defined in File t8_scheme.h
Function Documentation
-
t8_gloidx_t t8_element_count_leaves(const t8_scheme_c *scheme, const t8_eclass_t tree_class, const t8_element_t *element, const int level)
Count how many leaf descendants of a given uniform level an element would produce.
Example: If element is a line element that refines into 2 line elements on each level, then the return value is max(0, 2^{level - level(t)}). Thus, if element’s level is 0, and level = 3, the return value is 2^3 = 8.
- Parameters:
scheme – [in] The scheme of the forest.
tree_class – [in] The eclass of tree the elements are part of.
element – [in] The element to be checked.
level – [in] A refinement level.
- Returns:
Suppose element is uniformly refined up to level level. The return value is the resulting number of elements (of the given level). If level < t8_element_get_level(element), the return value should be 0.