Loading...
Searching...
No Matches
Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType > Class Template Reference
Iterative Solvers Template Library (ISTL) » Communication Interface

A class setting up standard communication for a two-valued attribute set with owner/overlap/copy semantics. More...

`#include <dune/istl/owneroverlapcopy.hh>`

Inheritance diagram for Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >:

## Classes

struct | CopyGatherScatter
| gather/scatter callback for communication More...
struct | AddGatherScatter

## Public Types

typedef Dune::ParallelIndexSet< GlobalIdType, LI, 512 > | PIS
typedef Dune::RemoteIndices< PIS > | RI
typedef Dune::RemoteIndexListModifier< PIS, typename RI::Allocator, false > | RILM
typedef RI::RemoteIndex | RX
typedef Dune::BufferedCommunicator | BC
typedef Dune::Interface | IF
typedef EnumItem< AttributeSet, OwnerOverlapCopyAttributeSet::owner > | OwnerSet
typedef EnumItem< AttributeSet, OwnerOverlapCopyAttributeSet::copy > | CopySet
typedef Combine< EnumItem< AttributeSet, OwnerOverlapCopyAttributeSet::owner >, EnumItem< AttributeSet, OwnerOverlapCopyAttributeSet::overlap >, AttributeSet > | OwnerOverlapSet
typedef Dune::AllSet< AttributeSet > | AllSet
typedef Dune::EnumItem< AttributeSet, OwnerOverlapCopyAttributeSet::copy > | CopyFlags
typedef Dune::ParallelIndexSet< GlobalIdType, LI, 512 > | ParallelIndexSet
| The type of the parallel index set.
typedef Dune::RemoteIndices< PIS > | RemoteIndices
| The type of the remote indices.
typedef Dune::GlobalLookupIndexSet< ParallelIndexSet > | GlobalLookupIndexSet
| The type of the reverse lookup of indices.

## Public Member Functions

SolverCategory::Category | category () const
| Get Solver Category.
const Communication< MPI_Comm > & | communicator () const
template<class T>
void | copyOwnerToAll (const T &source, T &dest) const
| Communicate values from owner data points to all other data points.
template<class T>
void | copyCopyToAll (const T &source, T &dest) const
| Communicate values from copy data points to all other data points.
template<class T>
void | addOwnerOverlapToAll (const T &source, T &dest) const
| Communicate values from owner data points to all other data points and add them to those values.
template<class T>
void | addOwnerCopyToAll (const T &source, T &dest) const
| Communicate values from owner and copy data points to all other data points and add them to those values.
template<class T>
void | addOwnerCopyToOwnerCopy (const T &source, T &dest) const
| Communicate values from owner and copy data points to owner and copy data points and add them to those values.
template<class T1, class T2>
void | dot (const T1 &x, const T1 &y, T2 &result) const
| Compute a global dot product of two vectors.
template<class T1>
FieldTraits< typenameT1::field_type >::real_type | norm (const T1 &x) const
| Compute the global Euclidean norm of a vector.
const ParallelIndexSet & | indexSet () const
| Get the underlying parallel index set.
const RemoteIndices & | remoteIndices () const
| Get the underlying remote indices.
ParallelIndexSet & | indexSet ()
| Get the underlying parallel index set.
RemoteIndices & | remoteIndices ()
| Get the underlying remote indices.
void | buildGlobalLookup ()
void | buildGlobalLookup (std::size_t size)
void | freeGlobalLookup ()
const GlobalLookupIndexSet & | globalLookup () const
template<class T1>
void | project (T1 &x) const
| Set vector to zero at copy dofs.
| OwnerOverlapCopyCommunication (MPI_Comm comm_, SolverCategory::Category cat_=SolverCategory::overlapping, bool freecomm_=false)
| Construct the communication without any indices.
| OwnerOverlapCopyCommunication (SolverCategory::Category cat_=SolverCategory::overlapping)
| Construct the communication without any indices using MPI_COMM_WORLD.
| OwnerOverlapCopyCommunication (const IndexInfoFromGrid< GlobalIdType, LocalIdType > &indexinfo, MPI_Comm comm_, SolverCategory::Category cat_=SolverCategory::overlapping, bool freecomm_=false)
| Constructor.
| ~OwnerOverlapCopyCommunication ()

