Loading...
Searching...
No Matches
Dune::RemoteIndices< T, A > Class Template Reference
Common » Parallel Communication » Parallel Computing based on Indexsets

The indices present on remote processes. More...

`#include <dune/common/parallel/remoteindices.hh>`

Inheritance diagram for Dune::RemoteIndices< T, A >:

## Public Types

typedef T | ParallelIndexSet
| Type of the index set we use, e.g. ParallelLocalIndexSet.
typedef CollectiveIterator< T, A > | CollectiveIteratorT
| The type of the collective iterator over all remote indices.
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.
using | Allocator = typename std::allocator_traits<A>::template rebind_alloc<RemoteIndex>
| 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.
typedef RemoteIndexMap::const_iterator | const_iterator

## Public Member Functions

| RemoteIndices (const ParallelIndexSet &source, const ParallelIndexSet &destination, const MPI_Comm &comm, const std::vector< int > &neighbours=std::vector< int >(), bool includeSelf=false)
| Constructor.
| RemoteIndices ()
void | setIncludeSelf (bool includeSelf)
| Tell whether sending from indices of the processor to other indices on the same processor is enabled even if the same indexset is used on both the sending and receiving side.
void | setIndexSets (const ParallelIndexSet &source, const ParallelIndexSet &destination, const MPI_Comm &comm, const std::vector< int > &neighbours=std::vector< int >())
| Set the index sets and communicator we work with.
template<typename C>
void | setNeighbours (const C &neighbours)
const std::set< int > & | getNeighbours () const
| ~RemoteIndices ()
| Destructor.
template<bool ignorePublic>
void | rebuild ()
| Rebuilds the set of remote indices.
bool | operator== (const RemoteIndices &ri) const
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, A, mode > | getModifier (int process)
| Get a modifier for a remote index list.
const_iterator | find (int proc) const
| Find an iterator over the remote index lists of a specific process.
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>
CollectiveIteratorT | iterator () const
| Get an iterator for collectively 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.
const ParallelIndexSet & | sourceIndexSet () const
| Get the index set at the source.
const ParallelIndexSet & | destinationIndexSet () const
| Get the index set at destination.
template<bool ignorePublic>
void | packEntries (IndexPair< GlobalIndex, LocalIndex > **pairs, const ParallelIndexSet &indexSet, char *p_out, MPI_Datatype type, int bufferSize, int *position, int n)

## Friends

class | InterfaceBuilder
class | IndicesSyncer< T >
template<typename T1, typename A2, typename A1>
void | repairLocalIndexPointers (std::map< int, SLList< std::pair< typename T1::GlobalIndex, typename T1::LocalIndex::Attribute >, A2 > > &, RemoteIndices< T1, A1 > &, const T1 &)
template<class G, class T1, class T2>
void | fillIndexSetHoles (const G &graph, Dune::OwnerOverlapCopyCommunication< T1, T2 > &oocomm)
std::ostream & | operator<< (std::ostream &, const RemoteIndices< T > &)

## Detailed Description

template<class T, class A = std::allocator<RemoteIndex<typename T::GlobalIndex, typename T::LocalIndex::Attribute> >>
class Dune::RemoteIndices< T, A >

The indices present on remote processes.

To set up communication between the set of processes active in the communication every process needs to know which indices are also known to other processes and which attributes are attached to them on the remote side.

This information is managed by this class. The information can either be computed automatically calling rebuild (which requires information to be sent in a ring) or set up by hand using the RemoteIndexListModifiers returned by function getModifier(int).

Template Parameters

  T | The type of the underlying index set.
  A | The type of the allocator to use.

## Member Typedef Documentation

## Allocator

template<class T, class A = std::allocator<RemoteIndex<typename T::GlobalIndex, typename T::LocalIndex::Attribute> >>

using Dune::RemoteIndices< T, A >::Allocator = typename std::allocator_traits<A>::template rebind_alloc<RemoteIndex>

The type of the allocator for the remote index list.

## Attribute

template<class T, class A = std::allocator<RemoteIndex<typename T::GlobalIndex, typename T::LocalIndex::Attribute> >>

typedef LocalIndex::Attribute Dune::RemoteIndices< T, A >::Attribute

The type of the attribute.

## CollectiveIteratorT

template<class T, class A = std::allocator<RemoteIndex<typename T::GlobalIndex, typename T::LocalIndex::Attribute> >>

typedef CollectiveIterator<T,A> Dune::RemoteIndices< T, A >::CollectiveIteratorT

The type of the collective iterator over all remote indices.

## const_iterator

template<class T, class A = std::allocator<RemoteIndex<typename T::GlobalIndex, typename T::LocalIndex::Attribute> >>

typedef RemoteIndexMap::const_iterator Dune::RemoteIndices< T, A >::const_iterator

## GlobalIndex

template<class T, class A = std::allocator<RemoteIndex<typename T::GlobalIndex, typename T::LocalIndex::Attribute> >>

typedef ParallelIndexSet::GlobalIndex Dune::RemoteIndices< T, A >::GlobalIndex

The type of the global index.

## LocalIndex

template<class T, class A = std::allocator<RemoteIndex<typename T::GlobalIndex, typename T::LocalIndex::Attribute> >>

typedef ParallelIndexSet::LocalIndex Dune::RemoteIndices< T, A >::LocalIndex

The type of the local index.

## ParallelIndexSet

template<class T, class A = std::allocator<RemoteIndex<typename T::GlobalIndex, typename T::LocalIndex::Attribute> >>

typedef T Dune::RemoteIndices< T, A >::ParallelIndexSet

Type of the index set we use, e.g. ParallelLocalIndexSet.

## RemoteIndex

template<class T, class A = std::allocator<RemoteIndex<typename T::GlobalIndex, typename T::LocalIndex::Attribute> >>

typedef Dune::RemoteIndex<GlobalIndex,Attribute> Dune::RemoteIndices< T, A >::RemoteIndex

Type of the remote indices we manage.

## RemoteIndexList

template<class T, class A = std::allocator<RemoteIndex<typename T::GlobalIndex, typename T::LocalIndex::Attribute> >>

typedef Dune::SLList<RemoteIndex,Allocator> Dune::RemoteIndices< T, A >::RemoteIndexList

The type of the remote index list.

## RemoteIndexMap

template<class T, class A = std::allocator<RemoteIndex<typename T::GlobalIndex, typename T::LocalIndex::Attribute> >>

typedef std::map<int, std::pair<RemoteIndexList*,RemoteIndexList*> > Dune::RemoteIndices< T, A >::RemoteIndexMap

The type of the map from rank to remote index list.

## Member Function Documentation

## getNeighbours()

template<class T, class A = std::allocator<RemoteIndex<typename T::GlobalIndex, typename T::LocalIndex::Attribute> >>

const std::set< int > & Dune::RemoteIndices< T, A >::getNeighbours | ( |  | ) | const

inline

## setNeighbours()

template<class T, class A = std::allocator<RemoteIndex<typename T::GlobalIndex, typename T::LocalIndex::Attribute> >>
template<typename C>

void Dune::RemoteIndices< T, A >::setNeighbours | ( | const C & | neighbours | ) |

inline

## Friends And Related Symbol Documentation

## fillIndexSetHoles

template<class T, class A = std::allocator<RemoteIndex<typename T::GlobalIndex, typename T::LocalIndex::Attribute> >>
template<class G, class T1, class T2>

void fillIndexSetHoles | ( | const G & | graph,
|  | Dune::OwnerOverlapCopyCommunication< T1, T2 > & | oocomm )

friend

## IndicesSyncer< T >

template<class T, class A = std::allocator<RemoteIndex<typename T::GlobalIndex, typename T::LocalIndex::Attribute> >>

friend class IndicesSyncer< T >

friend

## InterfaceBuilder

template<class T, class A = std::allocator<RemoteIndex<typename T::GlobalIndex, typename T::LocalIndex::Attribute> >>

friend class InterfaceBuilder

friend

## operator<<

template<class T, class A = std::allocator<RemoteIndex<typename T::GlobalIndex, typename T::LocalIndex::Attribute> >>

std::ostream & operator<< | ( | std::ostream & | ,
|  | const RemoteIndices< T > & | )

friend

## repairLocalIndexPointers

template<class T, class A = std::allocator<RemoteIndex<typename T::GlobalIndex, typename T::LocalIndex::Attribute> >>
template<typename T1, typename A2, typename A1>

void repairLocalIndexPointers | ( | std::map< int, SLList< std::pair< typename T1::GlobalIndex, typename T1::LocalIndex::Attribute >, A2 > > & | ,
|  | RemoteIndices< T1, A1 > & | ,
|  | const T1 & | )

friend

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

- remoteindices.hh