Function t8_forest_set_partition

Function Documentation

void t8_forest_set_partition(t8_forest_t forest, const t8_forest_t set_from, int set_for_coarsening)

Set a source forest to be partitioned during commit.

The partitioning is done according to the SFC and each rank is assigned the same (maybe +1) number of elements.

Note

This setting can be combined with t8_forest_set_adapt and t8_forest_set_balance. The order in which these operations are executed is always 1) Adapt 2) Partition 3) Balance. If t8_forest_set_balance is called with the no_repartition parameter set as false, it is not necessary to call t8_forest_set_partition additionally.

Note

This setting may not be combined with t8_forest_set_copy and overwrites this setting.

Parameters:
  • forest[inout] The forest.

  • set_from[in] A second forest that should be partitioned. We take ownership. This can be prevented by referencing set_from. If NULL, a previously (or later) set forest will be taken (t8_forest_set_adapt, t8_forest_set_balance).

  • set_for_coarsening[in] If true, the partition will be such that coarsening a family of elements into their parent once is a process-local operation. This is ensured by a post-processing step that slightly shifts the newly determined process boundaries such that no full family of (same-level) siblings is split between processes.