Nektar++
|
#include <InterfaceMapDG.h>
Public Member Functions | |
virtual | ~InterfaceExchange ()=default |
Default destructor. More... | |
InterfaceExchange (SpatialDomains::MovementSharedPtr movement, const ExpListSharedPtr &trace, const LibUtilities::CommSharedPtr &comm, std::pair< int, std::vector< InterfaceTraceSharedPtr > > rankPair) | |
Constructor. More... | |
void | RankFillSizes (LibUtilities::CommRequestSharedPtr &requestSend, LibUtilities::CommRequestSharedPtr &requestRecv, int requestNum) |
void | SendMissing (LibUtilities::CommRequestSharedPtr &requestSend, LibUtilities::CommRequestSharedPtr &requestRecv, int requestNum) |
void | CalcRankDistances () |
Populates m_foundRankCoords using the FindDistance function. More... | |
void | SendFwdTrace (LibUtilities::CommRequestSharedPtr &requestSend, LibUtilities::CommRequestSharedPtr &requestRecv, int requestNum, Array< OneD, NekDouble > &Fwd) |
void | FillRankBwdTraceExchange (Array< OneD, NekDouble > &Bwd) |
Private Attributes | |
SpatialDomains::MovementSharedPtr | m_movement |
Movement object associated with the non-conformal interfaces. More... | |
std::map< int, SpatialDomains::ZoneBaseShPtr > | m_zones |
Map of zone IDs to zone bases. More... | |
const ExpListSharedPtr | m_trace |
Trace expansion list. More... | |
const LibUtilities::CommSharedPtr | m_comm |
Communicator. More... | |
int | m_rank |
Process rank. More... | |
const std::vector< InterfaceTraceSharedPtr > | m_interfaceTraces |
Vector of interface traces i.e. every interface side present on m_rank. More... | |
Array< OneD, NekDouble > | m_send |
Send buffer for coord exchange. More... | |
Array< OneD, NekDouble > | m_recv |
Receive buffer for coord exchange. More... | |
Array< OneD, NekDouble > | m_recvTrace |
Receive buffer for trace exchange. More... | |
Array< OneD, NekDouble > | m_sendTrace |
Send buffer for trace exchange. More... | |
std::map< int, int > | m_totSendSize |
Map of rank to total size of send buffer for all interfaces. More... | |
std::map< int, int > | m_totRecvSize |
Map of rank to total size of receive buffer for all interfaces. More... | |
std::map< int, Array< OneD, int > > | m_sendSize |
Map of rank to array of size of send buffer for each interface. More... | |
std::map< int, Array< OneD, int > > | m_recvSize |
Map of rank to array of size of receive buffer for each interface. More... | |
std::map< int, std::map< int, std::pair< std::pair< int, int >, Array< OneD, NekDouble > > > > | m_foundRankCoords |
Object for one rank-to-rank communication for all interfaces shared between those ranks. e.g. if on rank 1 and there are interfaces shared with rank 2 and 3, there will be two InterfaceExchange objects in m_exchange in InterfaceMapDG. This holds the InterfaceTrace objects in m_interfaceTraces.
Definition at line 112 of file InterfaceMapDG.h.
|
virtualdefault |
Default destructor.
|
inline |
Constructor.
Definition at line 119 of file InterfaceMapDG.h.
void Nektar::MultiRegions::InterfaceExchange::CalcRankDistances | ( | ) |
Populates m_foundRankCoords using the FindDistance function.
Check coords in m_recv from other rank to see if present on this rank, and then populates m_foundRankCoords if found.
Definition at line 621 of file InterfaceMapDG.cpp.
References Nektar::NekConstants::kFindDistanceMin, m_foundRankCoords, m_interfaceTraces, m_rank, m_recv, m_recvSize, and m_zones.
void Nektar::MultiRegions::InterfaceExchange::FillRankBwdTraceExchange | ( | Array< OneD, NekDouble > & | Bwd | ) |
Loops over interfaces and partitions out the received trace from the other ranks for insertion into Bwd using FillRankBwdTrace
Bwd | The Bwd trace to be filled from across the interface |
Definition at line 551 of file InterfaceMapDG.cpp.
References m_interfaceTraces, m_rank, m_recvTrace, and m_sendSize.
void Nektar::MultiRegions::InterfaceExchange::RankFillSizes | ( | LibUtilities::CommRequestSharedPtr & | requestSend, |
LibUtilities::CommRequestSharedPtr & | requestRecv, | ||
int | requestNum | ||
) |
Communicates with other ranks how many missing coordinates for each interface to expect
requestSend | List of send requests |
requestRecv | List of receive requests |
requestNum | Index of request in list to use |
Definition at line 404 of file InterfaceMapDG.cpp.
References m_comm, m_interfaceTraces, m_rank, m_recvSize, m_sendSize, and m_zones.
void Nektar::MultiRegions::InterfaceExchange::SendFwdTrace | ( | LibUtilities::CommRequestSharedPtr & | requestSend, |
LibUtilities::CommRequestSharedPtr & | requestRecv, | ||
int | requestNum, | ||
Array< OneD, NekDouble > & | Fwd | ||
) |
Calculates and sends the trace to other rank from the m_foundRankCoords structure using non-blocking pairwise communication i.e. Isend & Irecv
requestSend | List of send requests |
requestRecv | List of receive requests |
requestNum | Index of request in list to use |
Fwd | The values to send across the interface |
Definition at line 578 of file InterfaceMapDG.cpp.
References m_comm, m_foundRankCoords, m_rank, m_recvTrace, m_sendTrace, m_totRecvSize, m_totSendSize, and m_trace.
void Nektar::MultiRegions::InterfaceExchange::SendMissing | ( | LibUtilities::CommRequestSharedPtr & | requestSend, |
LibUtilities::CommRequestSharedPtr & | requestRecv, | ||
int | requestNum | ||
) |
Sends/receives the missing coordinates to/from other ranks
requestSend | List of send requests |
requestRecv | List of receive requests |
requestNum | Index of request in list to use |
Definition at line 443 of file InterfaceMapDG.cpp.
References m_comm, m_interfaceTraces, m_rank, m_recv, m_recvSize, m_send, m_sendSize, m_totRecvSize, m_totSendSize, and m_zones.
|
private |
Communicator.
Definition at line 186 of file InterfaceMapDG.h.
Referenced by RankFillSizes(), SendFwdTrace(), and SendMissing().
|
private |
Caches the found coordinates to reuse when exchanging the trace in a map of integer rank to a map of integer missing coordinate location to a pair of local edge ID and found local coordinate
Definition at line 216 of file InterfaceMapDG.h.
Referenced by CalcRankDistances(), and SendFwdTrace().
|
private |
Vector of interface traces i.e. every interface side present on m_rank.
Definition at line 190 of file InterfaceMapDG.h.
Referenced by CalcRankDistances(), FillRankBwdTraceExchange(), RankFillSizes(), and SendMissing().
|
private |
Movement object associated with the non-conformal interfaces.
Definition at line 180 of file InterfaceMapDG.h.
|
private |
Process rank.
Definition at line 188 of file InterfaceMapDG.h.
Referenced by CalcRankDistances(), FillRankBwdTraceExchange(), RankFillSizes(), SendFwdTrace(), and SendMissing().
Receive buffer for coord exchange.
Definition at line 194 of file InterfaceMapDG.h.
Referenced by CalcRankDistances(), and SendMissing().
Map of rank to array of size of receive buffer for each interface.
Definition at line 206 of file InterfaceMapDG.h.
Referenced by CalcRankDistances(), RankFillSizes(), and SendMissing().
Receive buffer for trace exchange.
Definition at line 196 of file InterfaceMapDG.h.
Referenced by FillRankBwdTraceExchange(), and SendFwdTrace().
Send buffer for coord exchange.
Definition at line 192 of file InterfaceMapDG.h.
Referenced by SendMissing().
Map of rank to array of size of send buffer for each interface.
Definition at line 204 of file InterfaceMapDG.h.
Referenced by FillRankBwdTraceExchange(), RankFillSizes(), and SendMissing().
Send buffer for trace exchange.
Definition at line 198 of file InterfaceMapDG.h.
Referenced by SendFwdTrace().
|
private |
Map of rank to total size of receive buffer for all interfaces.
Definition at line 202 of file InterfaceMapDG.h.
Referenced by SendFwdTrace(), and SendMissing().
|
private |
Map of rank to total size of send buffer for all interfaces.
Definition at line 200 of file InterfaceMapDG.h.
Referenced by SendFwdTrace(), and SendMissing().
|
private |
Trace expansion list.
Definition at line 184 of file InterfaceMapDG.h.
Referenced by SendFwdTrace().
|
private |
Map of zone IDs to zone bases.
Definition at line 182 of file InterfaceMapDG.h.
Referenced by CalcRankDistances(), RankFillSizes(), and SendMissing().