Struct t8_forest_pfc_message
Defined in File t8_forest_pfc_message.hxx
Struct Documentation
-
struct t8_forest_pfc_message
This class collects all functionality to handle the data to be sent/received between the processes that will be required to decide on whether and where families are split at process boundaries.
Public Functions
-
inline void pack(void *buf, int buf_size, int *position)
Pack the data to prepare sending.
- Parameters:
buf – [inout] the sending buffer on input: allocated (but empty) on output: filled with the data to sent
buf_size – [in] the size of the sending buffer
position – [inout] current position within the sending buffer on input: 0 on output: buf_size
-
inline void unpack(void *buf, int buf_size, int *position)
Unpack the received data.
Transfer the received data into the member variables of this class.
- Parameters:
buf – [in] the buffer containing the received MPI data
buf_size – [in] the size of the buffer
position – [inout] current position within the receive buffer on input: 0 on output: buf_size
-
inline int pack_size()
Determine and return the pack size of the PFC message.
It results from the data fields to send and the associated sizes:
itree (T8_MPI_GLOIDX)
eclass (sc_MPI_INT)
parent (via t8_element_MPI_Pack_size)
num_siblings (sc_MPI_INT)
- Returns:
The pack size of the message.
-
inline void mpi_Isend(const t8_forest_t forest, sc_MPI_Request &request)
Send the message using non-blocking MPI send.
- Parameters:
forest – [in] the forest (only used for forest->mpicomm)
request – [out] the MPI send request
-
inline void mpi_Recv(char *&recv_buf, int &buf_size)
Receive data from another process.
Probes for the size of the message before receiving
- Parameters:
recv_buf – [inout] the receive buffer. The function allocates the right size of memory to receive the message.
buf_size – [out] the size of the buffer
-
inline void fill(t8_forest_t forest)
Fill this instance of class t8_forest_pfc_message, i.e., setting the member viarables based on the given forest.
- Parameters:
forest – [in] the forest
-
inline const t8_element_t *get_parent() const
Getter function for the parent to stay in control of memory management.
- Returns:
The parent to be sent.
-
inline t8_forest_pfc_message(const t8_scheme_c *scheme, t8_procidx_t iproc, sc_MPI_Comm comm)
Constructor of class t8_forest_pfc_message.
The arguments are directly copied into the corresponding member variables; the remaining member variables are set to default values.
- Parameters:
scheme – [in] the scheme
iproc – [in] the process to send to
comm – [in] the MPI communicator
-
t8_forest_pfc_message(const t8_forest_pfc_message &other) = delete
No (implicit) copy constructor.
-
inline t8_forest_pfc_message(t8_forest_pfc_message &&other)
Move constructor.
-
inline ~t8_forest_pfc_message()
Default destructor.
Public Members
-
t8_gloidx_t itree
the global tree id
-
t8_eclass_t eclass
the tree’s eclass
-
int num_siblings
the process-local number of siblings
-
const t8_scheme_c *scheme
the scheme class
-
sc_MPI_Comm comm
the MPI communicator
-
t8_procidx_t iproc
the process to send data to
-
inline void pack(void *buf, int buf_size, int *position)