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 size_flows, 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_flows
 Vector containing liquid flow values for the current iteration.
 
std::vector< double > liquid_volumes
 Vector containing liquid volume values for the current iteration.
 
std::vector< double > gas_volumes
 Vector containing gas volume values for the current iteration.
 
std::vector< size_t > raw_neighbors
 Vector containing raw neighbor indices for the current iteration.
 
CmaRead::Neighbors::Neighbors_const_view_t neighbors
 Constant view of neighbor data for the current iteration.
 

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 size_flows,
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

◆ gas_volumes

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

Vector containing gas volume values for the current iteration.

◆ liquid_flows

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

Vector containing liquid flow values for the current iteration.

◆ liquid_volumes

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

Vector containing liquid volume values for the current iteration.

◆ neighbors

CmaRead::Neighbors::Neighbors_const_view_t WrapMPI::IterationPayload::neighbors

Constant view of neighbor data for the current iteration.

◆ raw_neighbors

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

Vector containing raw neighbor indices for the current iteration.


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