Opm::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)
 
Index domesticToGlobal (Index domesticIdx) const
 Converts a domestic index to a global one. More...
 
Index globalToDomestic (Index globalIdx) const
 Converts a global index to a domestic one. More...
 
size_t numLocal () const
 Returns the number of indices which are in the interior or on the border of the current rank. More...
 
size_t numDomestic () const
 Returns the number domestic indices. More...
 
void addIndex (Index domesticIdx, Index globalIdx)
 Add an index to the domestic<->global mapping. More...
 
void sendBorderIndex (ProcessRank peerRank, Index domesticIdx, Index peerLocalIdx)
 Send a border index to a remote process. More...
 
void receiveBorderIndex (ProcessRank peerRank)
 Receive an index on the border from a remote process and add it the translation maps. More...
 
bool hasGlobalIndex (Index 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 Opm::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

◆ GlobalIndices()

template<class ForeignOverlap >
Opm::Linear::GlobalIndices< ForeignOverlap >::GlobalIndices ( const ForeignOverlap &  foreignOverlap)
inline

Member Function Documentation

◆ addIndex()

◆ borderList_()

◆ buildGlobalIndices_()

◆ domesticToGlobal()

◆ globalToDomestic()

◆ hasGlobalIndex()

template<class ForeignOverlap >
bool Opm::Linear::GlobalIndices< ForeignOverlap >::hasGlobalIndex ( Index  globalIdx) const
inline

◆ numDomestic()

template<class ForeignOverlap >
size_t Opm::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 Opm::Linear::GlobalIndices< ForeignOverlap >::numDomestic_.

Referenced by Opm::Linear::DomesticOverlapFromBCRSMatrix::numDomestic(), and Opm::Linear::DomesticOverlapFromBCRSMatrix::receiveIndicesFromPeer_().

◆ numLocal()

template<class ForeignOverlap >
size_t Opm::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 Opm::Linear::GlobalIndices< ForeignOverlap >::foreignOverlap_.

◆ peerSet_()

template<class ForeignOverlap >
const PeerSet & Opm::Linear::GlobalIndices< ForeignOverlap >::peerSet_ ( ) const
inlineprotected

◆ print()

◆ receiveBorderFrom_()

◆ receiveBorderIndex()

template<class ForeignOverlap >
void Opm::Linear::GlobalIndices< ForeignOverlap >::receiveBorderIndex ( ProcessRank  peerRank)
inline

◆ sendBorderIndex()

template<class ForeignOverlap >
void Opm::Linear::GlobalIndices< ForeignOverlap >::sendBorderIndex ( ProcessRank  peerRank,
Index  domesticIdx,
Index  peerLocalIdx 
)
inline

◆ sendBorderTo_()

Member Data Documentation

◆ domesticOffset_

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

◆ domesticToGlobal_

◆ foreignOverlap_

◆ globalToDomestic_

◆ mpiSize_

◆ myRank_

◆ numDomestic_


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