Function t8_forest_balance
Defined in File t8_forest_balance.h
Function Documentation
-
void t8_forest_balance(t8_forest_t forest, int repartition)
Balance the forest.
This function adjust the forest such that it satisfies a 2:1 balance condition: The levels of neighboring elements may differ by at most one. Such a balanced forest simplifies many algorithms, making balancing an important procedure for both developers and external users.
- Parameters:
forest – [inout] The forest to be balanced.
repartition – [in] Switch deciding whether the forest is repartitioned after balancing.