144 const void *v2,
const void *u);
646 const int ftransform[]);
661 const int ftransform[]);
666 int corner,
int inside);
674 int icorner,
int inside);
701 quadrant,
int level);
711 int level, uint64_t
id);
739 sc_rand_state_t * rstate);
The top-level 2D p4est interface.
int32_t p4est_qcoord_t
Typedef for quadrant coordinates.
Definition: p4est_base.h:81
int32_t p4est_topidx_t
Typedef for counting topological entities (trees, tree vertices).
Definition: p4est_base.h:93
int32_t p4est_locidx_t
Typedef for processor-local indexing of quadrants and nodes.
Definition: p4est_base.h:106
void p4est_quadrant_half_corner_neighbor(const p4est_quadrant_t *q, int corner, p4est_quadrant_t *r)
Compute the half size corner neighbor of a quadrant.
void p4est_nearest_common_ancestor_D(const p4est_quadrant_t *q1, const p4est_quadrant_t *q2, p4est_quadrant_t *r)
Computes the nearest common ancestor of two quadrants in the same tree.
int p4est_quadrant_is_next(const p4est_quadrant_t *q, const p4est_quadrant_t *r)
Test if two quadrants follow each other in the tree with no holes.
void p4est_quadrant_half_face_neighbors(const p4est_quadrant_t *q, int face, p4est_quadrant_t n[], p4est_quadrant_t nur[])
Get the smaller face neighbors of q.
int p4est_coordinates_compare(const p4est_qcoord_t v1[], const p4est_qcoord_t v2[])
Compare two sets of coordinates in their Morton ordering.
void p4est_quadrant_last_descendant(const p4est_quadrant_t *q, p4est_quadrant_t *ld, int level)
Compute the last descendant of a quadrant on a given level.
int p4est_node_equal_piggy_fn(const void *v1, const void *v2, const void *u)
Test if two nodes are in the same tree and have equal Morton indices.
int p4est_quadrant_is_node(const p4est_quadrant_t *q, int inside)
Test if a quadrant is used to represent a mesh node.
void p4est_quadrant_set_morton(p4est_quadrant_t *quadrant, int level, uint64_t id)
Set quadrant Morton indices based on linear position in uniform grid.
int p4est_quadrant_overlaps_tree(p4est_tree_t *tree, const p4est_quadrant_t *q)
Test if a quadrant has at least partial overlap with a tree.
unsigned p4est_node_hash_piggy_fn(const void *v, const void *u)
Compute hash value of a node based on its tree and Morton index.
int p4est_quadrant_is_familyv(const p4est_quadrant_t q[])
Test if 4 quadrants are siblings in Morton ordering, array version.
int p4est_quadrant_is_ancestor(const p4est_quadrant_t *q, const p4est_quadrant_t *r)
Test if a quadrant is an ancestor of another quadrant.
int p4est_quadrant_child_id(const p4est_quadrant_t *q)
Compute the position of this child within its siblings.
unsigned p4est_quadrant_hash_fn(const void *v, const void *u)
Computes a hash value for a quadrant by the lookup3 method.
void p4est_quadrant_face_neighbor(const p4est_quadrant_t *q, int face, p4est_quadrant_t *r)
Compute the face neighbor of a quadrant.
void p4est_quadrant_pad(p4est_quadrant_t *q)
Write -1 into the pad8 and pad16 members of a quadrant.
int p4est_quadrant_compare_piggy(const void *v1, const void *v2)
Compare two quadrants in their Morton ordering and the which_tree member.
int p4est_quadrant_disjoint(const void *v1, const void *v2)
Compare two quadrants in their Morton ordering, with equivalence if the two quadrants overlap.
void p4est_nearest_common_ancestor(const p4est_quadrant_t *q1, const p4est_quadrant_t *q2, p4est_quadrant_t *r)
Computes the nearest common ancestor of two quadrants in the same tree.
int p4est_quadrant_is_inside_tree(p4est_tree_t *tree, const p4est_quadrant_t *q)
Test if a quadrant is completely contained within a tree.
void p4est_quadrant_corner_neighbor(const p4est_quadrant_t *q, int corner, p4est_quadrant_t *r)
Compute the corner neighbor of a quadrant.
int p4est_quadrant_is_outside_face(const p4est_quadrant_t *q)
Test if a quadrant is outside a tree face boundary (no corner).
int p4est_quadrant_is_outside_corner(const p4est_quadrant_t *q)
Test if a quadrant is outside a tree corner boundary.
void p4est_neighbor_transform_quadrant(const p4est_neighbor_transform_t *nt, const p4est_quadrant_t *self_quad, p4est_quadrant_t *neigh_quad)
Transform a quadrant from self's coordinate system to neighbor's coordinate system.
int p4est_quadrant_compare_local_num(const void *v1, const void *v2)
Compare two quadrants with respect to their local_num in the piggy3 member.
void p4est_quadrant_first_descendant(const p4est_quadrant_t *q, p4est_quadrant_t *fd, int level)
Compute the first descendant of a quadrant on a given level.
int p4est_quadrant_is_ancestor_face(const p4est_quadrant_t *descendant, const p4est_quadrant_t *ancestor, int face)
Check if a descendant shares a face with a (strict) ancestor.
int p4est_coordinates_is_inside_root(const p4est_qcoord_t coord[])
Test if Morton indices are inside the unit tree.
void p4est_node_unclamp(p4est_quadrant_t *n)
Move a clamped node out on the border.
void p4est_node_to_quadrant(const p4est_quadrant_t *n, int level, p4est_quadrant_t *q)
Find the enclosing quadrant of a given node at a given level.
int p4est_quadrant_is_ancestor_D(const p4est_quadrant_t *q, const p4est_quadrant_t *r)
Test if a quadrant is an ancestor of another quadrant.
int p4est_quadrant_is_equal(const p4est_quadrant_t *q1, const p4est_quadrant_t *q2)
Test if two quadrants have equal Morton indices.
void p4est_quadrant_children(const p4est_quadrant_t *q, p4est_quadrant_t *c0, p4est_quadrant_t *c1, p4est_quadrant_t *c2, p4est_quadrant_t *c3)
Compute the 4 children of a quadrant.
void p4est_quadrant_shift_corner(const p4est_quadrant_t *q, p4est_quadrant_t *r, int corner)
Shifts a quadrant until it touches the specified corner from the inside.
void p4est_quadrant_ancestor(const p4est_quadrant_t *q, int level, p4est_quadrant_t *r)
Compute the ancestor of a quadrant at a given level.
void p4est_quadrant_enlarge_first(const p4est_quadrant_t *a, p4est_quadrant_t *q)
Enlarge a quadrant as long as its first corner stays the same.
void p4est_quadrant_successor(const p4est_quadrant_t *quadrant, p4est_quadrant_t *result)
Compute the successor according to the Morton index in a uniform mesh.
int p4est_coordinates_is_valid(const p4est_qcoord_t coord[], int level)
Test if Morton indices are valid and are inside the unit tree.
int p4est_quadrant_is_valid(const p4est_quadrant_t *q)
Test if a quadrant has valid Morton indices and is inside the unit tree.
int p4est_quadrant_is_family(const p4est_quadrant_t *q0, const p4est_quadrant_t *q1, const p4est_quadrant_t *q2, const p4est_quadrant_t *q3)
Test if 4 quadrants are siblings in Morton ordering.
int p4est_quadrant_contains_node(const p4est_quadrant_t *q, const p4est_quadrant_t *n)
Decide if a node is completely contained within a quadrant.
void p4est_quadrant_enlarge_last(const p4est_quadrant_t *a, p4est_quadrant_t *q)
Enlarge a quadrant as long as its last corner stays the same.
int p4est_quadrant_is_next_D(const p4est_quadrant_t *q, const p4est_quadrant_t *r)
Test if two quadrants follow each other in the tree with no holes.
void p4est_quadrant_copy(const p4est_quadrant_t *q, p4est_quadrant_t *copy)
Copy the Morton indices of the quadrant q.
uint64_t p4est_quadrant_linear_id(const p4est_quadrant_t *quadrant, int level)
Computes the linear position of a quadrant in a uniform grid.
void p4est_neighbor_transform_quadrant_reverse(const p4est_neighbor_transform_t *nt, const p4est_quadrant_t *neigh_quad, p4est_quadrant_t *self_quad)
Transform a quadrant from a neighbors's coordinate system to self's coordinate system.
int p4est_quadrant_is_ancestor_corner(const p4est_quadrant_t *descendant, const p4est_quadrant_t *ancestor, int corner)
Check if a descendant shares a corner with a (strict) ancestor.
int p4est_quadrant_is_parent(const p4est_quadrant_t *q, const p4est_quadrant_t *r)
Test if a quadrant is the parent of another quadrant.
int p4est_quadrant_equal_fn(const void *v1, const void *v2, const void *u)
Test if two quadrants have equal Morton indices, callback version.
p4est_topidx_t p4est_quadrant_face_neighbor_extra(const p4est_quadrant_t *q, p4est_topidx_t t, int face, p4est_quadrant_t *r, int *nface, p4est_connectivity_t *conn)
Compute the face neighbor of a quadrant, transforming across tree boundaries if necessary.
int p4est_quadrant_is_inside_root(const p4est_quadrant_t *q)
Test if a quadrant is inside the unit tree.
void p4est_quadrant_all_face_neighbors(const p4est_quadrant_t *q, int face, p4est_quadrant_t n[])
Create all possible face neighbors of q.
void p4est_quadrant_parent(const p4est_quadrant_t *q, p4est_quadrant_t *r)
Compute the parent of a quadrant.
int p4est_quadrant_overlaps(const p4est_quadrant_t *q1, const p4est_quadrant_t *q2)
Test if two quadrants overlap.
void p4est_quadrant_corner_descendant(const p4est_quadrant_t *q, p4est_quadrant_t *r, int c, int level)
Compute the descendant of a quadrant touching a given corner.
void p4est_quadrant_transform_corner(p4est_quadrant_t *q, int icorner, int inside)
Move a quadrant inside or diagonally outside a corner position.
void p4est_quadrant_sibling(const p4est_quadrant_t *q, p4est_quadrant_t *r, int sibling_id)
Compute a specific sibling of a quadrant.
void p4est_quadrant_child(const p4est_quadrant_t *q, p4est_quadrant_t *r, int child_id)
Compute a specific child of a quadrant.
void p4est_quadrant_corner_neighbor_extra(const p4est_quadrant_t *q, p4est_locidx_t t, int corner, sc_array_t *quads, sc_array_t *treeids, sc_array_t *ncorners, p4est_connectivity_t *conn)
Compute the corner neighbors of a quadrant, transforming across tree boundaries if necessary.
void p4est_quadrant_srand(const p4est_quadrant_t *q, sc_rand_state_t *rstate)
Initialize a random number generator by quadrant coordinates.
void p4est_quadrant_childrenv(const p4est_quadrant_t *q, p4est_quadrant_t c[])
Compute the 4 children of a quadrant, array version.
int p4est_quadrant_is_parent_D(const p4est_quadrant_t *q, const p4est_quadrant_t *r)
Test if a quadrant is the parent of another quadrant.
void p4est_node_clamp_inside(const p4est_quadrant_t *n, p4est_quadrant_t *r)
Clamp a node inside the unit tree if it sits on a high border.
int p4est_quadrant_compare(const void *v1, const void *v2)
Compare two quadrants in their Morton ordering.
int p4est_quadrant_is_sibling(const p4est_quadrant_t *q1, const p4est_quadrant_t *q2)
Test if two quadrants are siblings.
void p4est_quadrant_corner_node(const p4est_quadrant_t *q, int corner, p4est_quadrant_t *r)
Compute the corner node of a quadrant.
void p4est_quadrant_print(int log_priority, const p4est_quadrant_t *q)
Prints one line with quadrant's x, y and level.
int p4est_quadrant_is_familypv(p4est_quadrant_t *q[])
Test if 4 quadrants are siblings in Morton ordering, array version.
int p4est_quadrant_is_inside_3x3(const p4est_quadrant_t *q)
Test if a quadrant is inside the 3x3 box around the root tree.
void p4est_quadrant_predecessor(const p4est_quadrant_t *quadrant, p4est_quadrant_t *result)
Compute the predecessor according to the Morton index in a uniform mesh.
int p4est_quadrant_is_sibling_D(const p4est_quadrant_t *q1, const p4est_quadrant_t *q2)
Test if two quadrants are siblings.
void p4est_quadrant_transform_face(const p4est_quadrant_t *q, p4est_quadrant_t *r, const int ftransform[])
Transforms a quadrant/node across a face between trees.
void p4est_coordinates_transform_face(const p4est_qcoord_t coords_in[], p4est_qcoord_t coords_out[], const int ftransform[])
Transforms coordinates across a face between trees.
int p4est_quadrant_is_extended(const p4est_quadrant_t *q)
Test if a quadrant has valid Morton indices in the 3x3 box around root.
int p4est_quadrant_is_equal_piggy(const p4est_quadrant_t *q1, const p4est_quadrant_t *q2)
Test if two quadrants have equal Morton indices and the same tree id.
int p4est_quadrant_ancestor_id(const p4est_quadrant_t *q, int level)
Compute the position of the ancestor of this child at level level within its siblings.
int p4est_quadrant_is_first_last(const p4est_quadrant_t *f, const p4est_quadrant_t *l, const p4est_quadrant_t *a)
Whether two descendants of a quadrant are first and last, up to size.
int p4est_quadrant_touches_corner(const p4est_quadrant_t *q, int corner, int inside)
Checks if a quadrant touches a corner (diagonally inside or outside).
void p4est_quadrant_childrenpv(const p4est_quadrant_t *q, p4est_quadrant_t *c[])
Compute the 4 children of a quadrant, array version.
This structure holds the 2D inter-tree connectivity information.
Definition: p4est_connectivity.h:190
The 2D quadrant datatype.
Definition: p4est.h:72
The p4est tree datatype.
Definition: p4est.h:115