Function t8_forest_leaf_neighbor_subface
Defined in File t8_forest_general.h
Function Documentation
-
int t8_forest_leaf_neighbor_subface(t8_forest_t forest, t8_locidx_t ltreeid, const t8_element_t *leaf, int face, t8_eclass_t neighbor_tree_class, const t8_element_t *neighbor_leaf, int neighbor_face)
Compute the subface index for a coarser neighbor.
Note
This function is designed to be called after t8_forest_leaf_face_neighbors_ext to complement its output. It is primarily intended for balanced forests, but can be used on any committed forest as long as the preconditions hold (i.e. the forest must be ‘’locally balanced’’).
- Parameters:
forest – [in] The forest. Must be committed.
ltreeid – [in] A local tree id.
leaf – [in] A leaf in ltreeid.
face – [in] The face index of leaf to consider.
neighbor_tree_class – [in] The eclass of the neighbor element.
neighbor_leaf – [in] The leaf of forest on the other side of the face of index face of element leaf.
neighbor_face – [in] The face index of neighbor_leaf (i.e. the dual face of face).
- Returns:
The index of the subface of neighbor_face which corresponds to face.
- Pre:
leaf and neighbor_leaf must be a face neighbors. The common face must correspond to face for leaf and neighbor_face for neighbor_leaf respectively. neighbor_leaf must be one level coarser than leaf. Otherwise the behavior is undefined.