Ewoms::Linear::GlobalIndices< ForeignOverlap > Class Template Reference

This class maps domestic row indices to and from "global" indices which is used to construct an algebraic overlap for the parallel linear solvers. More...

#include <globalindices.hh>

Public Member Functions

 GlobalIndices (const ForeignOverlap &foreignOverlap)
 
int domesticToGlobal (int domesticIdx) const
 Converts a domestic index to a global one. More...
 
int globalToDomestic (int globalIdx) const
 Converts a global index to a domestic one. More...
 
int numLocal () const
 Returns the number of indices which are in the interior or on the border of the current rank. More...
 
int numDomestic () const
 Returns the number domestic indices. More...
 
void addIndex (int domesticIdx, int globalIdx)
 Add an index to the domestic<->global mapping. More...
 
void sendBorderIndex (int peerRank, int domesticIdx, int peerLocalIdx)
 Send a border index to a remote process. More...
 
void receiveBorderIndex (int peerRank)
 Receive an index on the border from a remote process and add it the translation maps. More...
 
bool hasGlobalIndex (int globalIdx) const
 Return true iff a given global index already exists. More...
 
void print () const
 Prints the global indices of all domestic indices for debugging purposes. More...
 

Protected Member Functions

void buildGlobalIndices_ ()
 
void sendBorderTo_ (ProcessRank peerRank)
 
void receiveBorderFrom_ (ProcessRank peerRank)
 
const PeerSetpeerSet_ () const
 
const BorderListborderList_ () const
 

Protected Attributes

ProcessRank myRank_
 
size_t mpiSize_
 
int domesticOffset_
 
size_t numDomestic_
 
const ForeignOverlap & foreignOverlap_
 
GlobalToDomesticMap globalToDomestic_
 
DomesticToGlobalMap domesticToGlobal_
 

Detailed Description

template<class ForeignOverlap>
class Ewoms::Linear::GlobalIndices< ForeignOverlap >

This class maps domestic row indices to and from "global" indices which is used to construct an algebraic overlap for the parallel linear solvers.

Constructor & Destructor Documentation

Member Function Documentation

template<class ForeignOverlap >
bool Ewoms::Linear::GlobalIndices< ForeignOverlap >::hasGlobalIndex ( int  globalIdx) const
inline
template<class ForeignOverlap >
int Ewoms::Linear::GlobalIndices< ForeignOverlap >::numDomestic ( ) const
inline

Returns the number domestic indices.

The domestic indices are defined as the process' local indices plus its copies of indices in the overlap regions

References Ewoms::Linear::GlobalIndices< ForeignOverlap >::numDomestic_.

Referenced by Ewoms::Linear::DomesticOverlapFromBCRSMatrix< BCRSMatrix >::numDomestic(), and Ewoms::Linear::DomesticOverlapFromBCRSMatrix< BCRSMatrix >::receiveIndicesFromPeer_().

template<class ForeignOverlap >
int Ewoms::Linear::GlobalIndices< ForeignOverlap >::numLocal ( ) const
inline

Returns the number of indices which are in the interior or on the border of the current rank.

References Ewoms::Linear::GlobalIndices< ForeignOverlap >::foreignOverlap_.

template<class ForeignOverlap >
const PeerSet& Ewoms::Linear::GlobalIndices< ForeignOverlap >::peerSet_ ( ) const
inlineprotected
template<class ForeignOverlap >
void Ewoms::Linear::GlobalIndices< ForeignOverlap >::receiveBorderIndex ( int  peerRank)
inline
template<class ForeignOverlap >
void Ewoms::Linear::GlobalIndices< ForeignOverlap >::sendBorderIndex ( int  peerRank,
int  domesticIdx,
int  peerLocalIdx 
)
inline

Member Data Documentation

template<class ForeignOverlap >
int Ewoms::Linear::GlobalIndices< ForeignOverlap >::domesticOffset_
protected

The documentation for this class was generated from the following file: