Function t8_forest_search_recursion
Defined in File t8_forest_iterate.cxx
Function Documentation
-
static void t8_forest_search_recursion(t8_forest_t forest, const t8_locidx_t ltreeid, t8_element_t *element, const t8_eclass_t tree_class, t8_element_array_t *leaf_elements, const t8_locidx_t tree_lindex_of_first_leaf, t8_forest_search_fn search_fn, t8_forest_query_fn query_fn, sc_array_t *queries, sc_array_t *active_queries)
The recursion that is called from t8_forest_search_tree. Input is an element and an array of all leaf elements of this element. The callback function is called on element and if it returns true, the search continues with the children of the element. Additionally a query function and a set of queries can be given. In this case the recursion stops when either the search_fn function returns false or the query_fn function returns false for all active queries. (Thus, if there are no active queries left, the recursion also stops.) A query is active for an element if the query_fn callback returned true for the parent element. If the callback function (search_fn) returns false for an element, the query function is not called for this element.
See also
See also
- Parameters:
forest – [in] A committed forest.
ltreeid – [in] The local index of the tree.
element – [in] The considered element.
tree_class – [in] The element class of the tree.
leaf_elements – [in] The array of leaf elements that are descendants of element. Sorted by linear index.
tree_lindex_of_first_leaf – [in] Tree-local index of the first leaf.
search_fn – [in] The search callback function,
query_fn – [in] The query function
queries – [in] The array of queries.
active_queries – [in] The active queries, given as an array of indices within the queries array.