Dune::RemoteIndices< T > Class Template Reference
[ISTL Communication]

#include <remoteindices.hh>

List of all members.


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 RemoteIndex< GlobalIndex,
Attribute
RemoteIndex
 Type of the remote indices we manage.
typedef PoolAllocator< RemoteIndex, 1 > Allocator
 The type of the allocator for the remote index list.
typedef 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

template<typename T>
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

template<class T>
void Dune::RemoteIndices< T >::setIndexSets ( const ParallelIndexSet source,
const ParallelIndexSet destination,
const MPI_Comm &  comm 
)

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.

template<typename T>
template<bool ignorePublic>
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.

template<typename T>
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.

template<typename T>
template<bool mode, bool send>
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!

template<typename T>
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.

template<typename T>
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.

template<typename T>
int Dune::RemoteIndices< T >::neighbours (  )  const [inline]

Get the number of processors we share indices with.

Returns:
The number of neighbours.


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

Generated on 12 Dec 2007 with Doxygen (ver 1.5.1)