t8  1.2.0
t8code is a C library to manage a forest of adaptive space-trees of general element classes in parallel.
Functions
t8_forest_partition.h File Reference

We define the partition routine to partition a forest of trees in this file. More...

#include <t8.h>
#include <t8_forest.h>

Go to the source code of this file.

Functions

void t8_forest_partition (t8_forest_t forest)
 
void t8_forest_partition_create_offsets (t8_forest_t forest)
 Create the element_offset array of a partitioned forest. More...
 
int t8_forest_partition_next_nonempty_rank (t8_forest_t forest, int rank)
 If t8_forest_partition_create_offsets was already called, compute for a given rank the next greater rank that is not empty. More...
 
void t8_forest_partition_create_first_desc (t8_forest_t forest)
 Create the array of global_first_descendant ids of a partitioned forest. More...
 
void t8_forest_partition_create_tree_offsets (t8_forest_t forest)
 Create the array tree offsets of a partitioned forest. More...
 
void t8_forest_partition_data (t8_forest_t forest_from, t8_forest_t forest_to, const sc_array_t *data_in, sc_array_t *data_out)
 

Detailed Description

We define the partition routine to partition a forest of trees in this file.

Function Documentation

◆ t8_forest_partition_create_first_desc()

void t8_forest_partition_create_first_desc ( t8_forest_t  forest)

Create the array of global_first_descendant ids of a partitioned forest.

Parameters
[in,out]forestThe forest. forest must be committed before calling this function.

◆ t8_forest_partition_create_offsets()

void t8_forest_partition_create_offsets ( t8_forest_t  forest)

Create the element_offset array of a partitioned forest.

Parameters
[in,out]forestThe forest. forest must be committed before calling this function.

◆ t8_forest_partition_create_tree_offsets()

void t8_forest_partition_create_tree_offsets ( t8_forest_t  forest)

Create the array tree offsets of a partitioned forest.

This arrays stores at position p the global id of the first tree of this process. Or if this tree is shared, it stores -(global_id) - 1.

Parameters
[in,out]forestThe forest. forest must be committed before calling this function.

◆ t8_forest_partition_next_nonempty_rank()

int t8_forest_partition_next_nonempty_rank ( t8_forest_t  forest,
int  rank 
)

If t8_forest_partition_create_offsets was already called, compute for a given rank the next greater rank that is not empty.

Parameters
[in]forestThe forest.
[in]rankAn MPI rank.
Returns
A rank q > rank such that the forest has elements on q. If such a q does not exist, returns mpisize.