Nektar++
|
#include <AssemblyCommDG.h>
Public Member Functions | |
AllToAllV (const LibUtilities::CommSharedPtr &comm, const std::map< int, std::vector< int > > &rankSharedEdges, const std::map< int, std::vector< int > > &edgeToTrace, const int &nRanks) | |
Default constructor. More... | |
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... | |
std::vector< int > | m_allVEdgeIndex |
List of trace map indices of the quad points to exchange. More... | |
Array< OneD, int > | m_allVSendCount |
List of counts for MPI_alltoallv. More... | |
Array< OneD, int > | m_allVSendDisp |
List of displacements for MPI_alltoallv. More... | |
Uses the MPI_AllToAllV collective operation to perform the exchange of quadrature values. This allows for varying exchange array sizes to minimise communication data size. All ranks communicate to all other ranks, however the array size can be 0 to avoid unnecessary data transfer. One collective peration is posted on each rank which requires communication.
Definition at line 133 of file AssemblyCommDG.h.
Nektar::MultiRegions::AllToAllV::AllToAllV | ( | const LibUtilities::CommSharedPtr & | comm, |
const std::map< int, std::vector< int > > & | rankSharedEdges, | ||
const std::map< int, std::vector< int > > & | edgeToTrace, | ||
const int & | nRanks | ||
) |
Default constructor.
Definition at line 99 of file AssemblyCommDG.cpp.
References m_allVEdgeIndex, m_allVSendCount, and m_allVSendDisp.
|
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 272 of file AssemblyCommDG.cpp.
References Vmath::Gathr(), m_allVEdgeIndex, m_allVSendCount, m_allVSendDisp, m_comm, and Vmath::Scatr().
|
private |
List of trace map indices of the quad points to exchange.
Definition at line 150 of file AssemblyCommDG.h.
Referenced by AllToAllV(), and PerformExchange().
List of counts for MPI_alltoallv.
Definition at line 152 of file AssemblyCommDG.h.
Referenced by AllToAllV(), and PerformExchange().
List of displacements for MPI_alltoallv.
Definition at line 154 of file AssemblyCommDG.h.
Referenced by AllToAllV(), and PerformExchange().
|
private |