Function t8_cmesh_uniform_bounds_for_irregular_refinement(const t8_cmesh_t, const int, const t8_scheme_c *, t8_gloidx_t *, t8_gloidx_t *, t8_gloidx_t *, t8_gloidx_t *, int8_t *, sc_MPI_Comm)

Function Documentation

void t8_cmesh_uniform_bounds_for_irregular_refinement(const t8_cmesh_t cmesh, const int level, const t8_scheme_c *scheme, t8_gloidx_t *first_local_tree, t8_gloidx_t *child_in_tree_begin, t8_gloidx_t *last_local_tree, t8_gloidx_t *child_in_tree_end, int8_t *first_tree_shared, sc_MPI_Comm comm)

Calculate the section of a uniform hybrid forest for the current rank. Needed for hybrid meshes, especially meshes where not all elements refine into 1:2^dim manner. The section is calculated without assuming such refinement and each process computes its number of elements on the given level, communicates the number to other processes, and the correct section is computed based on this information.

Parameters:
  • cmesh[in] The cmesh to be considered.

  • level[in] The uniform refinement level to be created.

  • scheme[in] The element scheme for which to compute the bounds.

  • first_local_tree[out] The global index of the first tree that contains elements belonging to the calling process.

  • child_in_tree_begin[out] The global index of the first element belonging to the calling processor. Not computed if NULL.

  • last_local_tree[out] The global index of the last tree that contains elements belonging to the calling process.

  • child_in_tree_end[out] The global index of the first element that does not belonging to the calling process anymore. Not computed if NULL.

  • first_tree_shared[out] If not NULL, 1 or 0 is stored here depending on whether first_local_tree is the same as last_local_tree on the previous process.

  • comm[in] The communicator