Function t8_forest_element_face_neighbor
Defined in File t8_forest_general.h
Function Documentation
-
t8_gloidx_t t8_forest_element_face_neighbor(t8_forest_t forest, t8_locidx_t ltreeid, const t8_element_t *elem, t8_element_t *neigh, const t8_eclass_t neigh_eclass, int face, int *neigh_face)
Construct the face neighbor of an element, possibly across tree boundaries.
Returns the global tree-id of the tree in which the neighbor element lies in.
- Parameters:
forest – [in] The forest.
ltreeid – [in] The local tree in which the element lies.
elem – [in] The element to be considered.
neigh – [inout] On input an allocated element of the scheme of the face_neighbors eclass. On output, this element’s data is filled with the data of the face neighbor. If the neighbor does not exist the data could be modified arbitrarily.
neigh_eclass – [in] The eclass of neigh.
face – [in] The number of the face along which the neighbor should be constructed.
neigh_face – [out] The number of the face viewed from perspective of neigh. Can be nullptr, in which case the output is discarded.
- Returns:
The global tree-id of the tree in which neigh is in. -1 if there exists no neighbor across that face. Domain boundary. -2 if the neighbor is not in a local tree or ghost tree. Process/Ghost boundary.