32 #ifndef P8EST_COMMUNICATION_H
33 #define P8EST_COMMUNICATION_H
126 int add_to_beginning,
127 int **ranks_subcomm);
158 global_num_quadrants,
186 int num_procs,
int p);
196 int num_procs,
int p);
289 int flag, sc_MPI_Op operation);
310 sc_MPI_Request *recv_req;
311 sc_MPI_Request *send_req;
341 sc_MPI_Comm mpicomm,
int tag,
343 const void *src_data,
379 const void *src_data,
428 sc_MPI_Comm mpicomm,
int tag,
430 const int *dest_sizes,
431 const void *src_data,
432 const int *src_sizes);
482 const int *dest_sizes,
483 const void *src_data,
484 const int *src_sizes);
539 sc_MPI_Comm mpicomm,
int tag,
540 void *dest_data,
const int *dest_counts,
541 const void *src_data,
const int *src_counts,
size_t item_size);
552 sc_MPI_Comm mpicomm,
int tag,
553 void *dest_data,
const int *dest_counts,
554 const void *src_data,
const int *src_counts,
size_t item_size);
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
int64_t p4est_gloidx_t
Typedef for globally unique indexing of quadrants.
Definition: p4est_base.h:118
The top-level 3D p8est interface.
int p8est_comm_neighborhood_owned(p8est_t *p8est, p4est_locidx_t which_tree, int full_tree[], int tree_contact[], p8est_quadrant_t *q)
Test if the 3x3 neighborhood of a quadrant is owned by this processor.
int p8est_comm_is_empty(p8est_t *p8est, int p)
Query whether a processor has no quadrants.
int p8est_comm_parallel_env_reduce(p8est_t **p8est_supercomm)
Reduce MPI communicator to non-empty ranks (i.e., nonzero quadrant counts).
int p8est_comm_parallel_env_is_null(p8est_t *p8est)
Check if the MPI communicator is valid.
void p8est_comm_count_quadrants(p8est_t *p8est)
Calculate the number and partition of quadrants.
struct p8est_transfer_context p8est_transfer_context_t
Context data to allow for split begin/end data transfer.
void p8est_comm_parallel_env_release(p8est_t *p8est)
Release MPI communicator if it is owned by p8est.
int p8est_comm_is_contained(p8est_t *p8est, p4est_locidx_t which_tree, const p8est_quadrant_t *q, int rank)
Test whether a quadrant is fully contained in a rank's owned region.
void p8est_comm_parallel_env_assign(p8est_t *p8est, sc_MPI_Comm mpicomm)
Assign an MPI communicator to p8est; retrieve parallel environment.
p8est_transfer_context_t * p8est_transfer_items_begin(const p4est_gloidx_t *dest_gfq, const p4est_gloidx_t *src_gfq, sc_MPI_Comm mpicomm, int tag, void *dest_data, const int *dest_counts, const void *src_data, const int *src_counts, size_t item_size)
Initiate a variable-count item transfer between partitions.
void p8est_comm_count_pertree(p8est_t *p8est, p4est_gloidx_t *pertree)
Compute and distribute the cumulative number of quadrants per tree.
int p8est_comm_is_owner(p8est_t *p8est, p4est_locidx_t which_tree, const p8est_quadrant_t *q, int rank)
Test ownership of a quadrant via p8est->global_first_position.
void p8est_comm_parallel_env_get_info(p8est_t *p8est)
Retrieve parallel environment information.
int p8est_comm_is_owner_gfp(const p8est_quadrant_t *gfp, int num_procs, p4est_topidx_t num_trees, p4est_locidx_t which_tree, const p8est_quadrant_t *q, int rank)
Test ownership of a quadrant via a global_first_position array.
int p8est_comm_is_empty_gfp(const p8est_quadrant_t *gfp, int num_procs, int p)
Query whether a processor has no quadrants.
void p8est_transfer_items(const p4est_gloidx_t *dest_gfq, const p4est_gloidx_t *src_gfq, sc_MPI_Comm mpicomm, int tag, void *dest_data, const int *dest_counts, const void *src_data, const int *src_counts, size_t item_size)
Transfer variable-count item data between partitions.
int p8est_comm_parallel_env_reduce_ext(p8est_t **p8est_supercomm, sc_MPI_Group group_add, int add_to_beginning, int **ranks_subcomm)
Reduce MPI communicator to non-empty ranks and add a group of ranks that will remain in the reduced c...
void p8est_transfer_custom(const p4est_gloidx_t *dest_gfq, const p4est_gloidx_t *src_gfq, sc_MPI_Comm mpicomm, int tag, void *dest_data, const int *dest_sizes, const void *src_data, const int *src_sizes)
Transfer variable-size quadrant data between partitions.
void p8est_transfer_end(p8est_transfer_context_t *tc)
Complete any of the transfer_begin functions.
void p8est_transfer_items_end(p8est_transfer_context_t *tc)
Complete a variable-count item transfer between partitions.
void p8est_comm_global_first_quadrant(p4est_gloidx_t global_num_quadrants, int mpisize, p4est_gloidx_t *gfq)
Calculate the global fist quadrant array for a uniform partition.
int p8est_comm_find_owner(p8est_t *p8est, p4est_locidx_t which_tree, const p8est_quadrant_t *q, int guess)
Searches the owner of a quadrant via p8est->global_first_position.
void p8est_transfer_fixed(const p4est_gloidx_t *dest_gfq, const p4est_gloidx_t *src_gfq, sc_MPI_Comm mpicomm, int tag, void *dest_data, const void *src_data, size_t data_size)
Transfer data associated with one forest partition to another.
void p8est_comm_global_partition(p8est_t *p8est, p8est_quadrant_t *first_quad)
Distribute the global partition boundaries.
p8est_transfer_context_t * p8est_transfer_fixed_begin(const p4est_gloidx_t *dest_gfq, const p4est_gloidx_t *src_gfq, sc_MPI_Comm mpicomm, int tag, void *dest_data, const void *src_data, size_t data_size)
Initiate a fixed-size data transfer between partitions.
void p8est_transfer_custom_end(p8est_transfer_context_t *tc)
Complete a variable-size data transfer between partitions.
int p8est_comm_is_empty_gfq(const p4est_gloidx_t *gfq, int num_procs, int p)
Query whether a processor has no quadrants.
void p8est_comm_tree_info(p8est_t *p8est, p4est_locidx_t which_tree, int full_tree[], int tree_contact[], const p8est_quadrant_t **firstq, const p8est_quadrant_t **nextq)
Computes information about a tree being fully owned.
void p8est_comm_parallel_env_duplicate(p8est_t *p8est)
Duplicate MPI communicator and replace the current one by the duplicate.
void p8est_comm_parallel_env_replace(p8est_t *p8est, sc_MPI_Comm mpicomm)
Replace the current MPI communicator by the one provided as input.
int p8est_comm_sync_flag(p8est_t *p8est, int flag, sc_MPI_Op operation)
Evaluates true/false of a flag among processors.
void p8est_transfer_fixed_end(p8est_transfer_context_t *tc)
Complete a fixed-size data transfer between partitions.
int p8est_bsearch_partition(p4est_gloidx_t target, const p4est_gloidx_t *gfq, int nmemb)
Given target, find index p such that gfq[p] <= target < gfq[p + 1].
p8est_transfer_context_t * p8est_transfer_custom_begin(const p4est_gloidx_t *dest_gfq, const p4est_gloidx_t *src_gfq, sc_MPI_Comm mpicomm, int tag, void *dest_data, const int *dest_sizes, const void *src_data, const int *src_sizes)
Initiate a variable-size data transfer between partitions.
unsigned p8est_comm_checksum(p8est_t *p8est, unsigned local_crc, size_t local_bytes)
Compute a parallel partition-independent checksum out of local checksums.
The 3D quadrant (i.e., octant) datatype.
Definition: p8est.h:72
Context data to allow for split begin/end data transfer.
Definition: p8est_communication.h:306
The p8est forest datatype.
Definition: p8est.h:146