Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move element_find_owner to public interface #1445

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/t8_forest/t8_forest_general.h
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,22 @@ void
t8_forest_element_points_inside (t8_forest_t forest, t8_locidx_t ltreeid, const t8_element_t *element,
const double *points, int num_points, int *is_inside, const double tolerance);

/** Find the owner process of a given element.
* \param [in] forest The forest.
* \param [in] gtreeid The global id of the tree in which the element lies.
* \param [in] element The element to look for.
* \param [in] eclass The element class of the tree \a gtreeid.
* \return The mpirank of the process that owns \a element.
* \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 \a forest must be committed before calling this function.
* \see t8_forest_element_find_owner_ext
* \see t8_forest_element_owners_bounds
*/
int
t8_forest_element_find_owner (t8_forest_t forest, t8_gloidx_t gtreeid, t8_element_t *element, t8_eclass_t eclass);

/* TODO: if set level and partition/adapt/balance all give NULL, then
* refine uniformly and partition/adapt/balance the uniform forest. */
/** Build a uniformly refined forest on a coarse mesh.
Expand Down
16 changes: 0 additions & 16 deletions src/t8_forest/t8_forest_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,22 +219,6 @@ int
t8_forest_element_find_owner_old (t8_forest_t forest, t8_gloidx_t gtreeid, t8_element_t *element, t8_eclass_t eclass,
sc_array_t *all_owners_of_tree);

/** Find the owner process of a given element.
* \param [in] forest The forest.
* \param [in] gtreeid The global id of the tree in which the element lies.
* \param [in] element The element to look for.
* \param [in] eclass The element class of the tree \a gtreeid.
* \return The mpirank of the process that owns \a element.
* \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 \a forest must be committed before calling this function.
* \see t8_forest_element_find_owner_ext
* \see t8_forest_element_owners_bounds
*/
int
t8_forest_element_find_owner (t8_forest_t forest, t8_gloidx_t gtreeid, t8_element_t *element, t8_eclass_t eclass);

/** Find the owner process of a given element, if bounds for the owner process are known.
* \param [in] forest The forest.
* \param [in] gtreeid The global id of the tree in which the element lies.
Expand Down