BioCMAMC-ST
WrapMPI::IterationPayload Class Reference

Represents the payload of data exchanged during an iteration. More...

#include <iteration_payload.hpp>

Public Member Functions

 IterationPayload (size_t volumes)
 Constructs an IterationPayload with specified sizes for flows and volumes.
bool recv (size_t source, MPI_Status *status) noexcept
 Receives data for this payload from a specified source.

Public Attributes

std::vector< double > liquid_volumes
std::vector< std::size_t > liquid_neighbors_flat
std::vector< double > proba_leaving_flat
std::vector< double > liquid_out_flows

Detailed Description

Represents the payload of data exchanged during an iteration.

This class encapsulates the data related to liquid flows, liquid volumes, gas volumes, and neighbor information for a given iteration.

Constructor & Destructor Documentation

◆ IterationPayload()

WrapMPI::IterationPayload::IterationPayload ( size_t volumes)
explicit

Constructs an IterationPayload with specified sizes for flows and volumes.

Parameters
size_flowsThe number of elements in the liquid flows vector.
volumesThe number of elements in the liquid and gas volumes vectors.
Note
: Size are needed to alloc vector, this allow to use preallocated chunk when transfer

Member Function Documentation

◆ recv()

bool WrapMPI::IterationPayload::recv ( size_t source,
MPI_Status * status )
noexcept

Receives data for this payload from a specified source.

This function receives liquid flows, liquid volumes, and gas volumes from a given MPI source rank.

Parameters
sourceThe MPI rank of the source process sending the data.
statusPointer to an MPI_Status object to store information about the receive operation.
Note
This method uses MPI to perform the receive operation and assumes the MPI environment is initialized.
Here is the call graph for this function:

Member Data Documentation

◆ liquid_neighbors_flat

std::vector<std::size_t> WrapMPI::IterationPayload::liquid_neighbors_flat

◆ liquid_out_flows

std::vector<double> WrapMPI::IterationPayload::liquid_out_flows

◆ liquid_volumes

std::vector<double> WrapMPI::IterationPayload::liquid_volumes

◆ proba_leaving_flat

std::vector<double> WrapMPI::IterationPayload::proba_leaving_flat

The documentation for this class was generated from the following files: