#include <owneroverlapcopy.hh>
set up communication from known distribution with owner/overlap/copy semantics
Public Types | |
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 | |
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 | 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 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> | |
double | norm (const T1 &x) const |
Compute the global euclidian 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. | |
template<class T1> | |
void | project (T1 &x) const |
Set vector to zero at copy dofs. | |
OwnerOverlapCopyCommunication (MPI_Comm comm_) | |
Construct the communication without any indices. | |
OwnerOverlapCopyCommunication (const IndexInfoFromGrid< GlobalIdType, LocalIdType > &indexinfo, MPI_Comm comm_) | |
Constructor. | |
Classes | |
struct | CopyGatherScatter |
gather/scatter callback for communcation More... |
Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::OwnerOverlapCopyCommunication | ( | MPI_Comm | comm_ | ) | [inline] |
Construct the communication without any indices.
The local index set and the remote indices have to be set up later on.
comm_ | The MPI Communicator to use, e. g. MPI_COMM_WORLD |
Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::OwnerOverlapCopyCommunication | ( | const IndexInfoFromGrid< GlobalIdType, LocalIdType > & | indexinfo, | |
MPI_Comm | comm_ | |||
) | [inline] |
Constructor.
indexinfo | The set of IndexTripels describing the local and remote indices. | |
comm_ | The communicator to use in the communication. |
References Dune::ParallelIndexSet< TG, TL, N >::add(), Dune::ParallelIndexSet< TG, TL, N >::begin(), Dune::ParallelIndexSet< TG, TL, N >::beginResize(), Dune::ParallelIndexSet< TG, TL, N >::end(), Dune::ParallelIndexSet< TG, TL, N >::endResize(), Dune::RemoteIndexListModifier< T, mode >::insert(), Dune::IndexInfoFromGrid< G, L >::localIndices(), Dune::IndexInfoFromGrid< G, L >::remoteIndices(), and Dune::RemoteIndices< T >::setIndexSets().
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< T >::free().
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< T >::free().
void Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::dot | ( | const T1 & | x, | |
const T1 & | y, | |||
T2 & | result | |||
) | const [inline] |
Compute a global dot product of two vectors.
x | The first vector of the product. | |
y | The second vector of the product. | |
result | Reference to store the result in. |
References Dune::ParallelIndexSet< TG, TL, N >::begin(), and Dune::ParallelIndexSet< TG, TL, N >::end().
double Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::norm | ( | const T1 & | x | ) | const [inline] |
Compute the global euclidian norm of a vector.
x | The vector to compute the norm of. |
References Dune::ParallelIndexSet< TG, TL, N >::begin(), and Dune::ParallelIndexSet< TG, TL, N >::end().
const ParallelIndexSet& Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::indexSet | ( | ) | const [inline] |
Get the underlying parallel index set.
const RemoteIndices& Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::remoteIndices | ( | ) | const [inline] |
Get the underlying remote indices.
ParallelIndexSet& Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::indexSet | ( | ) | [inline] |
Get the underlying parallel index set.
RemoteIndices& Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::remoteIndices | ( | ) | [inline] |
Get the underlying remote indices.
void Dune::OwnerOverlapCopyCommunication< GlobalIdType, LocalIdType >::project | ( | T1 & | x | ) | const [inline] |
Set vector to zero at copy dofs.
x | The vector to project. |
References Dune::ParallelIndexSet< TG, TL, N >::begin(), and Dune::ParallelIndexSet< TG, TL, N >::end().