27 #ifndef T8_DPYRAMID_BITS_H
28 #define T8_DPYRAMID_BITS_H
This data type stores a pyramid.
Definition: t8_dpyramid.h:65
uint64_t t8_linearidx_t
A type for storing SFC indices.
Definition: t8.h:109
t8_element_shape_t t8_dpyramid_shape(const t8_dpyramid_t *p)
Returns the shape of the pyramid (pyramid or tetrahedron)
Definition: t8_dpyramid_bits.c:1445
int t8_dpyramid_ancestor_id(const t8_dpyramid_t *p, const int level)
Return the child-id of the ancestor of p at level level.
Definition: t8_dpyramid_bits.c:257
void t8_dpyramid_ancestor(const t8_dpyramid_t *pyra, const int level, t8_dpyramid_t *ancestor)
Compute the ancestor of pyra at a given level.
Definition: t8_dpyramid_bits.c:1607
int t8_dpyramid_equal(const t8_dpyramid_t *elem1, const t8_dpyramid_t *elem2)
Check if two elements are equal.
Definition: t8_dpyramid_bits.c:387
void t8_dpyramid_parent(const t8_dpyramid_t *p, t8_dpyramid_t *parent)
Compute the parent of a given pyramid.
Definition: t8_dpyramid_bits.c:1408
int t8_dpyramid_is_root_boundary(const t8_dpyramid_t *p, const int face)
Compute whether a given pyramid shares a given face with its root tree.
Definition: t8_dpyramid_bits.c:332
int t8_dpyramid_tree_face(const t8_dpyramid_t *p, const int face)
compute if a given element lies on the tree boundary and return the face number of the tree face.
Definition: t8_dpyramid_bits.c:850
int t8_dpyramid_tet_boundary(const t8_dpyramid_t *p, const int face)
Check, if a tet of type 0 or 3 has a common face with its pyramid-ancestor.
Definition: t8_dpyramid_bits.c:819
void t8_dpyramid_vertex_reference_coords(const t8_dpyramid_t *elem, const int vertex, double coords[])
Compute the reference coordinates of a vertex of a pyramid when the tree (level 0 triangle) is embedd...
Definition: t8_dpyramid_bits.c:1549
int t8_dpyramid_num_siblings(const t8_dpyramid_t *p)
Compute the number of siblings of p.
Definition: t8_dpyramid_bits.c:1095
int t8_dpyramid_is_valid(const t8_dpyramid_t *p)
Query whether all entries of a pyramid are in valid ranges.
Definition: t8_dpyramid_bits.c:1755
int t8_dpyramid_face_parent_face(const t8_dpyramid_t *elem, const int face)
Given a face of an element return the face number of the parent of the element that matches the eleme...
Definition: t8_dpyramid_bits.c:708
int t8_dpyramid_num_faces(const t8_dpyramid_t *p)
Return the number of faces of p.
Definition: t8_dpyramid_bits.c:1108
int t8_dpyramid_face_neighbor_inside(const t8_dpyramid_t *p, t8_dpyramid_t *neigh, const int face, int *neigh_face)
Compute the neighbor of p along a given face and the number of the dual face if the neighbor is insid...
Definition: t8_dpyramid_bits.c:905
int t8_dpyramid_face_child_face(const t8_dpyramid_t *p, const int face, const int face_child)
Given a face of a pyramid and a child number of a child of that face, return the face number of the c...
Definition: t8_dpyramid_bits.c:1364
int t8_dpyramid_extrude_face(const t8_element_t *face, t8_dpyramid_t *p, const int root_face)
Given a boundary face inside the root pyramids's face construct the element inside the root pyramid t...
Definition: t8_dpyramid_bits.c:1195
void t8_dpyramid_compute_integer_coords(const t8_dpyramid_t *elem, const int vertex, int coords[])
Compute the coordinates of a vertex of a pyramid.
Definition: t8_dpyramid_bits.c:1503
void t8_dpyramid_first_descendant(const t8_dpyramid_t *p, t8_dpyramid_t *desc, const int level)
Compute the first descendant of a pyramid at a given level.
Definition: t8_dpyramid_bits.c:919
void t8_dpyramid_init_linear_id(t8_dpyramid_t *p, const int level, t8_linearidx_t id)
Initialize a pyramid as the pyramid with a given global id in a uniform refinement of a given level.
Definition: t8_dpyramid_bits.c:463
int t8_dpyramid_num_children(const t8_dpyramid_t *p)
Compute the number of children of p.
Definition: t8_dpyramid_bits.c:1083
int t8_dpyramid_compare(const t8_dpyramid_t *p1, const t8_dpyramid_t *p2)
Compare two elements.
Definition: t8_dpyramid_bits.c:394
void t8_dpyramid_last_descendant(const t8_dpyramid_t *p, t8_dpyramid_t *desc, int level)
Compute the last descendant of a pyramid at a given level.
Definition: t8_dpyramid_bits.c:1009
int t8_dpyramid_max_num_faces(const t8_dpyramid_t *p)
Return the maximal number of faces of an element p.
Definition: t8_dpyramid_bits.c:1120
t8_element_shape_t t8_dpyramid_face_shape(const t8_dpyramid_t *pyra, int face)
Given the facenumber of a pyramid, return the shape of the face.
Definition: t8_dpyramid_bits.c:1379
void t8_dpyramid_last_descendant_face(const t8_dpyramid_t *p, const int face, t8_dpyramid_t *last_desc, const int level)
Construct the last descendant of a pyramid touching a given face.
Definition: t8_dpyramid_bits.c:1034
int t8_dpyramid_get_face_corner(const t8_dpyramid_t *pyra, int face, int corner)
Returns the corner number of a pyramid given a face of a pyramid and a corner number regarding that f...
Definition: t8_dpyramid_bits.c:1394
void t8_dpyramid_nearest_common_ancestor(const t8_dpyramid_t *pyra1, const t8_dpyramid_t *pyra2, t8_dpyramid_t *nca)
Compute the nearest common ancestor of two elements.
Definition: t8_dpyramid_bits.c:1633
void t8_dpyramid_children(const t8_dpyramid_t *p, t8_dpyramid_t **c)
Compute the children of a pyramid, array version.
Definition: t8_dpyramid_bits.c:1314
int t8_dpyramid_is_family(t8_dpyramid_t **fam)
Check whether a collection of 10 pyramids is a family in Morton order.
Definition: t8_dpyramid_bits.c:266
int t8_dpyramid_type_at_level(const t8_dpyramid_t *p, const int level)
Compute the type of a pyramid at a given level.
Definition: t8_dpyramid_bits.c:516
void t8_dpyramid_copy(const t8_dpyramid_t *source, t8_dpyramid_t *dest)
Copy the data from source to dest.
Definition: t8_dpyramid_bits.c:377
int t8_dpyramid_num_corners(const t8_dpyramid_t *p)
Compute the number of corners of a pyramid.
Definition: t8_dpyramid_bits.c:1071
void t8_dpyramid_first_descendant_face(const t8_dpyramid_t *p, const int face, t8_dpyramid_t *first_desc, const int level)
Construct the first descendant of a pyramid touching a given face.
Definition: t8_dpyramid_bits.c:970
void t8_dpyramid_compute_reference_coords(const t8_dpyramid_t *elem, const double *ref_coords, const size_t num_coords, double *out_coords)
Convert points in the reference space of a pyramid element to points in the reference space of the tr...
Definition: t8_dpyramid_bits.c:1561
void t8_dpyramid_successor(const t8_dpyramid_t *elem, t8_dpyramid_t *s, const int level)
Computes the successor of a pyramid in a uniform grid of level level.
Definition: t8_dpyramid_bits.c:1489
int t8_dpyramid_child_id(const t8_dpyramid_t *p)
Compute the position of the ancestor of this child at level level within its siblings.
Definition: t8_dpyramid_bits.c:1262
void t8_dpyramid_boundary_face(const t8_dpyramid_t *p, const int face, t8_element_t *boundary)
Given a boundary element and a facenumber of this element, compute the boundary face.
Definition: t8_dpyramid_bits.c:1132
int t8_dpyramid_is_inside_root(const t8_dpyramid_t *p)
Returns zero if p is not inside root, 1 ow.
Definition: t8_dpyramid_bits.c:880
t8_linearidx_t t8_dpyramid_linear_id(const t8_dpyramid_t *p, const int level)
Computes the linear position of a pyramid in an uniform grid.
Definition: t8_dpyramid_bits.c:544
void t8_dpyramid_children_at_face(const t8_dpyramid_t *p, const int face, t8_dpyramid_t *children[], const int num_children, int *child_indices)
Given a pyramid and a face, compute all children touching this face.
Definition: t8_dpyramid_bits.c:1324
void t8_dpyramid_child(const t8_dpyramid_t *elem, const int child_id, t8_dpyramid_t *child)
Compute the childid-th child in Morton order of a pyramid.
Definition: t8_dpyramid_bits.c:1283
int t8_dpyramid_get_level(const t8_dpyramid_t *p)
Compute the level of a pyramid.
Definition: t8_dpyramid_bits.c:421
This file defines basic operations on an element in a refinement tree.
struct t8_element t8_element_t
Opaque structure for a generic element, only used as pointer.
Definition: t8_element.h:42
t8_eclass_t t8_element_shape_t
Type definition for the geometric shape of an element.
Definition: t8_element_shape.h:38