Represents the payload of data exchanged during an iteration.
More...
#include <iteration_payload.hpp>
|
| 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.
|
|
|
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.
|
|
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.
◆ IterationPayload()
WrapMPI::IterationPayload::IterationPayload |
( |
size_t | size_flows, |
|
|
size_t | volumes ) |
|
explicit |
Constructs an IterationPayload with specified sizes for flows and volumes.
- Parameters
-
size_flows | The number of elements in the liquid flows vector. |
volumes | The 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
◆ 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
-
source | The MPI rank of the source process sending the data. |
status | Pointer 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.
◆ 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: