Loading...
Searching...
No Matches
Dune::CommPolicy< V > Struct Template Reference
Common » Parallel Communication » Parallel Computing based on Indexsets

Default policy used for communicating an indexed type. More...

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

Inheritance diagram for Dune::CommPolicy< V >:

## Classes

class | FieldVector
class | VariableBlockVector
struct | CommPolicy< VariableBlockVector< FieldVector< K, n >, A > >
class | CommunicationError
| Error thrown if there was a problem with the communication. More...
struct | CopyGatherScatter
| GatherScatter default implementation that just copies data. More...

## Public Types

typedef V | Type
| The type the policy is for.
typedef V::value_type | IndexedType
| The type we get at each index with operator[].
typedef SizeOne | IndexedTypeFlag
| Whether the indexed type has variable size or there is always one value at each index.

## Static Public Member Functions

static const void * | getAddress (const V &v, int index)
| Get the address of entry at an index.
static int | getSize (const V &, int index)
| Get the number of primitive elements at that index.

## Detailed Description

template<class V>
struct Dune::CommPolicy< V >

Default policy used for communicating an indexed type.

This

## Member Typedef Documentation

## IndexedType

template<class V>

typedef V::value_type Dune::CommPolicy< V >::IndexedType

The type we get at each index with operator[].

The default is the value_type typedef of the container.

## IndexedTypeFlag

template<class V>

typedef SizeOne Dune::CommPolicy< V >::IndexedTypeFlag

Whether the indexed type has variable size or there is always one value at each index.

## Type

template<class V>

typedef V Dune::CommPolicy< V >::Type

The type the policy is for.

It has to provide the mode

Type::IndexedType operator[](int i);
Dune::operator[]
constexpr reference operator[](difference_type n) const
Dereference element with given offset form this iterator.
Definition iteratorfacades.hh:1207

for the access of the value at index i and a typedef IndexedType. It is assumed that only one entry is at each index (as in scalar vector.

## Member Function Documentation

## getAddress()

template<class V>

const void * Dune::CommPolicy< V >::getAddress | ( | const V & | v,
|  | int | index )

static

Get the address of entry at an index.

The default implementation uses operator[] to get the address.

Parameters

  v | An existing representation of the type that has more elements than index.
  index | The index of the entry.

## getSize()

template<class V>

int Dune::CommPolicy< V >::getSize | ( | const V & | ,
|  | int | index )

static

Get the number of primitive elements at that index.

The default always returns 1.

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

- communicator.hh