p4est 2.8.6
p4est is a software library for parallel adaptive mesh refinement.
Functions
p6est_communication.h File Reference

MPI_Comm management. More...

#include <p6est.h>
Include dependency graph for p6est_communication.h:

Go to the source code of this file.

Functions

void p6est_comm_parallel_env_assign (p6est_t *p6est, sc_MPI_Comm mpicomm)
 Assign an MPI communicator to p6est; retrieve parallel environment. More...
 
void p6est_comm_parallel_env_duplicate (p6est_t *p6est)
 Duplicate MPI communicator and replace the current one by the duplicate. More...
 
void p6est_comm_parallel_env_release (p6est_t *p6est)
 Release MPI communicator if it is owned by p6est.
 
void p6est_comm_parallel_env_replace (p6est_t *p6est, sc_MPI_Comm mpicomm)
 Replace the current MPI communicator by the one provided as input. More...
 
void p6est_comm_parallel_env_get_info (p6est_t *p6est)
 Retrieve parallel environment information.
 
int p6est_comm_parallel_env_is_null (p6est_t *p6est)
 Check if the MPI communicator is valid. More...
 
int p6est_comm_parallel_env_reduce (p6est_t **p6est_supercomm)
 Reduce MPI communicator to non-empty ranks (i.e., nonzero quadrant counts). More...
 
int p6est_comm_parallel_env_reduce_ext (p6est_t **p6est_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 communicator regardless whether they are empty or not. More...
 

Detailed Description

MPI_Comm management.

Function Documentation

◆ p6est_comm_parallel_env_assign()

void p6est_comm_parallel_env_assign ( p6est_t p6est,
sc_MPI_Comm  mpicomm 
)

Assign an MPI communicator to p6est; retrieve parallel environment.

Parameters
[in]mpicommA valid MPI communicator.
Note
The provided MPI communicator is not owned by p6est.

◆ p6est_comm_parallel_env_duplicate()

void p6est_comm_parallel_env_duplicate ( p6est_t p6est)

Duplicate MPI communicator and replace the current one by the duplicate.

Note
The duplicated MPI communicator is owned by p6est.

◆ p6est_comm_parallel_env_is_null()

int p6est_comm_parallel_env_is_null ( p6est_t p6est)

Check if the MPI communicator is valid.

Returns
True if communicator is not NULL communicator, false otherwise.

◆ p6est_comm_parallel_env_reduce()

int p6est_comm_parallel_env_reduce ( p6est_t **  p6est_supercomm)

Reduce MPI communicator to non-empty ranks (i.e., nonzero quadrant counts).

Parameters
[in/out]p6est_supercomm Object which communicator is reduced. points to NULL if this p6est does not exists.
Returns
True if p6est exists on this MPI rank after reduction.

◆ p6est_comm_parallel_env_reduce_ext()

int p6est_comm_parallel_env_reduce_ext ( p6est_t **  p6est_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 communicator regardless whether they are empty or not.

Parameters
[in/out]p6est_supercomm Object which communicator is reduced. Points to NULL if this p6est does not exists.
[in]group_addGroup of ranks that will remain in communicator.
[in]add_to_beginningIf true, ranks will be added to the beginning of the reduced communicator, otherwise to the end.
[out]ranks_subcommIf not null, array of size 'subcommsize' with subcommrank->supercommrank map.
Returns
True if p6est exists on this MPI rank after reduction.

◆ p6est_comm_parallel_env_replace()

void p6est_comm_parallel_env_replace ( p6est_t p6est,
sc_MPI_Comm  mpicomm 
)

Replace the current MPI communicator by the one provided as input.

Parameters
[in]mpicommA valid MPI communicator.
Note
The provided MPI communicator is not owned by p6est.