Nektar++
|
#include <AssemblyCommDG.h>
Public Member Functions | |
Pairwise (const LibUtilities::CommSharedPtr &comm, const std::map< int, std::vector< int > > &rankSharedEdges, const std::map< int, std::vector< int > > &edgeToTrace) | |
void | PerformExchange (const Array< OneD, NekDouble > &testFwd, Array< OneD, NekDouble > &testBwd) final |
Public Member Functions inherited from Nektar::MultiRegions::ExchangeMethod | |
ExchangeMethod ()=default | |
Default constructor. More... | |
virtual | ~ExchangeMethod ()=default |
Default destructor. More... | |
virtual void | PerformExchange (const Array< OneD, NekDouble > &testFwd, Array< OneD, NekDouble > &testBwd)=0 |
Private Attributes | |
LibUtilities::CommSharedPtr | m_comm |
Communicator. More... | |
Array< OneD, int > | m_edgeTraceIndex |
List of trace index locations in recv/send buff. More... | |
Array< OneD, NekDouble > | m_recvBuff |
Receive buffer for exchange. More... | |
Array< OneD, NekDouble > | m_sendBuff |
Send buffer for exchange. More... | |
LibUtilities::CommRequestSharedPtr | m_recvRequest |
List of receive requests. More... | |
LibUtilities::CommRequestSharedPtr | m_sendRequest |
List of send requests. More... | |
Uses persistent MPI_Irecv and MPI_Isend operations to perform the exchange of quadrature values. This allows for varying exchange array sizes to minimise communication data size. Ranks only communicate with ranks with which they need to exchange data, i.e. are adjacent in the mesh or share a periodic boundary condition. On each rank there are 'n' receives and 'n' sends posted where 'n' is the number of other ranks with which communication is needed. We use persistent communication methods to reduce overhead.
Definition at line 199 of file AssemblyCommDG.h.
Nektar::MultiRegions::Pairwise::Pairwise | ( | const LibUtilities::CommSharedPtr & | comm, |
const std::map< int, std::vector< int > > & | rankSharedEdges, | ||
const std::map< int, std::vector< int > > & | edgeToTrace | ||
) |
Definition at line 175 of file AssemblyCommDG.cpp.
References m_comm, m_edgeTraceIndex, m_recvBuff, m_recvRequest, m_sendBuff, and m_sendRequest.
|
finalvirtual |
Perform MPI comm exchange taking the Fwd trace and sending partition edge trace values to the matching locations in the Bwd trace of corresponding adjacent partitions.
[in] | testFwd | The values to send to adjacent partitions |
[out] | testBwd | The values received from adjacent partitions |
Implements Nektar::MultiRegions::ExchangeMethod.
Definition at line 303 of file AssemblyCommDG.cpp.
References Vmath::Gathr(), m_comm, m_edgeTraceIndex, m_recvBuff, m_recvRequest, m_sendBuff, m_sendRequest, and Vmath::Scatr().
|
private |
Communicator.
Definition at line 213 of file AssemblyCommDG.h.
Referenced by Pairwise(), and PerformExchange().
List of trace index locations in recv/send buff.
Definition at line 215 of file AssemblyCommDG.h.
Referenced by Pairwise(), and PerformExchange().
Receive buffer for exchange.
Definition at line 217 of file AssemblyCommDG.h.
Referenced by Pairwise(), and PerformExchange().
|
private |
List of receive requests.
Definition at line 221 of file AssemblyCommDG.h.
Referenced by Pairwise(), and PerformExchange().
Send buffer for exchange.
Definition at line 219 of file AssemblyCommDG.h.
Referenced by Pairwise(), and PerformExchange().
|
private |
List of send requests.
Definition at line 223 of file AssemblyCommDG.h.
Referenced by Pairwise(), and PerformExchange().