Defines data structures for providing Segmentation object to swSim. More...
#include "include/Segmentation.hpp"
Public Member Functions | |
Segmentation () | |
Create the Segmentation. More... | |
Segmentation (swSim::Model &mod, MPI_Comm l_mpi_comm) | |
Create the Segmentation with a model and a communicator. More... | |
Segmentation (swSim::Segmentation &otherSeg) | |
Create the Segmentation with another Segmentation. More... | |
~Segmentation () | |
Destroy the Segmentation. More... | |
uint64_t | SumVector (std::vector< uint64_t > &vec) |
Sums a vector. More... | |
void | LoadBalance (std::vector< uint64_t > &planeCounts, int rank, int size) |
Balances the number of slices for each process. More... | |
int | MeetTargetCells (std::vector< uint64_t > &planeCounts, int xpos, uint64_t &globalIndexVox, uint64_t target_number_of_cells) |
Determines the number of slices for this process. More... | |
void | SetLeftValues (std::vector< uint64_t > &planeCounts, int xpos, uint64_t globalIndexVox) |
Sets the Communication values on the left. More... | |
void | SetRightValues (std::vector< uint64_t > &planeCounts, int xpos) |
Sets the Communication values on the right. More... | |
void | SetRightValues (std::vector< uint64_t >::size_type planeCountsSize, uint64_t total_cells_remaining) |
Sets the Communication values on the right. More... | |
void | MPICreateLeftReceive (std::vector< int32_t > &lrNodes) |
Creates the MPI datatype for recieving from the left. More... | |
void | MPICreateLeftSend (std::vector< int32_t > &lsNodes) |
Creates the MPI datatype for sending to the left. More... | |
void | MPICreateRightSend (std::vector< int32_t > &rsNodes) |
Creates the MPI datatype for sending to the right. More... | |
void | MPICreateRightReceive (std::vector< int32_t > &rrNodes) |
Creates the MPI datatype for recieving from the right. More... | |
Public Attributes | |
int | xIndex0 |
the global X index of the first slice for this process More... | |
int | xDelta |
the number of YZ slices iin this process More... | |
int | neighborLeft |
the rank of this processes left neightbor More... | |
int | neighborRight |
the rank of this processes right neightbor More... | |
uint64_t | globalIndex0 |
the absolute, global index of the first voxel in this process More... | |
uint64_t | processVoxels |
the number of voxels in this process More... | |
uint64_t | lHaloVoxels |
the number of voxels that are in the left communication halo in this process More... | |
uint64_t | rHaloVoxels |
the number of voxels that are in the right communication halo in this process More... | |
MPI_Datatype | recieveLeftType |
the MPI data type for recieving data from the left More... | |
MPI_Datatype | sendLeftType |
the MPI data type for sending data to the left More... | |
MPI_Datatype | recieveRightType |
the MPI data type for recieving data from the right More... | |
MPI_Datatype | sendRightType |
the MPI data type for sending data to the right More... | |
Defines data structures for providing Segmentation object to swSim.
swSim::Segmentation::Segmentation | ( | ) |
Create the Segmentation.
swSim::Segmentation::Segmentation | ( | swSim::Model & | mod, |
MPI_Comm | l_mpi_comm | ||
) |
Create the Segmentation with a model and a communicator.
swSim::Segmentation::Segmentation | ( | swSim::Segmentation & | otherSeg | ) |
Create the Segmentation with another Segmentation.
swSim::Segmentation::~Segmentation | ( | ) |
Destroy the Segmentation.
uint64_t swSim::Segmentation::SumVector | ( | std::vector< uint64_t > & | vec | ) |
Sums a vector.
void swSim::Segmentation::LoadBalance | ( | std::vector< uint64_t > & | planeCounts, |
int | rank, | ||
int | size | ||
) |
Balances the number of slices for each process.
int swSim::Segmentation::MeetTargetCells | ( | std::vector< uint64_t > & | planeCounts, |
int | xpos, | ||
uint64_t & | globalIndexVox, | ||
uint64_t | target_number_of_cells | ||
) |
Determines the number of slices for this process.
void swSim::Segmentation::SetLeftValues | ( | std::vector< uint64_t > & | planeCounts, |
int | xpos, | ||
uint64_t | globalIndexVox | ||
) |
Sets the Communication values on the left.
void swSim::Segmentation::SetRightValues | ( | std::vector< uint64_t > & | planeCounts, |
int | xpos | ||
) |
Sets the Communication values on the right.
void swSim::Segmentation::SetRightValues | ( | std::vector< uint64_t >::size_type | planeCountsSize, |
uint64_t | total_cells_remaining | ||
) |
Sets the Communication values on the right.
void swSim::Segmentation::MPICreateLeftReceive | ( | std::vector< int32_t > & | lrNodes | ) |
Creates the MPI datatype for recieving from the left.
void swSim::Segmentation::MPICreateLeftSend | ( | std::vector< int32_t > & | lsNodes | ) |
Creates the MPI datatype for sending to the left.
void swSim::Segmentation::MPICreateRightSend | ( | std::vector< int32_t > & | rsNodes | ) |
Creates the MPI datatype for sending to the right.
void swSim::Segmentation::MPICreateRightReceive | ( | std::vector< int32_t > & | rrNodes | ) |
Creates the MPI datatype for recieving from the right.
int swSim::Segmentation::xIndex0 |
the global X index of the first slice for this process
int swSim::Segmentation::xDelta |
the number of YZ slices iin this process
int swSim::Segmentation::neighborLeft |
the rank of this processes left neightbor
int swSim::Segmentation::neighborRight |
the rank of this processes right neightbor
uint64_t swSim::Segmentation::globalIndex0 |
the absolute, global index of the first voxel in this process
uint64_t swSim::Segmentation::processVoxels |
the number of voxels in this process
uint64_t swSim::Segmentation::lHaloVoxels |
the number of voxels that are in the left communication halo in this process
uint64_t swSim::Segmentation::rHaloVoxels |
the number of voxels that are in the right communication halo in this process
MPI_Datatype swSim::Segmentation::recieveLeftType |
the MPI data type for recieving data from the left
MPI_Datatype swSim::Segmentation::sendLeftType |
the MPI data type for sending data to the left
MPI_Datatype swSim::Segmentation::recieveRightType |
the MPI data type for recieving data from the right
MPI_Datatype swSim::Segmentation::sendRightType |
the MPI data type for sending data to the right