## Protected Member Functions

void | buildOwnerOverlapToAllInterface () const
void | buildOwnerToAllInterface () const
void | buildOwnerCopyToAllInterface () const
void | buildOwnerCopyToOwnerCopyInterface () const
void | buildCopyToAllInterface () const

## Friends

template<typename M, typename G, typename L>
void | loadMatrixMarket (M &matrix, const std::string &filename, OwnerOverlapCopyCommunication< G, L > &comm, bool readIndices=true)
| Load a parallel matrix/vector stored in matrix market format.

## Detailed Description

template<class GlobalIdType, class LocalIdType = int>
class Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >

A class setting up standard communication for a two-valued attribute set with owner/overlap/copy semantics.

set up communication from known distribution with owner/overlap/copy semantics

## Member Typedef Documentation

## AllSet

template<class GlobalIdType, class LocalIdType = int>

typedef Dune::AllSet<AttributeSet> Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::AllSet

## BC

template<class GlobalIdType, class LocalIdType = int>

typedef Dune::BufferedCommunicator Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::BC

## CopyFlags

template<class GlobalIdType, class LocalIdType = int>

typedef Dune::EnumItem<AttributeSet,OwnerOverlapCopyAttributeSet::copy> Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::CopyFlags

## CopySet

template<class GlobalIdType, class LocalIdType = int>

typedef EnumItem<AttributeSet,OwnerOverlapCopyAttributeSet::copy> Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::CopySet

## GlobalLookupIndexSet

template<class GlobalIdType, class LocalIdType = int>

typedef Dune::GlobalLookupIndexSet<ParallelIndexSet> Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::GlobalLookupIndexSet

The type of the reverse lookup of indices.

## IF

template<class GlobalIdType, class LocalIdType = int>

typedef Dune::Interface Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::IF

## OwnerOverlapSet

template<class GlobalIdType, class LocalIdType = int>

typedef Combine<EnumItem<AttributeSet,OwnerOverlapCopyAttributeSet::owner>,EnumItem<AttributeSet,OwnerOverlapCopyAttributeSet::overlap>,AttributeSet> Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::OwnerOverlapSet

## OwnerSet

template<class GlobalIdType, class LocalIdType = int>

typedef EnumItem<AttributeSet,OwnerOverlapCopyAttributeSet::owner> Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::OwnerSet

## ParallelIndexSet

template<class GlobalIdType, class LocalIdType = int>

typedef Dune::ParallelIndexSet<GlobalIdType,LI,512> Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::ParallelIndexSet

The type of the parallel index set.

## PIS

template<class GlobalIdType, class LocalIdType = int>

typedef Dune::ParallelIndexSet<GlobalIdType,LI,512> Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::PIS

## RemoteIndices

template<class GlobalIdType, class LocalIdType = int>

typedef Dune::RemoteIndices<PIS> Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::RemoteIndices

The type of the remote indices.

## RI

template<class GlobalIdType, class LocalIdType = int>

typedef Dune::RemoteIndices<PIS> Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::RI

## RILM

template<class GlobalIdType, class LocalIdType = int>

typedef Dune::RemoteIndexListModifier<PIS,typename RI::Allocator,false> Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::RILM

## RX

template<class GlobalIdType, class LocalIdType = int>

typedef RI::RemoteIndex Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::RX

## Constructor & Destructor Documentation

## OwnerOverlapCopyCommunication() [1/3]

template<class GlobalIdType, class LocalIdType = int>

Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::OwnerOverlapCopyCommunication | ( | MPI_Comm | comm_,
|  | SolverCategory::Category | cat_ = SolverCategory::overlapping,
|  | bool | freecomm_ = false )

