t8  UNKNOWN
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/t8_forest_general.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)
 
void t8_forest_partition_test_boundary_element (const t8_forest_t forest)
 Test if the last descendant of the last element of current rank has a smaller linear id than the stored first descendant of rank+1. More...
 

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.

◆ t8_forest_partition_test_boundary_element()

void t8_forest_partition_test_boundary_element ( const t8_forest_t  forest)

Test if the last descendant of the last element of current rank has a smaller linear id than the stored first descendant of rank+1.

If this is not the case, elements overlap.

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