Function t8_forest_set_cmesh

Function Documentation

void t8_forest_set_cmesh(t8_forest_t forest, t8_cmesh_t cmesh, sc_MPI_Comm comm)

Set the cmesh associated to a forest.

By default, the forest takes ownership of the cmesh such that it will be destroyed when the forest is destroyed. To keep ownership of the cmesh, call t8_cmesh_ref before passing it to t8_forest_set_cmesh. This means that it is ILLEGAL to continue using cmesh or dereferencing it UNLESS it is referenced directly before passing it into this function.

Parameters:
  • forest[inout] The forest whose cmesh variable will be set.

  • cmesh[in] The cmesh to be set. We take ownership. This can be prevented by referencing cmesh.

  • comm[in] The MPI communicator.