p4est 2.8.6
p4est is a software library for parallel adaptive mesh refinement.
|
passing columns of layers and data to neighboring processes More...
Go to the source code of this file.
Data Structures | |
struct | p6est_ghost |
columns of layers that neighbor the local domain More... | |
Typedefs | |
typedef struct p6est_ghost | p6est_ghost_t |
columns of layers that neighbor the local domain | |
Functions | |
size_t | p6est_ghost_memory_used (p6est_ghost_t *ghost) |
Calculate the memory usage of the ghost layer. More... | |
p6est_ghost_t * | p6est_ghost_new (p6est_t *p4est, p4est_connect_type_t btype) |
Builds the ghost layer. More... | |
void | p6est_ghost_expand (p6est_t *p6est, p6est_ghost_t *ghost) |
Expand the size of the ghost layer and mirrors by one additional layer of adjacency. More... | |
void | p6est_ghost_destroy (p6est_ghost_t *ghost) |
Frees all memory used for the ghost layer. | |
ssize_t | p6est_ghost_bsearch (p6est_ghost_t *ghost, int which_proc, p4est_topidx_t which_tree, const p4est_quadrant_t *column, const p2est_quadrant_t *layer) |
Conduct binary search for exact match on a range of the ghost layer. More... | |
ssize_t | p6est_ghost_contains (p6est_ghost_t *ghost, int which_proc, p4est_topidx_t which_tree, const p4est_quadrant_t *column, const p2est_quadrant_t *layer) |
Conduct binary search for ancestor on range of the ghost layer. More... | |
int | p6est_layer_exists (p6est_t *p6est, p6est_ghost_t *ghost, p4est_topidx_t treeid, const p4est_quadrant_t *column, const p2est_quadrant_t *layer, sc_array_t *exists_arr, sc_array_t *rproc_arr, sc_array_t *rquad_arr) |
Checks if layer exists in the local forest or the ghost layer. More... | |
int | p6est_is_balanced (p6est_t *p6est, p8est_connect_type_t btype) |
Check a forest to see if it is balanced. More... | |
unsigned | p6est_ghost_checksum (p6est_t *p6est, p6est_ghost_t *ghost) |
Compute the parallel checksum of a ghost layer. More... | |
passing columns of layers and data to neighboring processes
ssize_t p6est_ghost_bsearch | ( | p6est_ghost_t * | ghost, |
int | which_proc, | ||
p4est_topidx_t | which_tree, | ||
const p4est_quadrant_t * | column, | ||
const p2est_quadrant_t * | layer | ||
) |
Conduct binary search for exact match on a range of the ghost layer.
[in] | ghost | The ghost layer. |
[in] | which_proc | The owner of the searched quadrant. Can be -1. |
[in] | which_tree | The tree of the searched quadrant. Can be -1. |
[in] | q | Valid quadrant is searched in the ghost layer. |
unsigned p6est_ghost_checksum | ( | p6est_t * | p6est, |
p6est_ghost_t * | ghost | ||
) |
ssize_t p6est_ghost_contains | ( | p6est_ghost_t * | ghost, |
int | which_proc, | ||
p4est_topidx_t | which_tree, | ||
const p4est_quadrant_t * | column, | ||
const p2est_quadrant_t * | layer | ||
) |
Conduct binary search for ancestor on range of the ghost layer.
[in] | ghost | The ghost layer. |
[in] | which_proc | The owner of the searched quadrant. Can be -1. |
[in] | which_tree | The tree of the searched quadrant. Can be -1. |
[in] | q | Valid quadrant's ancestor is searched. |
void p6est_ghost_expand | ( | p6est_t * | p6est, |
p6est_ghost_t * | ghost | ||
) |
Expand the size of the ghost layer and mirrors by one additional layer of adjacency.
[in] | p6est | The forest from which the ghost layer was generated. |
[in,out] | ghost | The ghost layer to be expanded. |
size_t p6est_ghost_memory_used | ( | p6est_ghost_t * | ghost | ) |
Calculate the memory usage of the ghost layer.
[in] | ghost | Ghost layer structure. |
p6est_ghost_t * p6est_ghost_new | ( | p6est_t * | p4est, |
p4est_connect_type_t | btype | ||
) |
Builds the ghost layer.
This will gather the quadrants from each neighboring proc to build one layer of face and corner based ghost elements around the ones they own.
[in] | p4est | The forest for which the ghost layer will be generated. |
[in] | btype | Which ghosts to include (across face, corner or default, full). |
int p6est_is_balanced | ( | p6est_t * | p6est, |
p8est_connect_type_t | btype | ||
) |
int p6est_layer_exists | ( | p6est_t * | p6est, |
p6est_ghost_t * | ghost, | ||
p4est_topidx_t | treeid, | ||
const p4est_quadrant_t * | column, | ||
const p2est_quadrant_t * | layer, | ||
sc_array_t * | exists_arr, | ||
sc_array_t * | rproc_arr, | ||
sc_array_t * | rquad_arr | ||
) |
Checks if layer exists in the local forest or the ghost layer.
For quadrants across tree corners it checks if the quadrant exists in any of the corner neighbors, thus it can execute multiple queries.
[in] | p4est | The forest in which to search for q |
[in] | ghost | The ghost layer in which to search for q |
[in] | treeid | The tree to which q belongs (can be extended). |
[in] | column | The column that is being searched for. |
[in] | layer | The layer that is being searched for. |
[in,out] | exists_arr | Must exist and be of of elem_size = sizeof (int) for inter-tree corner cases. Is resized by this function to one entry for each corner search and set to true/false depending on its existence in the local forest or ghost_layer. |
[in,out] | rproc_arr | If not NULL is filled with one rank per query. |
[in,out] | rquad_arr | If not NULL is filled with one quadrant per query. Its piggy3 member is defined as well. |