Template Class MPICartesianUtils

Class Documentation

template<DimType DIM>
class MPICartesianUtils

Public Functions

MPICartesianUtils() = default
inline MPICartesianUtils(CommunicatorType comm)
explicit MPICartesianUtils(const MPICartesianUtils &other) = delete
MPICartesianUtils &operator=(const MPICartesianUtils&) = delete
explicit MPICartesianUtils(MPICartesianUtils &&other) = default
MPICartesianUtils &operator=(MPICartesianUtils &&other) = default
virtual ~MPICartesianUtils() = default
inline CommunicatorType getComm() const
inline IndexArray<DIM> getPartitionCoordsOfRank(RankType r) const

Get the cartesian coordinates of a rank in the local cartesian communicator.

Parameters:

r – local rank

Returns:

coordinates in the cartesian grid of processes in local comm

inline const std::array<int, DIM> &getPartitionCoordsOfLocalRank() const
inline bool isOnLowerBoundaryInDimension(DimType d) const
inline bool isOnUpperBoundaryInDimension(DimType d) const
inline RankType getRankFromPartitionCoords(const std::array<int, DIM> &partitionCoordsInt) const
inline RankType getRankFromPartitionCoords(const std::vector<int> &partitionCoordsInt) const
inline RankType getNeighbor1dFromPartitionIndex(DimType dim, int idx1d) const
inline std::vector<RankType> getAllMyPoleNeighborRanks(DimType dim) const

get a vector containing the ranks of all my cartesian neighboring ranks in dimension dim (not only the direct neighbors, all of them)

inline const std::array<int, DIM> &getCartesianDimensions() const
inline std::vector<int> getCartesianDimensionsVector() const
inline int getCommunicatorSize() const
inline RankType getCommunicatorRank() const