26#ifndef dftefeMPIPatternP2P_h 
   27#define dftefeMPIPatternP2P_h 
  195      template <dftefe::utils::MemorySpace memorySpace>
 
  245          const std::vector<std::pair<global_size_type, global_size_type>>
 
  246            &                                          locallyOwnedRanges,
 
  247          const std::vector<dftefe::global_size_type> &ghostIndices,
 
  282        MPIPatternP2P(
const std::pair<global_size_type, global_size_type>
 
  284                      const std::vector<dftefe::global_size_type> &ghostIndices,
 
  336        reinit(
const std::vector<std::pair<global_size_type, global_size_type>>
 
  337                 &                                          locallyOwnedRanges,
 
  338               const std::vector<dftefe::global_size_type> &ghostIndices,
 
  342        reinit(
const std::vector<size_type> &sizes);
 
  347        std::vector<std::pair<global_size_type, global_size_type>>
 
  350        std::vector<std::pair<global_size_type, global_size_type>>
 
  353        std::pair<global_size_type, global_size_type>
 
  376        std::pair<bool, size_type>
 
  391        std::pair<bool, size_type>
 
  408        std::pair<size_type, size_type>
 
  419        std::pair<global_size_type, size_type>
 
  422        const std::vector<global_size_type> &
 
  425        const std::vector<size_type> &
 
  428        const std::vector<size_type> &
 
  440        const std::vector<size_type> &
 
  443        const std::vector<size_type> &
 
  446        const std::vector<size_type> &
 
  487        std::vector<std::pair<global_size_type, global_size_type>>
 
  504        std::vector<std::pair<global_size_type, global_size_type>>
 
  529        std::vector<std::vector<std::pair<global_size_type, global_size_type>>>
 
  539        std::vector<std::pair<global_size_type, global_size_type>>
 
  561        std::vector<std::pair<size_type, size_type>>
 
  671        std::vector<std::vector<size_type>>
 
size_type rangeId
Definition: MPIPatternP2P.t.cpp:594
Definition: OptimizedIndexSet.h:48
A class template to store the communication pattern (i.e., which entries/nodes to receive from which ...
Definition: MPIPatternP2P.h:197
const SizeTypeVector & getOwnedLocalIndicesForTargetProcs() const
Definition: MPIPatternP2P.t.cpp:1796
SizeTypeVector getGhostLocalIndicesForGhostProc(const size_type procId) const
Definition: MPIPatternP2P.t.cpp:1711
void reinit(const std::vector< std::pair< global_size_type, global_size_type > > &locallyOwnedRanges, const std::vector< dftefe::global_size_type > &ghostIndices, const MPIComm &mpiComm)
Definition: MPIPatternP2P.t.cpp:1422
const std::vector< size_type > & getNumGhostIndicesInGhostProcs() const
Definition: MPIPatternP2P.t.cpp:1668
size_type localOwnedSize() const
Definition: MPIPatternP2P.t.cpp:1875
size_type getNumOwnedIndicesForTargetProc(const size_type procId) const
Definition: MPIPatternP2P.t.cpp:1767
std::vector< std::vector< std::pair< global_size_type, global_size_type > > > d_allOwnedRanges
Definition: MPIPatternP2P.h:530
std::vector< std::pair< global_size_type, global_size_type > > d_locallyOwnedRanges
Definition: MPIPatternP2P.h:488
const std::vector< global_size_type > & getGhostIndices() const
Definition: MPIPatternP2P.t.cpp:1654
size_type nmpiProcesses() const
Definition: MPIPatternP2P.t.cpp:1854
std::vector< std::vector< size_type > > d_ghostProcLocallyOwnedRangesCumulative
Definition: MPIPatternP2P.h:672
std::pair< global_size_type, global_size_type > getLocallyOwnedRange(size_type rangeId) const
Definition: MPIPatternP2P.t.cpp:1647
std::vector< size_type > d_targetProcIds
Definition: MPIPatternP2P.h:686
global_size_type nGlobalIndices() const
Definition: MPIPatternP2P.t.cpp:1868
size_type nGlobalRanges() const
Definition: MPIPatternP2P.t.cpp:1626
const std::vector< size_type > & getGhostProcIds() const
Definition: MPIPatternP2P.t.cpp:1661
std::vector< size_type > d_ghostIndicesRangeId
Definition: MPIPatternP2P.h:590
const SizeTypeVector & getGhostLocalIndicesForGhostProcs() const
Definition: MPIPatternP2P.t.cpp:1703
const std::vector< size_type > & getTargetProcIds() const
Definition: MPIPatternP2P.t.cpp:1753
MPIComm d_mpiComm
MPI Communicator object.
Definition: MPIPatternP2P.h:721
size_type globalToLocal(const global_size_type globalId) const
Definition: MPIPatternP2P.t.cpp:1996
std::vector< size_type > d_numGhostIndicesInGhostProcs
Definition: MPIPatternP2P.h:610
size_type localGhostSize() const
Definition: MPIPatternP2P.t.cpp:1890
const MPIComm & mpiCommunicator() const
Definition: MPIPatternP2P.t.cpp:1847
OptimizedIndexSet< global_size_type > d_ghostIndicesOptimizedIndexSet
Definition: MPIPatternP2P.h:583
const std::vector< size_type > & getNumOwnedIndicesForTargetProcs() const
Definition: MPIPatternP2P.t.cpp:1760
std::pair< global_size_type, size_type > localToGlobalAndRangeId(const size_type localId) const
For a given local index, returns a pair containing its global index and the index of the global-range...
Definition: MPIPatternP2P.t.cpp:1945
std::vector< size_type > d_numOwnedIndicesForTargetProcs
Definition: MPIPatternP2P.h:694
size_type thisProcessId() const
Definition: MPIPatternP2P.t.cpp:1861
int d_myRank
Rank of the current processor.
Definition: MPIPatternP2P.h:713
std::pair< size_type, size_type > globalToLocalAndRangeId(const global_size_type globalId) const
For a given global index, returns a pair containing the local index in the procesor and the index of ...
Definition: MPIPatternP2P.t.cpp:2038
size_type getTotalOwnedIndicesForTargetProcs() const
Definition: MPIPatternP2P.t.cpp:1840
size_type d_numLocallyOwnedIndices
Definition: MPIPatternP2P.h:546
size_type d_numGhostIndices
Definition: MPIPatternP2P.h:574
std::vector< std::pair< size_type, size_type > > d_locallyOwnedRangesCumulativePairs
Definition: MPIPatternP2P.h:562
std::vector< size_type > d_locallyOwnedRangesIdPermutation
Definition: MPIPatternP2P.h:514
SizeTypeVector getOwnedLocalIndicesForTargetProc(const size_type procId) const
Definition: MPIPatternP2P.t.cpp:1803
std::vector< global_size_type > d_ghostIndices
Definition: MPIPatternP2P.h:568
size_type getNumGhostIndicesInGhostProc(const size_type procId) const
Definition: MPIPatternP2P.t.cpp:1675
size_type d_nGlobalRanges
Definition: MPIPatternP2P.h:495
bool isCompatible(const MPIPatternP2P< memorySpace > &rhs) const
Definition: MPIPatternP2P.t.cpp:2120
std::vector< size_type > d_localGhostIndicesRanges
Definition: MPIPatternP2P.h:653
size_type d_numTargetProcs
Definition: MPIPatternP2P.h:679
virtual ~MPIPatternP2P()=default
SizeTypeVector d_flattenedLocalGhostIndices
Definition: MPIPatternP2P.h:635
std::vector< size_type > d_ghostProcIds
Definition: MPIPatternP2P.h:603
std::pair< bool, size_type > inLocallyOwnedRanges(const global_size_type globalId) const
For a given globalId, returns whether it lies in any of the locally-owned-ranges and if true the inde...
Definition: MPIPatternP2P.t.cpp:2085
SizeTypeVector d_flattenedLocalTargetIndices
Definition: MPIPatternP2P.h:707
const std::vector< size_type > & getGhostLocalIndicesRanges() const
Definition: MPIPatternP2P.t.cpp:1746
std::pair< bool, size_type > isGhostEntry(const global_size_type globalId) const
For a given globalId, returns whether it belongs to the current processor's ghost-set and if true the...
Definition: MPIPatternP2P.t.cpp:2104
global_size_type d_nGlobalIndices
Definition: MPIPatternP2P.h:718
std::vector< std::pair< global_size_type, global_size_type > > d_globalRanges
Definition: MPIPatternP2P.h:540
int d_nprocs
Number of processors in the MPI Communicator.
Definition: MPIPatternP2P.h:710
size_type d_numGhostProcs
Definition: MPIPatternP2P.h:597
global_size_type localToGlobal(const size_type localId) const
Definition: MPIPatternP2P.t.cpp:1898
std::vector< std::pair< global_size_type, global_size_type > > d_locallyOwnedRangesSorted
Definition: MPIPatternP2P.h:505
std::vector< std::pair< global_size_type, global_size_type > > getLocallyOwnedRanges() const
Definition: MPIPatternP2P.t.cpp:1640
std::vector< std::pair< global_size_type, global_size_type > > getGlobalRanges() const
Definition: MPIPatternP2P.t.cpp:1633
int MPIComm
Definition: MPITypes.h:84
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
unsigned int size_type
Definition: TypeConfig.h:8
unsigned long int global_size_type
Definition: TypeConfig.h:9