Function t8_forest_set_copy

Function Documentation

void t8_forest_set_copy(t8_forest_t forest, const t8_forest_t from)

Set a forest as source for copying on committing.

By default, the forest takes ownership of the source from such that it will be destroyed on calling t8_forest_commit. To keep ownership of from, call t8_forest_ref before passing it into this function. This means that it is ILLEGAL to continue using from or dereferencing it UNLESS it is referenced directly before passing it into this function.

Note

This setting cannot be combined with t8_forest_set_adapt, t8_forest_set_partition, or t8_forest_set_balance and overwrites these settings.

Parameters:
  • forest[inout] The forest.

  • from[in] A second forest from which forest will be copied in t8_forest_commit.