My Project
|
This class creates and manages the foreign overlap given an initial list of border indices and a BCRS matrix. More...
#include <foreignoverlapfrombcrsmatrix.hh>
Public Member Functions | |
ForeignOverlapFromBCRSMatrix (const ForeignOverlapFromBCRSMatrix &)=delete | |
template<class BCRSMatrix > | |
ForeignOverlapFromBCRSMatrix (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. | |
unsigned | overlapSize () const |
Returns the size of the overlap region. | |
bool | isBorder (Index localIdx) const |
Returns true iff a local index is a border index. | |
bool | isBorderWith (Index localIdx, ProcessRank peerRank) const |
Returns true iff a local index is a border index shared with a given peer process. | |
ProcessRank | masterRank (Index localIdx) const |
Return the rank of the master process of an index. | |
bool | iAmMasterOf (Index localIdx) const |
Return true if the current rank is the "master" of an index. | |
const BorderList & | borderList () const |
Returns the list of indices which intersect the process border. | |
const OverlapWithPeer & | foreignOverlapWithPeer (ProcessRank peerRank) const |
Return the list of (local indices, border distance, number of processes) triples which are in the overlap of a given peer rank. | |
const std::map< ProcessRank, BorderDistance > & | foreignOverlapByLocalIndex (Index localIdx) const |
Return the map of (peer rank, border distance) for a given local index. | |
bool | peerHasIndex (ProcessRank peerRank, Index localIdx) const |
Returns true iff a local index is seen by a peer rank. | |
size_t | numFront (ProcessRank peerRank) const |
Returns the number of front indices of a peer process in the local partition. | |
bool | isFrontFor (ProcessRank peerRank, Index localIdx) const |
Returns whether a given local index is on the front of a given peer rank. | |
const PeerSet & | peerSet () const |
Return the set of process ranks which share an overlap with the current process. | |
const PeerSet & | neighborPeerSet () const |
Return the set of process ranks which share a border index with the current process. | |
size_t | numNative () const |
Returns the number of native indices. | |
size_t | numLocal () const |
Returns the number of local indices. | |
bool | isLocal (Index domesticIdx) const |
Returns true iff a domestic index is local. | |
Index | nativeToLocal (Index nativeIdx) const |
Convert a native index to a local one. | |
Index | localToNative (Index localIdx) const |
Convert a local index to a native one. | |
const BlackList & | blackList () const |
Returns the object which represents the black-listed native indices. | |
size_t | numPeers (Index localIdx) const |
Return the number of peer ranks for which a given local index is visible. | |
bool | isInOverlap (Index localIdx) const |
Returns true if a given local index is in the foreign overlap of any rank. | |
void | print () const |
Print the foreign overlap for debugging purposes. | |
Protected Member Functions | |
template<class BCRSMatrix > | |
void | extendForeignOverlap_ (const BCRSMatrix &A, SeedList &seedList, BorderDistance borderDistance, BorderDistance overlapSize) |
void | createLocalIndices_ () |
Index | localToPeerIdx_ (Index localIdx, ProcessRank peerRank) const |
template<class BCRSMatrix > | |
void | addNonNeighborOverlapIndices_ (const BCRSMatrix &, SeedList &seedList, BorderDistance borderDist) |
void | computeMasterRanks_ () |
void | groupForeignOverlapByRank_ () |
Protected Attributes | |
PeerSet | peerSet_ |
PeerSet | neighborPeerSet_ |
const BorderList & | borderList_ |
const BlackList & | blackList_ |
std::vector< Index > | nativeToLocalIndices_ |
std::vector< Index > | localToNativeIndices_ |
std::vector< ProcessRank > | masterRank_ |
std::set< Index > | localBorderIndices_ |
OverlapByIndex | foreignOverlapByLocalIndex_ |
OverlapByRank | foreignOverlapByRank_ |
unsigned | overlapSize_ |
size_t | numLocal_ |
size_t | numNative_ |
ProcessRank | myRank_ |
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.
Return true if the current rank is the "master" of an index.
If the index is at the interior of some process, we define this process as its master, if the index is on the boundary, then the master is defined as the process with the lowest rank.
Convert a native index to a local one.
If a given native index is not in the set of local indices, this method returns -1.