p4est 2.8.6
p4est is a software library for parallel adaptive mesh refinement.
|
Iteration over mesh topology via callbacks. More...
#include <p4est_ghost.h>
Go to the source code of this file.
Data Structures | |
struct | p4est_iter_volume_info |
The information that is available to the user-defined p4est_iter_volume_t callback function. More... | |
struct | p4est_iter_face_side |
Information about one side of a face in the forest. More... | |
union | p4est_iter_face_side::p4est_iter_face_side_data |
struct | p4est_iter_face_info |
The information that is available to the user-defined p4est_iter_face_t callback. More... | |
struct | p4est_iter_corner_side |
Information about one side of a corner in the forest. More... | |
struct | p4est_iter_corner_info |
The information that is available to the user-defined p4est_iter_corner_t callback. More... | |
Typedefs | |
typedef struct p4est_iter_volume_info | p4est_iter_volume_info_t |
The information that is available to the user-defined p4est_iter_volume_t callback function. More... | |
typedef void(* | p4est_iter_volume_t) (p4est_iter_volume_info_t *info, void *user_data) |
The prototype for a function that p4est_iterate will execute at every quadrant local to the current process. More... | |
typedef struct p4est_iter_face_side | p4est_iter_face_side_t |
Information about one side of a face in the forest. More... | |
typedef struct p4est_iter_face_info | p4est_iter_face_info_t |
The information that is available to the user-defined p4est_iter_face_t callback. More... | |
typedef void(* | p4est_iter_face_t) (p4est_iter_face_info_t *info, void *user_data) |
The prototype for a function that p4est_iterate will execute wherever two quadrants share a face: the face can be a 2:1 hanging face, it does not have to be conformal. More... | |
typedef struct p4est_iter_corner_side | p4est_iter_corner_side_t |
Information about one side of a corner in the forest. More... | |
typedef struct p4est_iter_corner_info | p4est_iter_corner_info_t |
The information that is available to the user-defined p4est_iter_corner_t callback. More... | |
typedef void(* | p4est_iter_corner_t) (p4est_iter_corner_info_t *info, void *user_data) |
The prototype for a function that p4est_iterate will execute wherever quadrants meet at a conformal corner. More... | |
Functions | |
void | p4est_iterate (p4est_t *p4est, p4est_ghost_t *ghost_layer, void *user_data, p4est_iter_volume_t iter_volume, p4est_iter_face_t iter_face, p4est_iter_corner_t iter_corner) |
Execute user supplied callbacks at every volume, face, and corner in the local forest. More... | |
Iteration over mesh topology via callbacks.
typedef struct p4est_iter_corner_info p4est_iter_corner_info_t |
The information that is available to the user-defined p4est_iter_corner_t callback.
If tree_boundary is false, the corner is on the interior of a tree. When tree_boundary is false, sides[0] contains the lowest z-order quadrant that touches the corner. When tree_boundary is true, its value is P4EST_CONNECT_FACE/CORNER depending on the location of the corner relative to the tree.
typedef struct p4est_iter_corner_side p4est_iter_corner_side_t |
Information about one side of a corner in the forest.
If a quad is local (is_ghost is false), then its quadid indexes the tree's quadrant array; otherwise, it indexes the ghosts array. If a quadrant should be present, but it is not included in the ghost layer, then quad = NULL, is_ghost is true, and quadid = -1.
the faces field provides some additional information about the local topology: if side[i]->faces[j] == side[k]->faces[l], this indicates that there is a common face between these two sides of the corner.
typedef void(* p4est_iter_corner_t) (p4est_iter_corner_info_t *info, void *user_data) |
The prototype for a function that p4est_iterate will execute wherever quadrants meet at a conformal corner.
i.e. the callback will not execute on a hanging corner.
[in] | info | information about a quadrant provided to the user |
[in,out] | user_data | the user context passed to p4est_iterate() |
typedef struct p4est_iter_face_info p4est_iter_face_info_t |
The information that is available to the user-defined p4est_iter_face_t callback.
The orientation is 0 if the face is within one tree; otherwise, it is the same as the orientation value between the two trees given in the connectivity. If the face is on the outside boundary of the forest, then there is only one side. If tree_boundary is false, the face is on the interior of a tree. When tree_boundary is false, sides[0] contains the lowest z-order quadrant that touches the face. When tree_boundary is true, its value is P4EST_CONNECT_FACE.
typedef struct p4est_iter_face_side p4est_iter_face_side_t |
Information about one side of a face in the forest.
If a quad is local (is_ghost is false), then its quadid indexes the tree's quadrant array; otherwise, it indexes the ghosts array. If the face is hanging, then the quadrants are listed in z-order. If a quadrant should be present, but it is not included in the ghost layer, then quad = NULL, is_ghost is true, and quadid = -1.
typedef void(* p4est_iter_face_t) (p4est_iter_face_info_t *info, void *user_data) |
The prototype for a function that p4est_iterate will execute wherever two quadrants share a face: the face can be a 2:1 hanging face, it does not have to be conformal.
[in] | info | information about a quadrant provided to the user |
[in,out] | user_data | the user context passed to p4est_iterate() |
typedef struct p4est_iter_volume_info p4est_iter_volume_info_t |
The information that is available to the user-defined p4est_iter_volume_t callback function.
treeid gives the index in p4est->trees of the tree to which quad belongs. quadid gives the index of quad within tree's quadrants array.
typedef void(* p4est_iter_volume_t) (p4est_iter_volume_info_t *info, void *user_data) |
The prototype for a function that p4est_iterate will execute at every quadrant local to the current process.
[in] | info | information about a quadrant provided to the user |
[in,out] | user_data | the user context passed to p4est_iterate() |
void p4est_iterate | ( | p4est_t * | p4est, |
p4est_ghost_t * | ghost_layer, | ||
void * | user_data, | ||
p4est_iter_volume_t | iter_volume, | ||
p4est_iter_face_t | iter_face, | ||
p4est_iter_corner_t | iter_corner | ||
) |
Execute user supplied callbacks at every volume, face, and corner in the local forest.
p4est_iterate executes the user-supplied callback functions at every volume, face, and corner in the local forest. The ghost_layer may be NULL. The user_data pointer is not touched by p4est_iterate, but is passed to each of the callbacks. Any of the callbacks may be NULL. The callback functions are interspersed with each other, i.e. some face callbacks will occur between volume callbacks, and some corner callbacks will occur between face callbacks:
1) volume callbacks occur in the sorted Morton-index order. 2) a face callback is not executed until after the volume callbacks have been executed for the quadrants that share it. 3) a corner callback is not executed until the face callbacks have been executed for all faces that touch the corner. 4) it is not always the case that every face callback for a given quadrant is executed before any of the corner callbacks. 5) callbacks are not executed at faces or corners that only involve ghost quadrants, i.e. that are not adjacent in the local section of the forest.
[in] | p4est | the forest |
[in] | ghost_layer | optional: when not given, callbacks at the boundaries of the local partition cannot provide quadrant data about ghost quadrants: missing (p4est_quadrant_t *) pointers are set to NULL, missing indices are set to -1. |
[in,out] | user_data | optional context to supply to each callback |
[in] | iter_volume | callback function for every quadrant's interior |
[in] | iter_face | callback function for every face between quadrants |
[in] | iter_corner | callback function for every corner between quadrants |