Function t8_element_MPI_Pack

Function Documentation

void t8_element_MPI_Pack(const t8_scheme_c *scheme, const t8_eclass_t tree_class, t8_element_t **const elements, const unsigned int count, void *send_buffer, const int buffer_size, int *position, sc_MPI_Comm comm)

Pack multiple elements into contiguous memory, so they can be sent via MPI.

Parameters:
  • scheme[in] The scheme of the forest.

  • tree_class[in] The eclass of tree the elements are part of.

  • elements[in] Array of elements that are to be packed

  • count[in] Number of elements to pack

  • send_buffer[inout] Buffer in which to pack the elements

  • buffer_size[in] size of the buffer (in order to check that we don’t access out of range)

  • position[inout] the position of the first byte that is not already packed

  • comm[in] MPI Communicator