| 
    t8
    UNKNOWN
    
   t8code is a C library to manage a forest of adaptive                           space-trees of general element classes in parallel. 
   | 
 
Definition if prism-specific functions. More...
Go to the source code of this file.
Functions | |
| int | t8_dprism_get_level (const t8_dprism_t *p) | 
| Compute the level of a prism.  More... | |
| void | t8_dprism_copy (const t8_dprism_t *p, t8_dprism_t *dest) | 
| Copy all values from one prism to another.  More... | |
| int | t8_dprism_compare (const t8_dprism_t *p1, const t8_dprism_t *p2) | 
| Compare two elements.  More... | |
| int | t8_dprism_equal (const t8_dprism_t *elem1, const t8_dprism_t *elem2) | 
| Check if two elements are equal.  More... | |
| void | t8_dprism_init_linear_id (t8_dprism_t *p, int level, t8_linearidx_t id) | 
| Initialize a prism as the prism with a given global id in a uniform refinement of a given level.  More... | |
| void | t8_dprism_successor (const t8_dprism_t *p, t8_dprism_t *succ, int level) | 
| Computes the successor of a prism in a uniform grid of level level.  More... | |
| void | t8_dprism_parent (const t8_dprism_t *p, t8_dprism_t *parent) | 
| Compute the parent of a prism.  More... | |
| void | t8_dprism_first_descendant (const t8_dprism_t *p, t8_dprism_t *desc, int level) | 
| Compute the first descendant of a prism at a given level.  More... | |
| int | t8_dprism_child_id (const t8_dprism_t *p) | 
| Compute the position of the ancestor of this child at level level within its siblings.  More... | |
| int | t8_dprism_is_familypv (t8_dprism_t **fam) | 
| Check whether a collection of eight prism is a family in Morton order.  More... | |
| void | t8_dprism_nearest_common_ancestor (const t8_dprism_t *p1, const t8_dprism_t *p2, t8_dprism_t *r) | 
| Computes the nearest common ancestor of two prisms in the same tree.  More... | |
| void | t8_dprism_boundary_face (const t8_dprism_t *p, int face, t8_element_t *boundary) | 
| Constructs the boundary element of a prism at a given face.  More... | |
| int | t8_dprism_is_root_boundary (const t8_dprism_t *p, int face) | 
| Compute whether a given prism shares a given face with its root tree.  More... | |
| int | t8_dprism_is_inside_root (t8_dprism_t *p) | 
| Test if a prism lies inside of the root prism, that is the prism of level 0, anchor node (0,0) and type 0.  More... | |
| void | t8_dprism_child (const t8_dprism_t *p, int childid, t8_dprism_t *child) | 
| Compute the childid-th child in Morton order of a prism.  More... | |
| t8_element_shape_t | t8_dprism_face_shape (const t8_dprism_t *p, int face) | 
| Return the shape of a face.  More... | |
| int | t8_dprism_num_face_children (const t8_dprism_t *p, int face) | 
| Compute the number of children at a given face.  More... | |
| int | t8_dprism_face_neighbour (const t8_dprism_t *p, int face, t8_dprism_t *neigh) | 
| Compute the face neighbor of a prism.  More... | |
| int | t8_dprism_get_face_corner (const t8_dprism_t *p, int face, int corner) | 
| Return the corner number of a prism corresponding to a given face corner.  More... | |
| void | t8_dprism_childrenpv (const t8_dprism_t *p, int length, t8_dprism_t *c[]) | 
| Compute the 8 children of a prism, array version.  More... | |
| int | t8_dprism_ancestor_id (t8_dprism_t *p, int level) | 
| Compute the position of the ancestor of this child at level level within its siblings.  More... | |
| void | t8_dprism_children_at_face (const t8_dprism_t *p, int face, t8_dprism_t **children, int num_children, int *child_indices) | 
| Given a prism and a face of the prism, compute all children of the prism that touch the face.  More... | |
| int | t8_dprism_face_child_face (const t8_dprism_t *elem, int face, int face_child) | 
| Given a face of a prism and a child number of a child of that face, return the face number of the child of the prism that matches the child face.  More... | |
| int | t8_dprism_face_parent_face (const t8_dprism_t *prism, int face) | 
| Given a face of a prism return the face number of the parent of the prism that matches the prism's face.  More... | |
| int | t8_dprism_tree_face (const t8_dprism_t *p, int face) | 
| Given a prism and a face of this prism.  More... | |
| void | t8_dprism_extrude_face (const t8_element_t *face, t8_element_t *elem, const int root_face) | 
| Given a boundary face inside a root tree's face construct the element inside the root tree that has the given face as a face.  More... | |
| void | t8_dprism_last_descendant (const t8_dprism_t *p, t8_dprism_t *s, int level) | 
| Compute the last descendant of a prism at a given level.  More... | |
| void | t8_dprism_corner_descendant (const t8_dprism_t *p, t8_dprism_t *s, int corner, int level) | 
| Compute the descendant of a prism in a given corner.  More... | |
| void | t8_dprism_vertex_integer_coords (const t8_dprism_t *elem, int vertex, int coords[3]) | 
| Compute the coordinates of a vertex of a prism.  More... | |
| void | t8_dprism_vertex_ref_coords (const t8_dprism_t *elem, int vertex, double coords[3]) | 
| Compute the reference coordinates of a vertex of a prism when the tree (level 0) is embedded in \( [0,1]^3 \).  More... | |
| void | t8_dprism_compute_reference_coords (const t8_dprism_t *elem, const double *ref_coords, const size_t num_coords, double *out_coords) | 
| Convert points in the reference space of a prism element to points in the reference space of the tree (level 0) embedded in \( [0,1]^3 \).  More... | |
| t8_linearidx_t | t8_dprism_linear_id (const t8_dprism_t *p, int level) | 
| Computes the linear position of a prism in an uniform grid.  More... | |
| int | t8_dprism_is_valid (const t8_dprism_t *p) | 
| Query whether all entries of a prism are in valid ranges.  More... | |
Variables | |
| int | t8_dprism_face_corners [5][4] | 
| Look-up table for the corners of each face.  | |
Definition if prism-specific functions.
| int t8_dprism_ancestor_id | ( | t8_dprism_t * | p, | 
| int | level | ||
| ) | 
Compute the position of the ancestor of this child at level level within its siblings.
| [in] | p | prism to be considered. | 
| [in] | level | level to be considered. | 
| void t8_dprism_boundary_face | ( | const t8_dprism_t * | p, | 
| int | face, | ||
| t8_element_t * | boundary | ||
| ) | 
Constructs the boundary element of a prism at a given face.
| [in] | p | The input prism. | 
| [in] | face | A face of p | 
| [in,out] | boundary | The boundary element at face of p | 
| void t8_dprism_child | ( | const t8_dprism_t * | p, | 
| int | childid, | ||
| t8_dprism_t * | child | ||
| ) | 
Compute the childid-th child in Morton order of a prism.
| [in] | p | Input prism. | 
| [in] | childid | The id of the child, in 0 - 7, in Morton order. | 
| [in,out] | child | Existing prism whose data will be filled with the date of p's childid-th child. | 
| int t8_dprism_child_id | ( | const t8_dprism_t * | p | ) | 
Compute the position of the ancestor of this child at level level within its siblings.
| [in] | p | prism to be considered. | 
| void t8_dprism_children_at_face | ( | const t8_dprism_t * | p, | 
| int | face, | ||
| t8_dprism_t ** | children, | ||
| int | num_children, | ||
| int * | child_indices | ||
| ) | 
Given a prism and a face of the prism, compute all children of the prism that touch the face.
| [in] | p | The prism. | 
| [in] | face | A face of p. | 
| [in,out] | children | Allocated prism, in which the children of p that share a face with face are stored. They will be stored in order of their child_id. | 
| [in] | num_children | The number of prisms in children. Must match the number of children that touch face. | 
| void t8_dprism_childrenpv | ( | const t8_dprism_t * | p, | 
| int | length, | ||
| t8_dprism_t * | c[] | ||
| ) | 
Compute the 8 children of a prism, array version.
| [in] | p | Input prism. | 
| [in,out] | c | Pointers to the 8 computed children in Morton order. | 
| int t8_dprism_compare | ( | const t8_dprism_t * | p1, | 
| const t8_dprism_t * | p2 | ||
| ) | 
Compare two elements.
returns negative if p1 < p2, zero if p1 equals p2 and positive if p1 > p2. If p2 is a copy of p1 then the elements are equal.
| void t8_dprism_compute_reference_coords | ( | const t8_dprism_t * | elem, | 
| const double * | ref_coords, | ||
| const size_t | num_coords, | ||
| double * | out_coords | ||
| ) | 
Convert points in the reference space of a prism element to points in the reference space of the tree (level 0) embedded in \( [0,1]^3 \).
| [in] | ref_coords | The reference coordinates in the prism (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 prism. | 
| void t8_dprism_copy | ( | const t8_dprism_t * | p, | 
| t8_dprism_t * | dest | ||
| ) | 
Copy all values from one prism to another.
| [in] | p | The prism to be copied. | 
| [in,out] | dest | Existing prism whose data will be filled with the data of p. | 
| void t8_dprism_corner_descendant | ( | const t8_dprism_t * | p, | 
| t8_dprism_t * | s, | ||
| int | corner, | ||
| int | level | ||
| ) | 
Compute the descendant of a prism in a given corner.
| [in] | p | Prism whose descendant is computed. | 
| [out] | s | Existing prism whose data will be filled with the data of p'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 p's level. | 
| int t8_dprism_equal | ( | const t8_dprism_t * | elem1, | 
| const t8_dprism_t * | elem2 | ||
| ) | 
Check if two elements are equal.
| [in] | elem1 | The first element. | 
| [in] | elem2 | The second element. | 
| void t8_dprism_extrude_face | ( | const t8_element_t * | face, | 
| t8_element_t * | elem, | ||
| const int | root_face | ||
| ) | 
Given a boundary face inside a root tree's face construct the element inside the root tree that has the given face as a face.
| [in] | face | A face element. | 
| [in,out] | elem | An allocated element. The entries will be filled with the data of the element that has face as a face and lies within the root tree. | 
| [in] | root_face | The index of the face of the root tree in which face lies. | 
| int t8_dprism_face_child_face | ( | const t8_dprism_t * | elem, | 
| int | face, | ||
| int | face_child | ||
| ) | 
Given a face of a prism and a child number of a child of that face, return the face number of the child of the prism that matches the child face.
| [in] | elem | The prism. | 
| [in] | face | The number of the face. | 
| [in] | face_child | The child number of a child of the face prism. | 
| int t8_dprism_face_neighbour | ( | const t8_dprism_t * | p, | 
| int | face, | ||
| t8_dprism_t * | neigh | ||
| ) | 
Compute the face neighbor of a prism.
| [in] | p | Input prism. | 
| [in] | face | The face across which to generate the neighbor. | 
| [in,out] | n | Existing prism whose data will be filled. | 
| int t8_dprism_face_parent_face | ( | const t8_dprism_t * | prism, | 
| int | face | ||
| ) | 
Given a face of a prism return the face number of the parent of the prism that matches the prism's face.
Or return -1 if no face of the parent matches the face.
| [in] | prism | The prism. | 
| [in] | face | Then number of the face. | 
| t8_element_shape_t t8_dprism_face_shape | ( | const t8_dprism_t * | p, | 
| int | face | ||
| ) | 
Return the shape of a face.
| [in] | p | Input prism. | 
| [in] | face | A face id for p. | 
| void t8_dprism_first_descendant | ( | const t8_dprism_t * | p, | 
| t8_dprism_t * | desc, | ||
| int | level | ||
| ) | 
Compute the first descendant of a prism at a given level.
This is the descendant of the prism in a uniform level refinement that has the smallest id.
| [in] | p | Prism whose descendant is computed. | 
| [out] | s | Existing prism whose data will be filled with the data of p's first descendant on level level. | 
| [in] | level | The refinement level. Must be greater than p's refinement level. | 
| int t8_dprism_get_face_corner | ( | const t8_dprism_t * | p, | 
| int | face, | ||
| int | corner | ||
| ) | 
Return the corner number of a prism corresponding to a given face corner.
| [in] | p | Input prism. | 
| [in] | face | The face number. | 
| [in] | corner | A corner of face | 
| int t8_dprism_get_level | ( | const t8_dprism_t * | p | ) | 
Compute the level of a prism.
| [in] | p | Line whose prism is computed. | 
| void t8_dprism_init_linear_id | ( | t8_dprism_t * | p, | 
| int | level, | ||
| t8_linearidx_t | id | ||
| ) | 
Initialize a prism as the prism with a given global id in a uniform refinement of a given level.
| [in,out] | p | Existing prism whose data will be filled. | 
| [in] | id | Index to be considered. | 
| [in] | level | level of uniform grid to be considered. | 
| int t8_dprism_is_familypv | ( | t8_dprism_t ** | fam | ) | 
Check whether a collection of eight prism is a family in Morton order.
| [in] | fam | An array of eight prism. | 
| int t8_dprism_is_inside_root | ( | t8_dprism_t * | p | ) | 
Test if a prism lies inside of the root prism, that is the prism of level 0, anchor node (0,0) and type 0.
| [in] | p | Input prism. | 
| int t8_dprism_is_root_boundary | ( | const t8_dprism_t * | p, | 
| int | face | ||
| ) | 
Compute whether a given prism shares a given face with its root tree.
| [in] | p | The input prism. | 
| [in] | face | A face of p. | 
| int t8_dprism_is_valid | ( | const t8_dprism_t * | p | ) | 
Query whether all entries of a prism are in valid ranges.
A prism is valid if and only if its triangle and line member are valid.
| [in] | p | prism to be considered. | 
| void t8_dprism_last_descendant | ( | const t8_dprism_t * | p, | 
| t8_dprism_t * | s, | ||
| int | level | ||
| ) | 
Compute the last descendant of a prism at a given level.
This is the descendant of the prism in a uniform level refinement that has the largest id.
| [in] | p | Prism whose descendant is computed. | 
| [out] | s | Existing prism whose data will be filled with the data of p's last descendant on level level. | 
| [in] | level | The refinement level. Must be greater than p's refinement level. | 
| t8_linearidx_t t8_dprism_linear_id | ( | const t8_dprism_t * | p, | 
| int | level | ||
| ) | 
Computes the linear position of a prism in an uniform grid.
| [in] | p | Prism whose id will be computed. | 
| void t8_dprism_nearest_common_ancestor | ( | const t8_dprism_t * | p1, | 
| const t8_dprism_t * | p2, | ||
| t8_dprism_t * | r | ||
| ) | 
Computes the nearest common ancestor of two prisms in the same tree.
| [in] | p1 | First input tetrahedron. | 
| [in] | p2 | Second input tetrahedron. | 
| [in,out] | r | Existing tetrahedron whose data will be filled. | 
| int t8_dprism_num_face_children | ( | const t8_dprism_t * | p, | 
| int | face | ||
| ) | 
Compute the number of children at a given face.
| [in] | p | Input prism. | 
| [in] | face | The face number | 
| void t8_dprism_parent | ( | const t8_dprism_t * | p, | 
| t8_dprism_t * | parent | ||
| ) | 
Compute the parent of a prism.
| [in] | p | Input prism. | 
| [in,out] | parent | Existing prism whose data will be filled with the data of p's parent. | 
| void t8_dprism_successor | ( | const t8_dprism_t * | p, | 
| t8_dprism_t * | succ, | ||
| int | level | ||
| ) | 
Computes the successor of a prism in a uniform grid of level level.
| [in] | p | prism whose id will be computed. | 
| [in,out] | s | Existing prism whose data will be filled with the data of l's successor on level level. | 
| [in] | level | level of uniform grid to be considered. | 
| int t8_dprism_tree_face | ( | const t8_dprism_t * | p, | 
| int | face | ||
| ) | 
Given a prism and a face of this prism.
If the face lies on the tree boundary, return the face number of the tree face. If not the return value is arbitrary.
| [in] | p | The prism. | 
| [in] | face | The index of a face of elem. | 
| void t8_dprism_vertex_integer_coords | ( | const t8_dprism_t * | elem, | 
| int | vertex, | ||
| int | coords[3] | ||
| ) | 
Compute the coordinates of a vertex of a prism.
| [in] | elem | Input prism. | 
| [in] | vertex | The number of the vertex. | 
| [out] | coordinates | An array of 3 t8_dprism_coord_t that will be filled with the coordinates of the vertex. | 
| void t8_dprism_vertex_ref_coords | ( | const t8_dprism_t * | elem, | 
| int | vertex, | ||
| double | coords[3] | ||
| ) | 
Compute the reference coordinates of a vertex of a prism when the tree (level 0) is embedded in \( [0,1]^3 \).
| [in] | elem | Input prism. | 
| [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. |