27 #ifndef T8_DVERTEX_BITS_H
28 #define T8_DVERTEX_BITS_H
Definition: t8_dvertex.h:48
uint64_t t8_linearidx_t
A type for storing SFC indices.
Definition: t8.h:109
#define T8_DVERTEX_CHILDREN
The number of children that a vertex is refined into.
Definition: t8_dvertex.h:33
void t8_dvertex_compute_reference_coords(const t8_dvertex_t *elem, const double *ref_coords, const size_t num_coords, double *out_coords)
Convert points in the reference space of a vertex element to points in the reference space of the tre...
Definition: t8_dvertex_bits.c:178
int t8_dvertex_ancestor_id(const t8_dvertex_t *v, int level)
Compute the position of the ancestor of this child at level level within its siblings.
Definition: t8_dvertex_bits.c:77
int t8_dvertex_compare(const t8_dvertex_t *l1, const t8_dvertex_t *l2)
Compare two elements.
Definition: t8_dvertex_bits.c:44
void t8_dvertex_nearest_common_ancestor(const t8_dvertex_t *t1, const t8_dvertex_t *t2, t8_dvertex_t *r)
Computes the nearest common ancestor of two vertexs in the same tree.
Definition: t8_dvertex_bits.c:70
int t8_dvertex_is_valid(const t8_dvertex_t *v)
Query whether all entries of a vertex are in valid ranges.
Definition: t8_dvertex_bits.c:197
void t8_dvertex_debug_print(const t8_dvertex_t *v)
Print a vertex.
Definition: t8_dvertex_bits.c:204
void t8_dvertex_first_descendant(const t8_dvertex_t *v, t8_dvertex_t *s, int level)
Compute the first descendant of a vertex at a given level.
Definition: t8_dvertex_bits.c:146
int t8_dvertex_is_inside_root(const t8_dvertex_t *v)
Test if a vertex lies inside of the root vertex, that is the vertex of level 0, anchor node (0,...
Definition: t8_dvertex_bits.c:122
int t8_dvertex_get_level(const t8_dvertex_t *v)
Compute the level of a vertex.
Definition: t8_dvertex_bits.c:26
t8_linearidx_t t8_dvertex_linear_id(const t8_dvertex_t *elem, int level)
Computes the linear position of a vertex in an uniform grid.
Definition: t8_dvertex_bits.c:189
int t8_dvertex_equal(const t8_dvertex_t *elem1, const t8_dvertex_t *elem2)
Check if two elements are equal.
Definition: t8_dvertex_bits.c:38
void t8_dvertex_parent(const t8_dvertex_t *v, t8_dvertex_t *parent)
Compute the parent of a vertex.
Definition: t8_dvertex_bits.c:52
void t8_dvertex_child(const t8_dvertex_t *v, t8_dvertex_t *child)
Compute the childid-th child in Morton order of a vertex.
Definition: t8_dvertex_bits.c:61
int t8_dvertex_is_familypv(const t8_dvertex_t *f[])
Check whether a collection of two vertexs is a family in Morton order.
Definition: t8_dvertex_bits.c:108
int t8_dvertex_is_root_boundary(const t8_dvertex_t *p, int face)
Compute whether a given vertex shares a given face with its root tree.
Definition: t8_dvertex_bits.c:115
void t8_dvertex_init_linear_id(t8_dvertex_t *v, int level, t8_linearidx_t id)
Initialize a vertex as the vertex with a given global id in a uniform refinement of a given level.
Definition: t8_dvertex_bits.c:129
int t8_dvertex_child_id(const t8_dvertex_t *t)
Compute the position of the ancestor of this child at level level within its siblings.
Definition: t8_dvertex_bits.c:84
void t8_dvertex_copy(const t8_dvertex_t *v, t8_dvertex_t *dest)
Copy all values from one vertex to another.
Definition: t8_dvertex_bits.c:32
void t8_dvertex_vertex_ref_coords(const t8_dvertex_t *elem, int vertex, double coords[])
Compute the coordinates of a vertex (always 0) inside the [0,1]^0 reference space.
Definition: t8_dvertex_bits.c:170
void t8_dvertex_childrenpv(const t8_dvertex_t *t, t8_dvertex_t *c[T8_DVERTEX_CHILDREN])
Compute the 2 children of a vertex, array version.
Definition: t8_dvertex_bits.c:99
void t8_dvertex_transform_face(const t8_dvertex_t *vertex1, t8_dvertex_t *vertex2)
Suppose we have two trees that share a common vertex face f.
Definition: t8_dvertex_bits.c:139
void t8_dvertex_vertex_integer_coords(const t8_dvertex_t *elem, int vertex, int coords[])
Compute the coordinates of a vertex (always 0).
Definition: t8_dvertex_bits.c:162
void t8_dvertex_sibling(const t8_dvertex_t *v, int sibid, t8_dvertex_t *s)
Compute the sibling of a vertex.
Definition: t8_dvertex_bits.c:91
void t8_dvertex_last_descendant(const t8_dvertex_t *v, t8_dvertex_t *s, int level)
Compute the last descendant of a vertex at a given level.
Definition: t8_dvertex_bits.c:154
void t8_dvertex_init(t8_dvertex_t *v)
Set default values for a vertex, such that it passes t8_dvertex_is_valid.
Definition: t8_dvertex_bits.c:210
This file defines basic operations on an element in a refinement tree.