Nektar++
|
#include <AssemblyCommDG.h>
Public Member Functions | |
AllToAll (const LibUtilities::CommSharedPtr &comm, const int &maxQuad, const int &nRanks, 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... | |
int | m_maxQuad = 0 |
Max number of quadrature points in an element. More... | |
int | m_nRanks = 0 |
Number of ranks/processes/partitions. More... | |
std::vector< int > | m_allEdgeIndex |
List of trace map indices of the quad points to exchange. More... | |
int | m_maxCount = 0 |
Largest shared partition edge. More... | |
Uses the MPI_AllToAll collective operation to perform the exchange of quadrature values. This does not allow for varying exchange array sizes so padding is used to ensure all partitions send/receive the same length array. All ranks communicate full array sizes to all other ranks. One collective operation is posted on each rank which requires communication.
Definition at line 99 of file AssemblyCommDG.h.
Nektar::MultiRegions::AllToAll::AllToAll | ( | const LibUtilities::CommSharedPtr & | comm, |
const int & | maxQuad, | ||
const int & | nRanks, | ||
const std::map< int, std::vector< int > > & | rankSharedEdges, | ||
const std::map< int, std::vector< int > > & | edgeToTrace | ||
) |
Default constructor.
Definition at line 44 of file AssemblyCommDG.cpp.
References m_allEdgeIndex, m_maxCount, and Nektar::LibUtilities::ReduceMax.
|
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 242 of file AssemblyCommDG.cpp.
References m_allEdgeIndex, m_comm, m_maxCount, m_maxQuad, and m_nRanks.
|
private |
List of trace map indices of the quad points to exchange.
Definition at line 121 of file AssemblyCommDG.h.
Referenced by AllToAll(), and PerformExchange().
|
private |
|
private |
Largest shared partition edge.
Definition at line 123 of file AssemblyCommDG.h.
Referenced by AllToAll(), and PerformExchange().
|
private |
Max number of quadrature points in an element.
Definition at line 117 of file AssemblyCommDG.h.
Referenced by PerformExchange().
|
private |
Number of ranks/processes/partitions.
Definition at line 119 of file AssemblyCommDG.h.
Referenced by PerformExchange().