27 #ifndef T8_DPYRAMID_BITS_H
28 #define T8_DPYRAMID_BITS_H
93 const int num_children,
105 const int face_child);
122 int face,
int corner);
146 const int root_face);
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:114
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:1623
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:294
void t8_dpyramid_compute_coords(const t8_dpyramid_t *p, const int vertex, int coords[])
Compute the coordinates of a vertex of a pyramid.
Definition: t8_dpyramid_bits.c:1686
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:1583
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:395
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:956
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:922
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:1727
int t8_dpyramid_num_siblings(const t8_dpyramid_t *p)
Compute the number of siblings of p.
Definition: t8_dpyramid_bits.c:1230
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:1930
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:804
void t8_dpyramid_debug_print(const t8_dpyramid_t *p)
Print the coordinates, the level and the type of a pyramid.
Definition: t8_dpyramid_bits.c:1972
int t8_dpyramid_num_faces(const t8_dpyramid_t *p)
Return the number of faces of p.
Definition: t8_dpyramid_bits.c:1245
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:1019
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:1535
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:1339
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:1036
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:532
int t8_dpyramid_num_children(const t8_dpyramid_t *p)
Compute the number of children of p.
Definition: t8_dpyramid_bits.c:1217
int t8_dpyramid_compare(const t8_dpyramid_t *p1, const t8_dpyramid_t *p2)
Compare two elements.
Definition: t8_dpyramid_bits.c:456
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:1135
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:1258
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:1554
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:1162
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:1569
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:1774
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:1477
int t8_dpyramid_is_family(t8_dpyramid_t **fam)
Check wether a collection of 10 pyramids is a family in Morton order.
Definition: t8_dpyramid_bits.c:304
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:596
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:446
int t8_dpyramid_num_corners(const t8_dpyramid_t *p)
Compute the number of corners of a pyramid.
Definition: t8_dpyramid_bits.c:1204
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:1093
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:1670
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:1416
void t8_dpyramid_ancestor(const t8_dpyramid_t *pyra, const int level, t8_dpyramid_t *anc)
Compute the ancestor of pyra at a given level.
Definition: t8_dpyramid_bits.c:1747
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:1271
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:989
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:625
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:1488
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:1441
int t8_dpyramid_get_level(const t8_dpyramid_t *p)
Compute the level of a pyramid.
Definition: t8_dpyramid_bits.c:485
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