Nektar++
|
#include <AssemblyCommDG.h>
Public Member Functions | |
NeighborAllToAllV (const LibUtilities::CommSharedPtr &comm, const std::map< int, std::vector< int > > &rankSharedEdges, const std::map< int, std::vector< int > > &edgeToTrace) | |
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... | |
Array< OneD, int > | m_sendDisp |
List of displacements. More... | |
std::vector< int > | m_edgeTraceIndex |
List of trace map indices of the quad points to exchange. More... | |
Array< OneD, int > | m_sendCount |
List of counts. More... | |
Uses the MPI_NeighborAllToAllV collective operation 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, this further minimises unnecessary data transfer over just reducing array sizes to 0 such as in MPI_AllToAllV. One collective operation is posted on each rank which requires communication.
Definition at line 166 of file AssemblyCommDG.h.
Nektar::MultiRegions::NeighborAllToAllV::NeighborAllToAllV | ( | const LibUtilities::CommSharedPtr & | comm, |
const std::map< int, std::vector< int > > & | rankSharedEdges, | ||
const std::map< int, std::vector< int > > & | edgeToTrace | ||
) |
Default constructor.
Definition at line 132 of file AssemblyCommDG.cpp.
References m_edgeTraceIndex, m_sendCount, and m_sendDisp.
|
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 288 of file AssemblyCommDG.cpp.
References Vmath::Gathr(), m_comm, m_edgeTraceIndex, m_sendCount, m_sendDisp, and Vmath::Scatr().
|
private |
|
private |
List of trace map indices of the quad points to exchange.
Definition at line 185 of file AssemblyCommDG.h.
Referenced by NeighborAllToAllV(), and PerformExchange().
List of counts.
Definition at line 187 of file AssemblyCommDG.h.
Referenced by NeighborAllToAllV(), and PerformExchange().
List of displacements.
Definition at line 183 of file AssemblyCommDG.h.
Referenced by NeighborAllToAllV(), and PerformExchange().