inline

Construct the communication without any indices.

The local index set and the remote indices have to be set up later on.

Parameters

  comm_ | The MPI Communicator to use, e. g. MPI_COMM_WORLD
  cat_ | The Solver category, default is overlapping
  freecomm_ | Whether to free the communicator comm_ in the destructor, default is false

## OwnerOverlapCopyCommunication() [2/3]

template<class GlobalIdType, class LocalIdType = int>

Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::OwnerOverlapCopyCommunication | ( | SolverCategory::Category | cat_ = SolverCategory::overlapping | ) |

inline

Construct the communication without any indices using MPI_COMM_WORLD.

The local index set and the remote indices have to be set up later on.

Parameters

  cat_ | The Solver category, default is overlapping is false

## OwnerOverlapCopyCommunication() [3/3]

template<class GlobalIdType, class LocalIdType = int>

Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::OwnerOverlapCopyCommunication | ( | const IndexInfoFromGrid< GlobalIdType, LocalIdType > & | indexinfo,
|  | MPI_Comm | comm_,
|  | SolverCategory::Category | cat_ = SolverCategory::overlapping,
|  | bool | freecomm_ = false )

inline

Constructor.

Parameters

  indexinfo | The set of IndexTripels describing the local and remote indices.
  comm_ | The communicator to use in the communication.
  cat_ | The Solver category, default is overlapping
  freecomm_ | Whether to free the communicator comm_ in the destructor, default is false

## ~OwnerOverlapCopyCommunication()

template<class GlobalIdType, class LocalIdType = int>

Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::~OwnerOverlapCopyCommunication | ( |  | ) |

inline

## Member Function Documentation

## addOwnerCopyToAll()

template<class GlobalIdType, class LocalIdType = int>
template<class T>

void Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::addOwnerCopyToAll | ( | const T & | source,
|  | T & | dest ) const

inline

Communicate values from owner and copy data points to all other data points and add them to those values.

source The data to send from.

dest The data to add them communicated values to.

## addOwnerCopyToOwnerCopy()

template<class GlobalIdType, class LocalIdType = int>
template<class T>

void Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::addOwnerCopyToOwnerCopy | ( | const T & | source,
|  | T & | dest ) const

inline

Communicate values from owner and copy data points to owner and copy data points and add them to those values.

source The data to send from.

dest The data to add the communicated values to.

## addOwnerOverlapToAll()

template<class GlobalIdType, class LocalIdType = int>
template<class T>

void Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::addOwnerOverlapToAll | ( | const T & | source,
|  | T & | dest ) const

inline

Communicate values from owner data points to all other data points and add them to those values.

source The data to send from.

dest The data to add them communicated values to.

## buildCopyToAllInterface()

template<class GlobalIdType, class LocalIdType = int>

void Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::buildCopyToAllInterface | ( |  | ) | const

inline protected

## buildGlobalLookup() [1/2]

template<class GlobalIdType, class LocalIdType = int>

void Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::buildGlobalLookup | ( |  | ) |

inline

## buildGlobalLookup() [2/2]

template<class GlobalIdType, class LocalIdType = int>

void Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::buildGlobalLookup | ( | std::size_t | size | ) |

inline

## buildOwnerCopyToAllInterface()

template<class GlobalIdType, class LocalIdType = int>

void Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::buildOwnerCopyToAllInterface | ( |  | ) | const

inline protected

## buildOwnerCopyToOwnerCopyInterface()

template<class GlobalIdType, class LocalIdType = int>

void Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::buildOwnerCopyToOwnerCopyInterface | ( |  | ) | const

inline protected

## buildOwnerOverlapToAllInterface()

template<class GlobalIdType, class LocalIdType = int>

void Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::buildOwnerOverlapToAllInterface | ( |  | ) | const

inline protected

## buildOwnerToAllInterface()

template<class GlobalIdType, class LocalIdType = int>

void Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::buildOwnerToAllInterface | ( |  | ) | const

inline protected

## category()

template<class GlobalIdType, class LocalIdType = int>

SolverCategory::Category Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::category | ( |  | ) | const

inline

Get Solver Category.

Returns
  The Solver Category.

## communicator()

template<class GlobalIdType, class LocalIdType = int>

const Communication< MPI_Comm > & Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::communicator | ( |  | ) | const

inline

## copyCopyToAll()

template<class GlobalIdType, class LocalIdType = int>
template<class T>

void Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::copyCopyToAll | ( | const T & | source,
|  | T & | dest ) const

inline

Communicate values from copy data points to all other data points.

source The data to send from.

dest The data to send to.

## copyOwnerToAll()

template<class GlobalIdType, class LocalIdType = int>
template<class T>

void Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::copyOwnerToAll | ( | const T & | source,
|  | T & | dest ) const

inline

Communicate values from owner data points to all other data points.

source The data to send from.

dest The data to send to.

## dot()

template<class GlobalIdType, class LocalIdType = int>
template<class T1, class T2>

void Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::dot | ( | const T1 & | x,
|  | const T1 & | y,
|  | T2 & | result ) const

inline

Compute a global dot product of two vectors.

Parameters

  x | The first vector of the product.
  y | The second vector of the product.
  result | Reference to store the result in.

## freeGlobalLookup()

template<class GlobalIdType, class LocalIdType = int>

void Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::freeGlobalLookup | ( |  | ) |

inline

## globalLookup()

template<class GlobalIdType, class LocalIdType = int>

const GlobalLookupIndexSet & Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::globalLookup | ( |  | ) | const

inline

## indexSet() [1/2]

template<class GlobalIdType, class LocalIdType = int>

ParallelIndexSet & Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::indexSet | ( |  | ) |

inline

Get the underlying parallel index set.

Returns
  The underlying parallel index set.

## indexSet() [2/2]

template<class GlobalIdType, class LocalIdType = int>

const ParallelIndexSet & Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::indexSet | ( |  | ) | const

inline

Get the underlying parallel index set.

Returns
  The underlying parallel index set.

## norm()

template<class GlobalIdType, class LocalIdType = int>
template<class T1>

FieldTraits< typenameT1::field_type >::real_type Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::norm | ( | const T1 & | x | ) | const

inline

Compute the global Euclidean norm of a vector.

Parameters

  x | The vector to compute the norm of.

Returns
  The global Euclidean norm of that vector.

## project()

template<class GlobalIdType, class LocalIdType = int>
template<class T1>

void Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::project | ( | T1 & | x | ) | const

inline

Set vector to zero at copy dofs.

Parameters

  x | The vector to project.

## remoteIndices() [1/2]

template<class GlobalIdType, class LocalIdType = int>

RemoteIndices & Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::remoteIndices | ( |  | ) |

inline

Get the underlying remote indices.

Returns
  The underlying remote indices.

## remoteIndices() [2/2]

template<class GlobalIdType, class LocalIdType = int>

const RemoteIndices & Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::remoteIndices | ( |  | ) | const

inline

Get the underlying remote indices.

Returns
  The underlying remote indices.

## Friends And Related Symbol Documentation

## loadMatrixMarket

template<class GlobalIdType, class LocalIdType = int>
template<typename M, typename G, typename L>

void loadMatrixMarket | ( | M & | matrix,
|  | const std::string & | filename,
|  | OwnerOverlapCopyCommunication< G, L > & | comm,
|  | bool | readIndices = true )

friend

Load a parallel matrix/vector stored in matrix market format.

More about the matrix market exchange format can be found here.

Parameters

  matrix | Where to store the matrix/vector.
  filename | the name of the filename (without suffix and rank!) rank i will read the file filename_i.mm
  comm | The information about the data distribution.
  readIndices | Whether to read the parallel index information. If true rank i reads the index information form file filename_i.idx And builds the remote indices information.

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

- owneroverlapcopy.hh