| 
    t8
    UNKNOWN
    
   t8code is a C library to manage a forest of adaptive                           space-trees of general element classes in parallel. 
   | 
 
Definitions of tet-specific functions. More...
Go to the source code of this file.
Functions | |
| void | t8_dtet_compute_integer_coords (const t8_dtet_t *elem, int vertex, t8_dtet_coord_t coordinates[3]) | 
| Compute the coordinates of a vertex of a tetrahedron.  More... | |
| void | t8_dtet_compute_vertex_ref_coords (const t8_dtet_t *elem, int vertex, double coordinates[3]) | 
| Compute the coordinates of a vertex of a tetrahedron when the tree (level 0 tetrahedron) is embedded in \( [0,1]^3 \).  More... | |
| void | t8_dtet_compute_reference_coords (const t8_dtet_t *elem, const double *ref_coords, const size_t num_coords, double *out_coords) | 
| Convert points in the reference space of a tet element to points in the reference space of the tree (level 0) embedded in \( [0,1]^3 \).  More... | |
| void | t8_dtet_compute_all_coords (const t8_dtet_t *elem, t8_dtet_coord_t coordinates[4][3]) | 
| Compute the coordinates of the four vertices of a tetrahedron.  More... | |
| void | t8_dtet_copy (const t8_dtet_t *t, t8_dtet_t *dest) | 
| Copy the values of one tetrahedron to another.  More... | |
| int | t8_dtet_compare (const t8_dtet_t *t1, const t8_dtet_t *t2) | 
| Compare two tets in their linear order.  More... | |
| int | t8_dtet_equal (const t8_dtet_t *elem1, const t8_dtet_t *elem2) | 
| Check if two elements are equal.  More... | |
| void | t8_dtet_parent (const t8_dtet_t *t, t8_dtet_t *parent) | 
| Compute the parent of a tetrahedron.  More... | |
| void | t8_dtet_ancestor (const t8_dtet_t *t, int level, t8_dtet_t *ancestor) | 
| Compute the ancestor of a tetrahedron at a given level.  More... | |
| void | t8_dtet_child (const t8_dtet_t *elem, int childid, t8_dtet_t *child) | 
| Compute the childid-th child in Morton order of a tetrahedron t.  More... | |
| void | t8_dtet_childrenpv (const t8_dtet_t *t, t8_dtet_t *c[T8_DTET_CHILDREN]) | 
| Compute the 8 children of a tetrahedron, array version.  More... | |
| int | t8_dtet_is_familypv (const t8_dtet_t *f[]) | 
| Check whether a collection of eight tetrahedra is a family in Morton order.  More... | |
| void | t8_dtet_sibling (const t8_dtet_t *elem, int sibid, t8_dtet_t *sibling) | 
| Compute a specific sibling of a tetrahedron.  More... | |
| int | t8_dtet_face_neighbour (const t8_dtet_t *t, int face, t8_dtet_t *n) | 
| Compute the face neighbor of a tetrahedron.  More... | |
| void | t8_dtet_nearest_common_ancestor (const t8_dtet_t *t1, const t8_dtet_t *t2, t8_dtet_t *r) | 
| Computes the nearest common ancestor of two tetrahedra in the same tree.  More... | |
| void | t8_dtet_children_at_face (const t8_dtet_t *tet, int face, t8_dtet_t *children[], int num_children, int *child_indices) | 
| Given a tetrahedron and a face of the tetrahedron, compute all children of the tetrahedron that touch the face.  More... | |
| int | t8_dtet_face_child_face (const t8_dtet_t *tet, int face, int face_child) | 
| Given a face of an tetrahedron and a child number of a child of that face, return the face number of the child of the tetrahedron that matches the child face.  More... | |
| int | t8_dtet_face_parent_face (const t8_dtet_t *tet, int face) | 
| Given a face of an tet return the face number of the parent of the tet that matches the tet's face.  More... | |
| int | t8_dtet_tree_face (t8_dtet_t *t, int face) | 
| Given a tetrahedron and a face of this tetrahedron.  More... | |
| int | t8_dtet_root_face_to_face (t8_dtet_t *t, int root_face) | 
| Given a tetrahedron and a face of the root tetrahedron.  More... | |
| int | t8_dtet_is_inside_root (t8_dtet_t *t) | 
| Test if a tetrahedron lies inside of the root tetrahedron, that is the tetrahedron of level 0, anchor node (0,0,0) and type 0.  More... | |
| int | t8_dtet_is_root_boundary (const t8_dtet_t *t, int face) | 
| Compute whether a given tetrahedron shares a given face with its root tree.  More... | |
| int | t8_dtet_is_equal (const t8_dtet_t *t1, const t8_dtet_t *t2) | 
| Test if two tetrahedra have the same coordinates, type and level.  More... | |
| int | t8_dtet_is_sibling (const t8_dtet_t *t1, const t8_dtet_t *t2) | 
| Test if two tetrahedra are siblings.  More... | |
| int | t8_dtet_is_parent (const t8_dtet_t *t, const t8_dtet_t *c) | 
| Test if a tetrahedron is the parent of another tetrahedron.  More... | |
| int | t8_dtet_is_ancestor (const t8_dtet_t *t, const t8_dtet_t *c) | 
| Test if a tetrahedron is an ancestor of another tetrahedron.  More... | |
| t8_linearidx_t | t8_dtet_linear_id (const t8_dtet_t *t, int level) | 
| Computes the linear position of a tetrahedron in a uniform grid.  More... | |
| void | t8_dtet_init_linear_id_with_level (t8_dtet_t *t, t8_linearidx_t id, int start_level, int end_level, t8_dtet_type_t parenttype) | 
| Same as init_linear_id, but we only consider the subtree.  More... | |
| void | t8_dtet_init_linear_id (t8_dtet_t *t, t8_linearidx_t id, int level) | 
| Initialize a tetrahedron as the tetrahedron with a given global id in a uniform refinement of a given level.  More... | |
| void | t8_dtet_init_root (t8_dtet_t *t) | 
| Initialize a tetrahedron as the root tetrahedron (type 0 at level 0)  More... | |
| void | t8_dtet_successor (const t8_dtet_t *t, t8_dtet_t *s, int level) | 
| Computes the successor of a tetrahedron in a uniform grid of level level.  More... | |
| void | t8_dtet_first_descendant (const t8_dtet_t *t, t8_dtet_t *s, int level) | 
| Compute the first descendant of a tetrahedron at a given level.  More... | |
| void | t8_dtet_last_descendant (const t8_dtet_t *t, t8_dtet_t *s, int level) | 
| Compute the last descendant of a tetrahedron at a given level.  More... | |
| void | t8_dtet_corner_descendant (const t8_dtet_t *t, t8_dtet_t *s, int corner, int level) | 
| Compute the descendant of a tetrahedron in a given corner.  More... | |
| void | t8_dtet_predecessor (const t8_dtet_t *t, t8_dtet_t *s, int level) | 
| Computes the predecessor of a tetrahedron in a uniform grid of level level.  More... | |
| int | t8_dtet_ancestor_id (const t8_dtet_t *t, int level) | 
| Compute the position of the ancestor of this child at level level within its siblings.  More... | |
| int | t8_dtet_child_id (const t8_dtet_t *t) | 
| Compute the position of the ancestor of this child at level level within its siblings.  More... | |
| int | t8_dtet_get_level (const t8_dtet_t *t) | 
| Return the level of a tetrahedron.  More... | |
| int | t8_dtet_is_valid (const t8_dtet_t *t) | 
| Query whether all entries of a tet are in valid ranges.  More... | |
| void | t8_dtet_init (t8_dtet_t *t) | 
| Set sensible default values for a tet.  More... | |
| void | t8_dtet_element_pack (t8_dtet_t **const elements, const unsigned int count, void *send_buffer, const int buffer_size, int *position, sc_MPI_Comm comm) | 
| void | t8_dtet_element_pack_size (const unsigned int count, sc_MPI_Comm comm, int *pack_size) | 
| void | t8_dtet_element_unpack (void *recvbuf, const int buffer_size, int *position, t8_dtet_t **elements, const unsigned int count, sc_MPI_Comm comm) | 
Definitions of tet-specific functions.
TODO: Run make doxygen and grep for files. Also document all arguments of functions. TODO: Group the dtet_is functions together.
Compute the ancestor of a tetrahedron at a given level.
| [in] | t | Input tetrahedron. | 
| [in] | level | A smaller level than t. | 
| [in,out] | ancestor | Existing tetrahedron whose data will be filled with the data of t's ancestor on level level. | 
| int t8_dtet_ancestor_id | ( | const t8_dtet_t * | t, | 
| int | level | ||
| ) | 
Compute the position of the ancestor of this child at level level within its siblings.
| [in] | t | tetrahedron to be considered. | 
| [in] | level | level to be considered. | 
Compute the childid-th child in Morton order of a tetrahedron t.
| [in] | t | Input tetrahedron. | 
| [in,out] | childid | The id of the child, 0..7 in Bey order. | 
| [out] | child | Existing tetrahedron whose data will be filled with the date of t's childid-th child. | 
| int t8_dtet_child_id | ( | const t8_dtet_t * | t | ) | 
Compute the position of the ancestor of this child at level level within its siblings.
| [in] | t | tetrahedron to be considered. | 
| void t8_dtet_children_at_face | ( | const t8_dtet_t * | tet, | 
| int | face, | ||
| t8_dtet_t * | children[], | ||
| int | num_children, | ||
| int * | child_indices | ||
| ) | 
Given a tetrahedron and a face of the tetrahedron, compute all children of the tetrahedron that touch the face.
| [in] | tet | The tetrahedron. | 
| [in] | face | A face of tet. | 
| [in,out] | children | Allocated tetrahedra, in which the children of tet that share a face with face are stored. They will be stored in order of their child_id. | 
| [in] | num_children | The number of tetrahedra in children. Must match the number of children that touch face. | 
Compute the 8 children of a tetrahedron, array version.
| [in] | t | Input tetrahedron. | 
| [in,out] | c | Pointers to the 8 computed children in Morton order. t may point to the same quadrant as c[0]. | 
Compare two tets in their linear order.
| [in] | t1 | Tetrahedron one. | 
| [in] | t2 | Tetrahedron two. | 
| void t8_dtet_compute_all_coords | ( | const t8_dtet_t * | elem, | 
| t8_dtet_coord_t | coordinates[4][3] | ||
| ) | 
Compute the coordinates of the four vertices of a tetrahedron.
| [in] | elem | Input tetrahedron. | 
| [out] | coordinates | An array of 4x3 t8_dtet_coord_t that will be filled with the coordinates of t's vertices. | 
| void t8_dtet_compute_integer_coords | ( | const t8_dtet_t * | elem, | 
| int | vertex, | ||
| t8_dtet_coord_t | coordinates[3] | ||
| ) | 
Compute the coordinates of a vertex of a tetrahedron.
| [in] | t | Input tetrahedron. | 
| [in] | vertex | The number of the vertex. | 
| [out] | coordinates | An array of 3 t8_dtet_coord_t that will be filled with the coordinates of the vertex. | 
| void t8_dtet_compute_reference_coords | ( | const t8_dtet_t * | elem, | 
| const double * | ref_coords, | ||
| const size_t | num_coords, | ||
| double * | out_coords | ||
| ) | 
Convert points in the reference space of a tet element to points in the reference space of the tree (level 0) embedded in \( [0,1]^3 \).
| [in] | elem | Input tet. | 
| [in] | ref_coords | The reference coordinates in the tet (num_coords times \( [0,1]^3 \)) | 
| [in] | num_coords | Number of coordinates to evaluate | 
| [out] | out_coords | An array of num_coords x 3 x double that will be filled with the reference coordinates of the points on the tet. | 
| void t8_dtet_compute_vertex_ref_coords | ( | const t8_dtet_t * | elem, | 
| int | vertex, | ||
| double | coordinates[3] | ||
| ) | 
Compute the coordinates of a vertex of a tetrahedron when the tree (level 0 tetrahedron) is embedded in \( [0,1]^3 \).
| [in] | elem | Input tetrahedron. | 
| [in] | vertex | The number of the vertex. | 
| [out] | coordinates | An array of 3 double that will be filled with the reference coordinates of the vertex. | 
Copy the values of one tetrahedron to another.
| [in] | t | Tetrahedron whose values will be copied. | 
| [in,out] | dest | Existing tetrahedron whose data will be filled with the data of t. * | 
Compute the descendant of a tetrahedron in a given corner.
| [in] | t | Tetrahedron whose descendant is computed. | 
| [out] | s | Existing tetrahedron whose data will be filled with the data of t's descendant in corner. | 
| [in] | corner | The corner in which the descendant should lie. | 
| [in] | level | The refinement level of the descendant. Must be greater or equal to t's level. | 
Check if two elements are equal.
| [in] | elem1 | The first element. | 
| [in] | elem2 | The second element. | 
| int t8_dtet_face_child_face | ( | const t8_dtet_t * | tet, | 
| int | face, | ||
| int | face_child | ||
| ) | 
Given a face of an tetrahedron and a child number of a child of that face, return the face number of the child of the tetrahedron that matches the child face.
| [in] | tet | The tetrahedron. | 
| [in] | face | Then number of the face. | 
| [in] | face_child | The child number of a child of the face tetrahedron. | 
Compute the face neighbor of a tetrahedron.
| [in] | t | Input tetrahedron. | 
| [in] | face | The face across which to generate the neighbor. | 
| [in,out] | n | Existing tetrahedron whose data will be filled. | 
| int t8_dtet_face_parent_face | ( | const t8_dtet_t * | tet, | 
| int | face | ||
| ) | 
Given a face of an tet return the face number of the parent of the tet that matches the tet's face.
Or return -1 if no face of the parent matches the face.
| [in] | elem | The tet. | 
| [in] | face | Then number of the face. | 
Compute the first descendant of a tetrahedron at a given level.
This is the descendant of the tetrahedron in a uniform maxlevel refinement that has the smaller id.
| [in] | t | tetrahedron whose descendant is computed. | 
| [in] | level | A given level. Must be greater or equal to t's level. | 
| [out] | s | Existing tetrahedron whose data will be filled with the data of t's first descendant. | 
| int t8_dtet_get_level | ( | const t8_dtet_t * | t | ) | 
Return the level of a tetrahedron.
| [in] | t | tetrahedron to be considered. | 
| void t8_dtet_init | ( | t8_dtet_t * | t | ) | 
Set sensible default values for a tet.
| [in,out] | t | A tet. | 
| void t8_dtet_init_linear_id | ( | t8_dtet_t * | t, | 
| t8_linearidx_t | id, | ||
| int | level | ||
| ) | 
Initialize a tetrahedron as the tetrahedron with a given global id in a uniform refinement of a given level.
| [in,out] | t | Existing tetrahedron whose data will be filled. | 
| [in] | id | Index to be considered. | 
| [in] | level | level of uniform grid to be considered. | 
| void t8_dtet_init_linear_id_with_level | ( | t8_dtet_t * | t, | 
| t8_linearidx_t | id, | ||
| int | start_level, | ||
| int | end_level, | ||
| t8_dtet_type_t | parenttype | ||
| ) | 
Same as init_linear_id, but we only consider the subtree.
Used for computing the index of a tetrahedron lying in a pyramid
| [in,out] | t | Existing triangle whose data will be filled | 
| id | Index to be considered | |
| start_level | The level of the root of the subtree | |
| end_level | Level of uniform grid to be considered | |
| parenttype | The type of the parent. | 
| void t8_dtet_init_root | ( | t8_dtet_t * | t | ) | 
Initialize a tetrahedron as the root tetrahedron (type 0 at level 0)
| [in,out] | t | Existing tetrahedron whose data will be filled. | 
Test if a tetrahedron is an ancestor of another tetrahedron.
| [in] | t | tetrahedron to be tested. | 
| [in] | c | Descendent tetrahedron. | 
Test if two tetrahedra have the same coordinates, type and level.
| int t8_dtet_is_familypv | ( | const t8_dtet_t * | f[] | ) | 
Check whether a collection of eight tetrahedra is a family in Morton order.
| [in] | f | An array of eight tetrahedra. | 
| int t8_dtet_is_inside_root | ( | t8_dtet_t * | t | ) | 
Test if a tetrahedron lies inside of the root tetrahedron, that is the tetrahedron of level 0, anchor node (0,0,0) and type 0.
| [in] | t | Input tetrahedron. | 
Test if a tetrahedron is the parent of another tetrahedron.
| [in] | t | tetrahedron to be tested. | 
| [in] | c | Possible child tetrahedron. | 
| int t8_dtet_is_root_boundary | ( | const t8_dtet_t * | t, | 
| int | face | ||
| ) | 
Compute whether a given tetrahedron shares a given face with its root tree.
| [in] | t | The input tet. | 
| [in] | face | A face of t. | 
Test if two tetrahedra are siblings.
| [in] | t1 | First tetrahedron to be tested. | 
| [in] | t2 | Second tetrahedron to be tested. | 
| int t8_dtet_is_valid | ( | const t8_dtet_t * | t | ) | 
Query whether all entries of a tet are in valid ranges.
| [in] | t | tet to be considered. | 
Compute the last descendant of a tetrahedron at a given level.
This is the descendant of the tetrahedron in a uniform maxlevel refinement that has the bigges id.
| [in] | t | tetrahedron whose descendant is computed. | 
| [in] | level | A given level. Must be greater or equal to t's level. | 
| [out] | s | Existing tetrahedron whose data will be filled with the data of t's last descendant. | 
| t8_linearidx_t t8_dtet_linear_id | ( | const t8_dtet_t * | t, | 
| int | level | ||
| ) | 
Computes the linear position of a tetrahedron in a uniform grid.
| [in] | t | tetrahedron whose id will be computed. | 
| [in] | level | level of uniform grid to be considered. | 
Computes the nearest common ancestor of two tetrahedra in the same tree.
| [in] | t1 | First input tetrahedron. | 
| [in] | t2 | Second input tetrahedron. | 
| [in,out] | r | Existing tetrahedron whose data will be filled. | 
Compute the parent of a tetrahedron.
| [in] | elem | Input tetrahedron. | 
| [in,out] | parent | Existing tetrahedron whose data will be filled with the data of elem's parent. | 
Computes the predecessor of a tetrahedron in a uniform grid of level level.
| [in] | t | tetrahedron whose id will be computed. | 
| [in,out] | s | Existing tetrahedron whose data will be filled with the data of t's predecessor on level level. | 
| [in] | level | level of uniform grid to be considered. | 
| int t8_dtet_root_face_to_face | ( | t8_dtet_t * | t, | 
| int | root_face | ||
| ) | 
Given a tetrahedron and a face of the root tetrahedron.
If the tetrahedron lies on the tree boundary, return the corresponding face number of the tetrahedron. If not the return value is arbitrary.
| [in] | t | The tetrahedron. | 
| [in] | face | The index of a face of the root tetrahedron. | 
Compute a specific sibling of a tetrahedron.
| [in] | elem | Input tetrahedron. | 
| [in,out] | sibling | Existing tetrahedron whose data will be filled with the data of sibling no. sibling_id of elem. | 
| [in] | sibid | The id of the sibling computed, 0..7 in Bey order. | 
Computes the successor of a tetrahedron in a uniform grid of level level.
| [in] | t | tetrahedron whose id will be computed. | 
| [out] | s | Existing tetrahedron whose data will be filled with the data of t's successor on level level. | 
| [in] | level | level of uniform grid to be considered. | 
| int t8_dtet_tree_face | ( | t8_dtet_t * | t, | 
| int | face | ||
| ) | 
Given a tetrahedron and a face of this tetrahedron.
If the face lies on the tree boundary, return the face number of the tree face. If not the return value is arbitrary.
| [in] | t | The tetrahedron. | 
| [in] | face | The index of a face of t. |