Function t8_offset_consistent
Defined in File t8_cmesh_offset.h
Function Documentation
-
int t8_offset_consistent(const int mpisize, const t8_shmem_array_t offset_shmem, const t8_gloidx_t num_trees)
Check whether a given offset array represents a valid partition.
That is:
the entries in the offset array are increasing,
if a process is empty then its first tree is not shared,
if a process is not empty its first tree must be bigger than the last tree of the previous non-empty process, or equal to it if it is shared.
- Parameters:
mpisize – [in] The number of MPI ranks, also the number of entries in offset minus 1.
offset_shmem – [in] The partition to be considered.
num_trees – [in] The total number of global trees in the partition.
- Returns:
nonzero if the partition is valid, 0 if not.