30 #ifndef T8_DTET_BITS_H
31 #define T8_DTET_BITS_H
56 double coordinates[3]);
177 int face,
int face_child);
376 void t8_dtet_debug_print (
const t8_dtet_t *t);
This data type stores a tetrahedron.
Definition: t8_dtet.h:71
uint64_t t8_linearidx_t
A type for storing SFC indices.
Definition: t8.h:114
int32_t t8_dtet_coord_t
The coordinates of a tetrahedron are integers relative to the maximum refinement.
Definition: t8_dtet.h:67
int8_t t8_dtet_type_t
The type of a tetrahedron designates its position relative to the surrounding cube.
Definition: t8_dtet.h:64
#define T8_DTET_CHILDREN
The number of children that a tetrahedron is refined into.
Definition: t8_dtet.h:35
int t8_dtet_get_level(const t8_dtet_t *t)
Return the level of a tetrahedron.
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.
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.
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...
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...
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.
void t8_dtet_init_root(t8_dtet_t *t)
Initialize a tetrahedron as the root tetrahedron (type 0 at level 0)
int t8_dtet_face_neighbour(const t8_dtet_t *t, int face, t8_dtet_t *n)
Compute the face neighbor of a tetrahedron.
void t8_dtet_init(t8_dtet_t *t)
Set sensible default values for a tet.
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.
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 ...
int t8_dtet_is_sibling(const t8_dtet_t *t1, const t8_dtet_t *t2)
Test if two tetrahedra are siblings.
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.
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.
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.
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.
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 ...
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.
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,...
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.
void t8_dtet_sibling(const t8_dtet_t *elem, int sibid, t8_dtet_t *sibling)
Compute a specific sibling of a tetrahedron.
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.
void t8_dtet_copy(const t8_dtet_t *t, t8_dtet_t *dest)
Copy the values of one tetrahedron to another.
int t8_dtet_tree_face(t8_dtet_t *t, int face)
Given a tetrahedron and a face of this tetrahedron.
int t8_dtet_compare(const t8_dtet_t *t1, const t8_dtet_t *t2)
Compare two tets in their linear order.
void t8_dtet_compute_coords(const t8_dtet_t *elem, int vertex, t8_dtet_coord_t coordinates[3])
Compute the coordinates of a vertex of a tetrahedron.
int t8_dtet_root_face_to_face(t8_dtet_t *t, int root_face)
Given a tetrahedron and a face of the root tetrahedron.
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.
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.
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.
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.
int t8_dtet_is_valid(const t8_dtet_t *t)
Query whether all entries of a tet are in valid ranges.
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.
void t8_dtet_parent(const t8_dtet_t *t, t8_dtet_t *parent)
Compute the parent of a tetrahedron.
int t8_dtet_is_familypv(const t8_dtet_t *f[])
Check whether a collection of eight tetrahedra is a family in Morton order.
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.
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.
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.
This file defines basic operations on an element in a refinement tree.