22#ifndef dftfeMPIPatternP2P_h
23#define dftfeMPIPatternP2P_h
55 template <dftfe::utils::MemorySpace memorySpace>
98 const std::pair<dftfe::uInt, dftfe::uInt> &locallyOwnedRange,
99 const std::vector<dftfe::uInt> &ghostIndices,
100 const MPI_Comm &mpiComm);
125 std::pair<dftfe::uInt, dftfe::uInt>
146 const std::vector<dftfe::uInt> &
149 const std::vector<dftfe::uInt> &
152 const std::vector<dftfe::uInt> &
161 const std::vector<dftfe::uInt> &
164 const std::vector<dftfe::uInt> &
167 const std::vector<dftfe::uInt> &
Definition MemoryStorage.h:33
Definition OptimizedIndexSet.h:44
SizeTypeVector getGhostLocalIndices(const dftfe::uInt procId) const
Definition MPIPatternP2P.t.cc:712
virtual ~MPIPatternP2P()=default
dftfe::uInt localToGlobal(const dftfe::uInt localId) const
Definition MPIPatternP2P.t.cc:878
bool inLocallyOwnedRange(const dftfe::uInt globalId) const
Definition MPIPatternP2P.t.cc:935
OptimizedIndexSet< dftfe::uInt > d_ghostIndicesOptimizedIndexSet
Definition MPIPatternP2P.h:242
std::vector< dftfe::uInt > d_allOwnedRanges
Definition MPIPatternP2P.h:213
dftfe::uInt getNumGhostIndicesInProc(const dftfe::uInt procId) const
Definition MPIPatternP2P.t.cc:685
const std::vector< dftfe::uInt > & getNumGhostIndicesInProcs() const
Definition MPIPatternP2P.t.cc:670
std::vector< dftfe::uInt > d_localGhostIndicesRanges
A vector of size 2 times the number of ghost processors to store the range of local ghost indices tha...
Definition MPIPatternP2P.h:319
utils::MemoryStorage< dftfe::uInt, memorySpace > GlobalSizeTypeVector
Definition MPIPatternP2P.h:63
MPIPatternP2P(const std::pair< dftfe::uInt, dftfe::uInt > &locallyOwnedRange, const std::vector< dftfe::uInt > &ghostIndices, const MPI_Comm &mpiComm)
Constructor. This constructor is the typical way of creation of an MPI pattern.
Definition MPIPatternP2P.t.cc:246
const std::vector< dftfe::uInt > & getGhostLocalIndicesRanges() const
Definition MPIPatternP2P.t.cc:678
SizeTypeVector d_flattenedLocalTargetIndices
Definition MPIPatternP2P.h:363
dftfe::uInt d_numTargetProcs
Definition MPIPatternP2P.h:326
bool isGhostEntry(const dftfe::uInt globalId) const
Definition MPIPatternP2P.t.cc:944
int d_myRank
Rank of the current processor.
Definition MPIPatternP2P.h:369
int d_nprocs
Number of processors in the MPI Communicator.
Definition MPIPatternP2P.h:366
std::vector< dftfe::uInt > d_ghostProcIds
Definition MPIPatternP2P.h:255
std::vector< dftfe::uInt > d_numOwnedIndicesForTargetProcs
Definition MPIPatternP2P.h:341
dftfe::uInt getNumOwnedIndicesForTargetProc(const dftfe::uInt procId) const
Definition MPIPatternP2P.t.cc:768
std::pair< dftfe::uInt, dftfe::uInt > d_locallyOwnedRange
Definition MPIPatternP2P.h:202
const SizeTypeVector & getOwnedLocalIndicesForTargetProcs() const
Definition MPIPatternP2P.t.cc:761
dftfe::uInt nGlobalIndices() const
Definition MPIPatternP2P.t.cc:856
dftfe::uInt localOwnedSize() const
Definition MPIPatternP2P.t.cc:863
std::vector< dftfe::uInt > d_targetProcIds
Definition MPIPatternP2P.h:333
dftfe::uInt d_numGhostProcs
Definition MPIPatternP2P.h:249
std::vector< dftfe::uInt > d_ghostIndices
Definition MPIPatternP2P.h:229
dftfe::uInt thisProcessId() const
Definition MPIPatternP2P.t.cc:849
bool isCompatible(const MPIPatternP2P< memorySpace > &rhs) const
Definition MPIPatternP2P.t.cc:954
dftfe::uInt nmpiProcesses() const
Definition MPIPatternP2P.t.cc:842
SizeTypeVector d_flattenedLocalGhostIndices
Definition MPIPatternP2P.h:297
utils::MemoryStorage< dftfe::uInt, memorySpace > SizeTypeVector
Definition MPIPatternP2P.h:62
std::pair< dftfe::uInt, dftfe::uInt > getLocallyOwnedRange() const
Definition MPIPatternP2P.t.cc:649
dftfe::uInt localGhostSize() const
Definition MPIPatternP2P.t.cc:870
const MPI_Comm & mpiCommunicator() const
Definition MPIPatternP2P.t.cc:835
std::vector< dftfe::uInt > d_numGhostIndicesInGhostProcs
Definition MPIPatternP2P.h:261
dftfe::uInt globalToLocal(const dftfe::uInt globalId) const
Definition MPIPatternP2P.t.cc:905
SizeTypeVector getOwnedLocalIndices(const dftfe::uInt procId) const
Definition MPIPatternP2P.t.cc:796
const std::vector< dftfe::uInt > & getGhostIndices() const
Definition MPIPatternP2P.t.cc:656
dftfe::uInt d_nGlobalIndices
Definition MPIPatternP2P.h:374
MPI_Comm d_mpiComm
MPI Communicator object.
Definition MPIPatternP2P.h:377
const std::vector< dftfe::uInt > & getNumOwnedIndicesForTargetProcs() const
Definition MPIPatternP2P.t.cc:754
std::set< dftfe::uInt > d_ghostIndicesSetSTL
Definition MPIPatternP2P.h:234
const std::vector< dftfe::uInt > & getTargetProcIds() const
Definition MPIPatternP2P.t.cc:747
dftfe::uInt d_numGhostIndices
Definition MPIPatternP2P.h:223
dftfe::uInt d_numLocallyOwnedIndices
Definition MPIPatternP2P.h:218
const std::vector< dftfe::uInt > & getGhostProcIds() const
Definition MPIPatternP2P.t.cc:663
Definition MPICommunicatorP2P.h:46
Definition pseudoPotentialToDftfeConverter.cc:34
std::uint32_t uInt
Definition TypeConfig.h:10