DUNE-FEM (unstable)
A communicator that uses buffers to gather and scatter the data to be send or received. More...
#include <dune/common/parallel/communicator.hh>
Public Member Functions | |
BufferedCommunicator () | |
Constructor. | |
template<class Data , class Interface > | |
std::enable_if< std::is_same< SizeOne, typenameCommPolicy< Data >::IndexedTypeFlag >::value, void >::type | build (const Interface &interface) |
Build the buffers and information for the communication process. More... | |
template<class Data , class Interface > | |
void | build (const Data &source, const Data &target, const Interface &interface) |
Build the buffers and information for the communication process. More... | |
template<class GatherScatter , class Data > | |
void | forward (const Data &source, Data &dest) |
Send from source to target. More... | |
template<class GatherScatter , class Data > | |
void | backward (Data &source, const Data &dest) |
Communicate in the reverse direction, i.e. send from target to source. More... | |
template<class GatherScatter , class Data > | |
void | forward (Data &data) |
Forward send where target and source are the same. More... | |
template<class GatherScatter , class Data > | |
void | backward (Data &data) |
Backward send where target and source are the same. More... | |
void | free () |
Free the allocated memory (i.e. buffers and message information. | |
~BufferedCommunicator () | |
Destructor. | |
Detailed Description
A communicator that uses buffers to gather and scatter the data to be send or received.
Before the data is sent it is copied to a consecutive buffer and then that buffer is sent. The data is received in another buffer and then copied to the actual position.
Member Function Documentation
◆ backward() [1/2]
void Dune::BufferedCommunicator::backward | ( | Data & | data | ) |
Backward send where target and source are the same.
The template parameter GatherScatter has to have a static method
in the case where CommPolicy<Data>::IndexedTypeFlag is SizeOne and
in the case where CommPolicy<Data>::IndexedTypeFlag is VariableSize. Here subindex is the subindex of the block at index.
- Parameters
-
data Source and target of the communication.
◆ backward() [2/2]
void Dune::BufferedCommunicator::backward | ( | Data & | source, |
const Data & | dest | ||
) |
Communicate in the reverse direction, i.e. send from target to source.
The template parameter GatherScatter (e.g. CopyGatherScatter) has to have a static method
in the case where CommPolicy<Data>::IndexedTypeFlag is SizeOne and
in the case where CommPolicy<Data>::IndexedTypeFlag is VariableSize. Here subindex is the subindex of the block at index.
- Warning
- The source and target data have to have the same layout as the ones given to the build function in case of variable size values at the indices.
- Parameters
-
dest The values will be copied from here to the send buffers. source The received values will be copied to here.
◆ build() [1/2]
void Dune::BufferedCommunicator::build | ( | const Data & | source, |
const Data & | target, | ||
const Interface & | interface | ||
) |
Build the buffers and information for the communication process.
- Parameters
-
source The source in a forward send. The values will be copied from here to the send buffers. target The target in a forward send. The received values will be copied to here. interface The interface that defines what indices are to be communicated.
◆ build() [2/2]
std::enable_if< std::is_same< SizeOne, typenameCommPolicy< Data >::IndexedTypeFlag >::value, void >::type Dune::BufferedCommunicator::build | ( | const Interface & | interface | ) |
Build the buffers and information for the communication process.
- Parameters
-
interface The interface that defines what indices are to be communicated.
◆ forward() [1/2]
void Dune::BufferedCommunicator::forward | ( | const Data & | source, |
Data & | dest | ||
) |
Send from source to target.
The template parameter GatherScatter (e.g. CopyGatherScatter) has to have a static method
in the case where CommPolicy<Data>::IndexedTypeFlag is SizeOne and
in the case where CommPolicy<Data>::IndexedTypeFlag is VariableSize. Here subindex is the subindex of the block at index.
- Warning
- The source and target data have to have the same layout as the ones given to the build function in case of variable size values at the indices.
- Parameters
-
source The values will be copied from here to the send buffers. dest The received values will be copied to here.
◆ forward() [2/2]
void Dune::BufferedCommunicator::forward | ( | Data & | data | ) |
Forward send where target and source are the same.
The template parameter GatherScatter has to have a static method
in the case where CommPolicy<Data>::IndexedTypeFlag is SizeOne and
in the case where CommPolicy<Data>::IndexedTypeFlag is VariableSize. Here subindex is the subindex of the block at index.
- Parameters
-
data Source and target of the communication.
The documentation for this class was generated from the following file:
- dune/common/parallel/communicator.hh