|
t8
UNKNOWN
t8code is a C library to manage a forest of adaptive space-trees of general element classes in parallel.
|
Definitions of vertex-specific functions. More...
Go to the source code of this file.
Functions | |
| int | t8_dvertex_get_level (const t8_dvertex_t *v) |
| Compute the level of a vertex. More... | |
| void | t8_dvertex_copy (const t8_dvertex_t *v, t8_dvertex_t *dest) |
| Copy all values from one vertex to another. More... | |
| int | t8_dvertex_compare (const t8_dvertex_t *l1, const t8_dvertex_t *l2) |
| Compare two elements. More... | |
| int | t8_dvertex_equal (const t8_dvertex_t *elem1, const t8_dvertex_t *elem2) |
| Check if two elements are equal. More... | |
| void | t8_dvertex_parent (const t8_dvertex_t *v, t8_dvertex_t *parent) |
| Compute the parent of a vertex. More... | |
| void | t8_dvertex_child (const t8_dvertex_t *v, t8_dvertex_t *child) |
| Compute the childid-th child in Morton order of a vertex. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| void | t8_dvertex_sibling (const t8_dvertex_t *v, int sibid, t8_dvertex_t *s) |
| Compute the sibling of a vertex. More... | |
| 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. More... | |
| int | t8_dvertex_is_familypv (const t8_dvertex_t *f[]) |
| Check whether a collection of two vertexs is a family in Morton order. More... | |
| 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. More... | |
| 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,0) More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| void | t8_dvertex_vertex_integer_coords (const t8_dvertex_t *elem, int vertex, int coords[]) |
| Compute the coordinates of a vertex (always 0). More... | |
| 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. More... | |
| 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 tree (level 0) embedded in \( [0,1]^1 \). More... | |
| 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. More... | |
| int | t8_dvertex_is_valid (const t8_dvertex_t *v) |
| Query whether all entries of a vertex are in valid ranges. More... | |
| void | t8_dvertex_debug_print (const t8_dvertex_t *v) |
| Print a vertex. More... | |
| void | t8_dvertex_init (t8_dvertex_t *v) |
| Set default values for a vertex, such that it passes t8_dvertex_is_valid. More... | |
Definitions of vertex-specific functions.
| 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.
| [in] | l | vertex to be considered. |
| [in] | level | level to be considered. |
| void t8_dvertex_child | ( | const t8_dvertex_t * | v, |
| t8_dvertex_t * | child | ||
| ) |
Compute the childid-th child in Morton order of a vertex.
| [in] | l | Input vertex. |
| [in] | childid | The id of the child, 0 or 1, in Morton order. |
| [in,out] | child | Existing vertex whose data will be filled with the date of l's childid-th child. |
| 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.
| [in] | t | vertex to be considered. |
| 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.
| [in] | t | Input vertex. |
| [in,out] | c | Pointers to the 2 computed children in Morton order. t may point to the same quadrant as c[0]. |
| int t8_dvertex_compare | ( | const t8_dvertex_t * | l1, |
| const t8_dvertex_t * | l2 | ||
| ) |
Compare two elements.
returns negative if l1 < l2, zero if l1 equals l2 and positive if l1 > l2. If l2 is a copy of l1 then the elements are equal.
| 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 tree (level 0) embedded in \( [0,1]^1 \).
| [in] | elem | Input vertex. |
| [in] | ref_coords | The reference coordinates in the vertex (num_coords times \( [0,1]^1 \)) |
| [in] | num_coords | Number of coordinates to evaluate |
| [out] | out_coords | An array of num_coords x 1 x double that will be filled with the reference coordinates of the points on the vertex (will be set to 0). |
| void t8_dvertex_copy | ( | const t8_dvertex_t * | v, |
| t8_dvertex_t * | dest | ||
| ) |
Copy all values from one vertex to another.
| [in] | l | The vertex to be copied. |
| [in,out] | dest | Existing vertex whose data will be filled with the data of l. |
| void t8_dvertex_debug_print | ( | const t8_dvertex_t * | v | ) |
Print a vertex.
| [in] | v | vertex to be considered. |
| int t8_dvertex_equal | ( | const t8_dvertex_t * | elem1, |
| const t8_dvertex_t * | elem2 | ||
| ) |
Check if two elements are equal.
| [in] | elem1 | The first element. |
| [in] | elem2 | The second element. |
| 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.
This is the descendant of the vertex in a uniform level refinement that has the smallest id.
| [in] | l | vertex whose descendant is computed. |
| [out] | s | Existing vertex whose data will be filled with the data of l's first descendant on level level. |
| [in] | level | The refinement level. Must be greater than l's refinement level. |
| int t8_dvertex_get_level | ( | const t8_dvertex_t * | v | ) |
Compute the level of a vertex.
| [in] | l | vertex whose level is computed. |
| void t8_dvertex_init | ( | t8_dvertex_t * | v | ) |
Set default values for a vertex, such that it passes t8_dvertex_is_valid.
| [in] | l | vertex to be initialized |
| 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.
| [in,out] | l | Existing vertex whose data will be filled. |
| [in] | id | Index to be considered. |
| [in] | level | level of uniform grid to be considered. |
| int t8_dvertex_is_familypv | ( | const t8_dvertex_t * | f[] | ) |
Check whether a collection of two vertexs is a family in Morton order.
| [in] | f | An array of two vertexs. |
| 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,0)
| [in] | l | Input vertex. |
| 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.
| [in] | p | The input vertex. |
| [in] | face | A face of p. |
| int t8_dvertex_is_valid | ( | const t8_dvertex_t * | v | ) |
Query whether all entries of a vertex are in valid ranges.
| [in] | l | vertex to be considered. |
| 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.
This is the descendant of the vertex in a uniform level refinement that has the largest id.
| [in] | l | vertex whose descendant is computed. |
| [out] | s | Existing vertex whose data will be filled with the data of l's last descendant on level level. |
| [in] | level | The refinement level. Must be greater than l's refinement level. |
| 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.
| [in] | vertex | vertex whose id will be computed. |
| 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.
| [in] | l1 | First input vertex. |
| [in] | l2 | Second input vertex. |
| [in,out] | r | Existing vertex whose data will be filled. |
| void t8_dvertex_parent | ( | const t8_dvertex_t * | v, |
| t8_dvertex_t * | parent | ||
| ) |
Compute the parent of a vertex.
| [in] | l | The input vertex. |
| [in,out] | parent | Existing vertex whose data will be filled with the parent data of l. |
| void t8_dvertex_sibling | ( | const t8_dvertex_t * | v, |
| int | sibid, | ||
| t8_dvertex_t * | s | ||
| ) |
Compute the sibling of a vertex.
| [in] | v | vertex to be considered. |
| [in] | sibid | The id of the sibling, must be 0. |
| [out] | s | The sibling of v. For vertices s is just a copy of v. |
| 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.
Given a vertex e that is a subface of f in one of the trees and given the orientation of the tree connection, construct the face vertex of the respective tree neighbor that logically coincides with e but lies in the coordinate system of the neighbor tree.
| [in] | elem1 | The face element. |
| [in,out] | elem2 | On return the face element elem1 with respect to the coordinate system of the other tree. |
| void t8_dvertex_vertex_integer_coords | ( | const t8_dvertex_t * | elem, |
| int | vertex, | ||
| int | coords[] | ||
| ) |
Compute the coordinates of a vertex (always 0).
| [in] | elem | vertex whose vertex is computed. |
| [in] | vertex | The number of the vertex of elem |
| [out] | coords | The coordinates of the computed vertex |
| 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.
| [in] | elem | vertex whose vertex is computed. |
| [in] | vertex | The number of the vertex of elem (must be 0). |
| [out] | coords | The coordinates of the computed vertex, must have one entry (will be set to 0). |