Dune::RemoteIndices< T > Class Template Reference
[ISTL Communication]
#include <remoteindices.hh>
Detailed Description
template<class T>
class Dune::RemoteIndices< T >
The indices present on remote processes. Public Types | |
typedef T | ParallelIndexSet |
Type of the index set we use, e.g. ParallelLocalIndexSet. | |
typedef ParallelIndexSet::GlobalIndex | GlobalIndex |
The type of the global index. | |
typedef ParallelIndexSet::LocalIndex | LocalIndex |
The type of the local index. | |
typedef LocalIndex::Attribute | Attribute |
The type of the attribute. | |
typedef Dune::RemoteIndex < GlobalIndex, Attribute > | RemoteIndex |
Type of the remote indices we manage. | |
typedef Dune::PoolAllocator < RemoteIndex, 1 > | Allocator |
The type of the allocator for the remote index list. | |
typedef Dune::SLList < RemoteIndex, Allocator > | RemoteIndexList |
The type of the remote index list. | |
typedef std::map< int, std::pair< RemoteIndexList *, RemoteIndexList * > > | RemoteIndexMap |
The type of the map from rank to remote index list. | |
Public Member Functions | |
RemoteIndices (const ParallelIndexSet &source, const ParallelIndexSet &destination, const MPI_Comm &comm) | |
Constructor. | |
void | setIndexSets (const ParallelIndexSet &source, const ParallelIndexSet &destination, const MPI_Comm &comm) |
Set the the index sets and communicator we work with. | |
~RemoteIndices () | |
Destructor. | |
template<bool ignorePublic> | |
void | rebuild () |
Rebuilds the set of remote indices. | |
bool | isSynced () const |
Checks whether the remote indices are synced with the indexsets. | |
MPI_Comm | communicator () const |
Get the mpi communicator used. | |
template<bool mode, bool send> | |
RemoteIndexListModifier< T, mode > | getModifier (int process) |
Get a modifier for a remote index list. | |
const_iterator | begin () const |
Get an iterator over all remote index lists. | |
const_iterator | end () const |
Get an iterator over all remote index lists. | |
template<bool send> | |
CollectiveIterator< T > | iterator () const |
Get an iterator for colletively iterating over the remote indices of all remote processes. | |
void | free () |
Free the index lists. | |
int | neighbours () const |
Get the number of processors we share indices with. |
Constructor & Destructor Documentation
Dune::RemoteIndices< T >::RemoteIndices | ( | const ParallelIndexSet & | source, | |
const ParallelIndexSet & | destination, | |||
const MPI_Comm & | comm | |||
) | [inline] |
Constructor.
- Parameters:
-
comm The communicator to use. source The indexset which represents the global to local mapping at the source of the communication destination The indexset to which the communication which represents the global to local mapping at the destination of the communication. May be the same as the source indexset.
Member Function Documentation
void Dune::RemoteIndices< T >::setIndexSets | ( | const ParallelIndexSet & | source, | |
const ParallelIndexSet & | destination, | |||
const MPI_Comm & | comm | |||
) | [inline] |
Set the the index sets and communicator we work with.
- Warning:
- All remote indices already setup will be deleted!
- Parameters:
-
comm The communicator to use. source The indexset which represents the global to local mapping at the source of the communication destination The indexset to which the communication which represents the global to local mapping at the destination of the communication. May be the same as the source indexset.
References Dune::RemoteIndices< T >::free().
Referenced by Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::OwnerOverlapCopyCommunication().
void Dune::RemoteIndices< T >::rebuild | ( | ) | [inline] |
Rebuilds the set of remote indices.
This has to be called whenever the underlying index sets change.
If the template parameter ignorePublic is true all indices will be treated as public.
References Dune::RemoteIndices< T >::free(), Dune::RemoteIndices< T >::isSynced(), and Dune::ParallelIndexSet< TG, TL, N >::seqNo().
bool Dune::RemoteIndices< T >::isSynced | ( | ) | const [inline] |
Checks whether the remote indices are synced with the indexsets.
If they are not synced the remote indices need to be rebuild.
- Returns:
- True if they are synced.
References Dune::ParallelIndexSet< TG, TL, N >::seqNo().
Referenced by Dune::RemoteIndices< T >::rebuild().
RemoteIndexListModifier< T, mode > Dune::RemoteIndices< T >::getModifier | ( | int | process | ) | [inline] |
Get a modifier for a remote index list.
Sometimes the user knows in advance which indices will be present on other processors, too. Then he can set them up using this modifier.
- Warning:
- Use with care. If the remote index list is inconsistent after the modification the communication might result in a dead lock!
std::map< int, std::pair< SLList< typename RemoteIndices< T >::RemoteIndex, PoolAllocator< typename RemoteIndices< T >::RemoteIndex, 1 > > *, SLList< typename RemoteIndices< T >::RemoteIndex, PoolAllocator< typename RemoteIndices< T >::RemoteIndex, 1 > > * > >::const_iterator Dune::RemoteIndices< T >::begin | ( | ) | const [inline] |
Get an iterator over all remote index lists.
- Returns:
- The iterator over all remote index lists postioned at the first process.
Referenced by Dune::InterfaceBuilder< T >::buildInterface(), and Dune::IndicesSyncer< T >::sync().
std::map< int, std::pair< SLList< typename RemoteIndices< T >::RemoteIndex, PoolAllocator< typename RemoteIndices< T >::RemoteIndex, 1 > > *, SLList< typename RemoteIndices< T >::RemoteIndex, PoolAllocator< typename RemoteIndices< T >::RemoteIndex, 1 > > * > >::const_iterator Dune::RemoteIndices< T >::end | ( | ) | const [inline] |
Get an iterator over all remote index lists.
- Returns:
- The iterator over all remote index lists postioned at the end.
Referenced by Dune::InterfaceBuilder< T >::buildInterface(), and Dune::IndicesSyncer< T >::sync().
int Dune::RemoteIndices< T >::neighbours | ( | ) | const [inline] |
Get the number of processors we share indices with.
- Returns:
- The number of neighbours.
Referenced by Dune::IndicesSyncer< T >::sync().
The documentation for this class was generated from the following file: