Function t8_cmesh_offset_random(sc_MPI_Comm, t8_gloidx_t, int, unsigned)

Function Documentation

t8_shmem_array_t t8_cmesh_offset_random(sc_MPI_Comm comm, t8_gloidx_t num_trees, int shared, unsigned seed)

Create a random partition table. The use of this function is only reasonable for debugging.

Note

This function is MPI collective.

Parameters:
  • comm[in] The communicator to use.

  • num_trees[in] The number of global trees in the partition.

  • shared[in] If true than there will be shared trees in the generated partition table.

  • seed[in] A seed to be used for the random number generator. If zero, a random seed is chosen. seed has to be the same on each process.

Returns:

A valid partition table for a cmesh with num_trees trees and communicator comm, where each processor gets a random number of trees. The number of trees per processor is roughly uniformly distributed.