Function t8_cmesh_bcast(t8_cmesh_t, int, sc_MPI_Comm)

Function Documentation

t8_cmesh_t t8_cmesh_bcast(t8_cmesh_t cmesh_in, int root, sc_MPI_Comm comm)

Broadcast a cmesh structure that exists only on one process to all processes in the cmesh’s communicator. TODO: Input structure must be replicated, not parallelized. TODO: Recommend to call this just before commit. Earlier is thinkable too. On the other processors, it will be allocated. It is not allowed to call this function after t8_cmesh_commit.

Note

It is illegal to broadcast a cmesh with a registered geometry (t8_cmesh_register_geometry). All geometries must be registered after the broadcast (You can set tree attributes before bcast, though).

Parameters:
  • cmesh_in[in] For the root process the cmesh to be broadcast, for the other processes it must be NULL.

  • root[in] The rank of the process that provides the cmesh.

  • comm[in] The mpi communicator. Must match cmesh’s communicator on the root process.

Returns:

For the root process this is a pointer to cmesh_in. Else, a pointer to a newly allocated cmesh structure with the same values as conn_in on the root process.