Function t8_cmesh_determine_partition

Function Documentation

static size_t t8_cmesh_determine_partition(const t8_gloidx_t element_index, const t8_gloidx_t global_num_elements, const int num_procs, const t8_gloidx_t process_offset)

Determines the partition for a given element index in a uniform partitioning. This function computes the partition based on the global element index, the total number of elements, the number of processes, and the process offset.

Note

This function is used standalone and as a callback for vector splitting

Parameters:
  • element_index[in] The global index of the element.

  • global_num_elements[in] The total number of elements in the global mesh.

  • num_procs[in] The total number of processes.

  • process_offset[in] The offset of the current process in the global numbering.

Returns:

The rank of the process that will have the element in a uniform partition.