Dune Core Modules (2.5.0)

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

#include <dune/istl/owneroverlapcopy.hh>

Classes

struct  CopyGatherScatter
 gather/scatter callback for communcation More...
 

Public Types

typedef Dune::ParallelIndexSet< GlobalIdType, LI, 512 > ParallelIndexSet
 The type of the parallel index set.
 
typedef Dune::RemoteIndices< PISRemoteIndices
 The type of the remote indices.
 
typedef Dune::GlobalLookupIndexSet< ParallelIndexSetGlobalLookupIndexSet
 The type of the reverse lookup of indices.
 

Public Member Functions

void setSolverCategory (SolverCategory set)
 Set right Solver Category (default is overlapping).
 
SolverCategory::Category getSolverCategory () const
 Get Solver Category. More...
 
template<class T >
void copyOwnerToAll (const T &source, T &dest) const
 Communicate values from owner data points to all other data points. More...
 
template<class T >
void copyCopyToAll (const T &source, T &dest) const
 Communicate values from copy data points to all other data points. More...
 
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. More...
 
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. More...
 
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. More...
 
template<class T1 , class T2 >
void dot (const T1 &x, const T1 &y, T2 &result) const
 Compute a global dot product of two vectors. More...
 
template<class T1 >
FieldTraits< typenameT1::field_type >::real_type norm (const T1 &x) const
 Compute the global euclidian norm of a vector. More...
 
const ParallelIndexSetindexSet () const
 Get the underlying parallel index set. More...
 
const RemoteIndicesremoteIndices () const
 Get the underlying remote indices. More...
 
ParallelIndexSetindexSet ()
 Get the underlying parallel index set. More...
 
RemoteIndicesremoteIndices ()
 Get the underlying remote indices. More...
 
template<class T1 >
void project (T1 &x) const
 Set vector to zero at copy dofs. More...
 
 OwnerOverlapCopyCommunication (MPI_Comm comm_, SolverCategory::Category cat_=SolverCategory::overlapping, bool freecomm_=false)
 Construct the communication without any indices. More...
 
 OwnerOverlapCopyCommunication (SolverCategory::Category cat_=SolverCategory::overlapping)
 Construct the communication without any indices using MPI_COMM_WORLD. More...
 
 OwnerOverlapCopyCommunication (const IndexInfoFromGrid< GlobalIdType, LocalIdType > &indexinfo, MPI_Comm comm_, SolverCategory::Category cat_=SolverCategory::overlapping, bool freecomm_=false)
 Constructor. More...
 

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

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
indexinfoThe 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

References Dune::ParallelIndexSet< TG, TL, N >::add(), Dune::ParallelIndexSet< TG, TL, N >::begin(), Dune::ParallelIndexSet< TG, TL, N >::beginResize(), DUNE_THROW, Dune::ParallelIndexSet< TG, TL, N >::end(), Dune::ParallelIndexSet< TG, TL, N >::endResize(), Dune::RemoteIndexListModifier< T, A, mode >::insert(), Dune::IndexInfoFromGrid< G, L >::localIndices(), Dune::IndexInfoFromGrid< G, L >::remoteIndices(), and Dune::RemoteIndices< T, A >::setIndexSets().

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.

References Dune::BufferedCommunicator::free().

◆ 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.

References Dune::BufferedCommunicator::free().

◆ 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.

References Dune::BufferedCommunicator::free().

◆ 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.

References Dune::BufferedCommunicator::free().

Referenced by Dune::graphRepartition().

◆ 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.

References Dune::BufferedCommunicator::free().

Referenced by Dune::graphRepartition().

◆ 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
xThe first vector of the product.
yThe second vector of the product.
resultReference to store the result in.

References Dune::ParallelIndexSet< TG, TL, N >::begin(), Dune::ParallelIndexSet< TG, TL, N >::end(), and Dune::CollectiveCommunication< MPI_Comm >::sum().

◆ getSolverCategory()

template<class GlobalIdType , class LocalIdType = int>
SolverCategory::Category Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::getSolverCategory ( ) const
inline

Get Solver Category.

Returns
The Solver Category.

Referenced by Dune::graphRepartition().

◆ 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.

Referenced by Dune::graphRepartition(), and Dune::storeMatrixMarket().

◆ 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 euclidian norm of a vector.

Parameters
xThe vector to compute the norm of.
Returns
The global euclidian norm of that vector.

References Dune::ParallelIndexSet< TG, TL, N >::begin(), Dune::ParallelIndexSet< TG, TL, N >::end(), and Dune::CollectiveCommunication< MPI_Comm >::sum().

◆ 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
xThe vector to project.

References Dune::ParallelIndexSet< TG, TL, N >::begin(), and Dune::ParallelIndexSet< TG, TL, N >::end().

◆ 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.

Referenced by Dune::storeMatrixMarket().


The documentation for this class was generated from the following files:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 23, 23:29, 2024)