Function t8_forest_set_partition_weight_function

Function Documentation

void t8_forest_set_partition_weight_function(t8_forest_t forest, t8_weight_fcn_t *weight_callback)

Set a user-defined weight function to guide the partitioning.

Note

If weight_callback is null, then all the elements are assumed to have the same weight

Parameters:
  • forest[inout] The forest.

  • weight_callback[in] A callback function defining element weights for the partitioning.

Pre:

weight_callback must be free of side effects (like changing the forest, some global state, etc.), the behavior is undefined otherwise.