This class creates and manages the foreign overlap given an initial list of border indices and a BCRS matrix. More...
#include <domesticoverlapfrombcrsmatrix.hh>
Public Member Functions | |
DomesticOverlapFromBCRSMatrix (const DomesticOverlapFromBCRSMatrix &)=delete | |
template<class BCRSMatrix > | |
DomesticOverlapFromBCRSMatrix (const BCRSMatrix &A, const BorderList &borderList, const BlackList &blackList, unsigned overlapSize) | |
Constructs the foreign overlap given a BCRS matrix and an initial list of border indices. | |
void | check () const |
ProcessRank | myRank () const |
Returns the rank of the current process. | |
unsigned | worldSize () const |
Returns the number of processes in the global MPI communicator. | |
const PeerSet & | peerSet () const |
Return the set of process ranks which share an overlap with the current process. | |
bool | isBorder (Index domesticIdx) const |
Returns true iff a domestic index is a border index. | |
bool | isBorderWith (Index domesticIdx, ProcessRank peerRank) const |
Returns true iff a domestic index is on the border with a given peer process. | |
size_t | numFront (ProcessRank peerRank) const |
Returns the number of indices on the front within a given peer rank's grid partition. | |
bool | isFront (Index domesticIdx) const |
Returns true iff a domestic index is on the front. | |
const BlackList & | blackList () const |
Returns the object which represents the black-listed native indices. | |
size_t | numPeers (Index domesticIdx) const |
Returns the number of processes which "see" a given index. | |
unsigned | overlapSize () const |
Returns the size of the overlap region. | |
size_t | numNative () const |
Returns the number native indices. More... | |
size_t | numLocal () const |
Returns the number local indices. More... | |
size_t | numDomestic () const |
Returns the number domestic indices. More... | |
bool | isLocal (Index domesticIdx) const |
Return true if a domestic index is local for the process. More... | |
bool | iAmMasterOf (Index domesticIdx) const |
Return true iff the current process is the master of a given domestic index. | |
ProcessRank | masterRank (Index domesticIdx) const |
Return the rank of a master process for a domestic index. | |
void | print () const |
Print the foreign overlap for debugging purposes. | |
Index | globalToDomestic (Index globalIdx) const |
Returns a domestic index given a global one. | |
Index | domesticToGlobal (Index domIdx) const |
Returns a global index given a domestic one. | |
Index | domesticToNative (Index domIdx) const |
Returns a native index given a domestic one. | |
Index | nativeToDomestic (Index nativeIdx) const |
Returns a domestic index given a native one. | |
bool | isInOverlap (Index domesticIdx) const |
Returns true if a given domestic index is either in the foreign or in the domestic overlap. | |
bool | isFrontFor (ProcessRank peerRank, Index domesticIdx) const |
Returns true if a given domestic index is a front index for a peer rank. | |
bool | peerHasIndex (int peerRank, Index domesticIdx) const |
Returns true iff a domestic index is seen by a peer rank. | |
size_t | foreignOverlapSize (ProcessRank peerRank) const |
Returns number of indices which are contained in the foreign overlap with a peer. | |
Index | foreignOverlapOffsetToDomesticIdx (ProcessRank peerRank, unsigned overlapOffset) const |
Returns the domestic index given an offset in the foreign overlap of a peer process with the local process. | |
size_t | domesticOverlapSize (ProcessRank peerRank) const |
Returns number of indices which are contained in the domestic overlap with a peer. | |
Index | domesticOverlapOffsetToDomesticIdx (ProcessRank peerRank, Index overlapOffset) const |
Returns the domestic index given an offset in the domestic overlap of a peer process with the local process. | |
Protected Attributes | |
ProcessRank | myRank_ |
unsigned | worldSize_ |
ForeignOverlap | foreignOverlap_ |
BlackList | blackList_ |
DomesticOverlapByRank | domesticOverlapWithPeer_ |
OverlapByIndex | domesticOverlapByIndex_ |
std::vector< BorderDistance > | borderDistance_ |
std::vector< ProcessRank > | masterRank_ |
std::map< ProcessRank, MpiBuffer< size_t > * > | numIndicesSendBuffer_ |
std::map< ProcessRank, MpiBuffer< IndexDistanceNpeers > * > | indicesSendBuffer_ |
GlobalIndices | globalIndices_ |
PeerSet | peerSet_ |
This class creates and manages the foreign overlap given an initial list of border indices and a BCRS matrix.
The foreign overlap are all (row) indices which overlap with the some of the current process's local indices.
|
inline |
Return true if a domestic index is local for the process.
I.e. the entity for this index is in the interior or on the border of the process' domain.
|
inline |
Returns the number domestic indices.
The domestic indices are defined as the process' local indices plus its domestic overlap (i.e. indices for which it is not neither master nor are on the process border).
|
inline |
Returns the number local indices.
I.e. indices in the interior or on the border of the process' domain.
|
inline |
Returns the number native indices.
I.e. the number of indices of the "raw" grid partition of the local process (including the indices in ghost and overlap elements).