A class which determines the way to distribute a vector across MPI procs. More...
#include <parVectorMap.hpp>
Public Member Functions | |
parVectorMap () | |
A constructor of `parVectorMap`. | |
parVectorMap (MPI_Comm ncomm, S lbound, S ubound) | |
A constructor of `parVectorMap`. More... | |
~parVectorMap () | |
A destructor of `parVectorMap`. | |
bool | operator== (const parVectorMap &map1) |
Compare if this map is identical to another one `map1`. | |
bool | operator!= (const parVectorMap &map1) |
Compare if this map is different with another one `map1`. | |
S | Loc2Glob (S local_index) |
Convert a index of local vector on each MPI proc into its index in the global distributed vector. More... | |
S | Glob2Loc (S global_index) |
Convert a index of global vector into its index in the local vector on each MPI proc. More... | |
MPI_Comm | GetCurrentComm () |
Return parVectorMap<S>::comm. | |
int | GetRank () |
Return parVectorMap<S>::rank. | |
S | GetLowerBound () |
Return parVectorMap<S>::lower_bound. | |
S | GetUpperBound () |
Return parVectorMap<S>::upper_bound. | |
S | GetLocalSize () |
Return parVectorMap<S>::local_size. | |
S | GetGlobalSize () |
Return parVectorMap<S>::global_size. | |
std::vector< S > | GetLBoundMap () |
Return parVectorMap<S>::lprocbound_map. | |
std::vector< S > | GetUBoundMap () |
Return parVectorMap<S>::uprocbound_map. | |
Private Attributes | |
MPI_Comm | comm |
The working MPI Communicator. | |
int | nproc |
number of MPI procs within the working MPI communicator parVectorMap::comm | |
int | rank |
rank of each MPI procs within the working MPI communicator parVectorMap::comm | |
S | lower_bound |
the smallest index of a distributed vector on each MPI proc | |
S | upper_bound |
`upper_bound-1 = ` the largest index of a distributed vector on each MPI proc | |
S | local_size |
The number of elements of vector stored on each MPI proc. | |
S | global_size |
Global size of this distributed vector. | |
std::vector< S > | lprocbound_map |
A `std::vector` which stores the parVectorMap::lower_bound of all MPI procs together. | |
std::vector< S > | uprocbound_map |
A `std::vector` which stores the parVectorMap::upper_bound of all MPI procs together. | |
A class which determines the way to distribute a vector across MPI procs.
S | type of integer to describes the dimension of vector to be generated. |
parVectorMap< S >::parVectorMap | ( | MPI_Comm | ncomm, |
S | lbound, | ||
S | ubound | ||
) |
A constructor of `parVectorMap`.
[in] | ncomm | the working MPI Communicator |
[in] | lbound | the smallest index of a distributed vector on each MPI proc |
[in] | ubound | `ubound-1 = ` the largest index of a distributed vector on each MPI proc |
S parVectorMap< S >::Glob2Loc | ( | S | global_index | ) |
Convert a index of global vector into its index in the local vector on each MPI proc.
[in] | global_index | the index global vector to be converted |
S parVectorMap< S >::Loc2Glob | ( | S | local_index | ) |
Convert a index of local vector on each MPI proc into its index in the global distributed vector.
[in] | local_index | the index local vector to be converted |