FEI Package Browser (Single Doxygen Collection)
Version of the Day
|
#include <fei_NodeCommMgr.hpp>
Public Types | |
enum | { STRICTLY_LOW_PROC, PROC_WITH_LOCAL_ELEM, CALLER_SPECIFIES } |
Public Member Functions | |
NodeCommMgr (MPI_Comm comm, const SNL_FEI_Structure &problemStructure, int sharedNodeOwnership=STRICTLY_LOW_PROC) | |
virtual | ~NodeCommMgr () |
size_t | getNumSharedNodes () |
std::vector< GlobalID > & | getLocalNodeIDs () |
std::vector< GlobalID > & | getSharedNodeIDs () |
std::vector< int > & | getSharedNodeNumbers () |
int | getSharedNodeIndex_num (int nodeNumber) |
int | addSharedNodes (const GlobalID *nodeIDs, int numNodes, const int *const *procs, const int *numProcs) |
int | initComplete (NodeDatabase &nodeDB, bool safetyCheck) |
int | informLocal (const NodeDescriptor &node) |
int | exchangeEqnInfo () |
int | getSharedNodeIndex (GlobalID nodeID) |
int | getSharedNodeNumSubdomains (GlobalID nodeID) |
std::vector< int > * | getSharedNodeSubdomainList (GlobalID nodeID) |
NodeDescriptor & | getSharedNodeAtIndex (int index) |
std::vector< int > & | getSharedNodeProcs (int index) |
void | setSharedOwnershipRule (int ownershipRule) |
std::vector< int > & | getSendProcs () |
std::vector< int > & | getRecvProcs () |
int | getSendMessageLength (int destProc, int &messageLength) |
int | getSendMessage (int destProc, std::vector< int > &message) |
int | processRecvMessage (int srcProc, std::vector< int > &message) |
Public Member Functions inherited from fei::MessageHandler< int > | |
virtual | ~MessageHandler () |
Private Member Functions | |
NodeCommMgr (const NodeCommMgr &src) | |
NodeCommMgr & | operator= (const NodeCommMgr &src) |
int | allocateNodeDescriptorPtrs (NodeDatabase &nodeDB) |
int | storeNodeProcs (int index, std::vector< std::vector< int > * > &procTable, const int *procs, int numProcs) |
int | checkSharedNodeInfo () |
int | checkCommArrays (const char *whichCheck, std::vector< int > &globalRemoteProcs, std::vector< int > &globalNodesPerRemoteProc, std::vector< int > &globalRemoteProcLengths, std::vector< int > &nodesPerRemoteProc, std::vector< int > &remoteProcs) |
void | setNodeNumbersArray () |
void | packLocalNodesAndData (int *data, int proc, int numNodes, int len) |
void | packRemoteNodesAndData (GlobalID *data, int proc, int numNodes, int len) |
int | adjustSharedOwnership () |
int | createProcLists () |
int | createProcList (std::vector< int > &itemsPerProc, std::vector< int > &procs) |
int | exchangeSharedRemoteFieldsBlks () |
int | getGlobalMaxFieldsBlocks (int &maxFields, int &maxBlocks) |
int | getGlobalMaxFieldsBlocksSubdomains () |
Private Attributes | |
NodeDescriptor ** | sharedNodes_ |
bool | sharedNodesAllocated_ |
int | sharedNodeOwnership_ |
std::vector< GlobalID > | localNodeIDs |
std::vector< GlobalID > | remoteNodeIDs |
std::vector< GlobalID > | sharedNodeIDs |
std::vector< std::vector< int > > | sharedNodeSubdomains |
std::vector< int > | trivialSubdomainList |
std::vector< std::vector< int > * > | sharingProcs_ |
std::vector< int > | sharedNodeNumbers |
std::vector< int > | remoteOwnerProcs_ |
std::vector< int > | remoteSharingProcs_ |
std::vector< int > | nodesPerOwnerProc_ |
std::vector< int > | nodesPerSharingProc_ |
MPI_Comm | comm_ |
int | numProcs_ |
int | localProc_ |
int | maxFields_ |
int | maxBlocks_ |
int | maxSubdomains_ |
bool | initCompleteCalled_ |
const SNL_FEI_Structure & | probStruc |
NodeCommMgr (Node communication manager) is responsible for keeping track of nodes that require communication (shared nodes).
All shared nodes are put into this class through the addSharedNodes function. When they've all been put in, initComplete() is called, which allocates a list of pointer-to-NodeDescriptors.
Before initComplete is called, all nodes that appear in local element- connectivities should be passed to NodeCommMgr using the informLocal function.
The communication that must then happen is this:
For all nodes that we own, we must send their field-IDs and (global) equation numbers to the remote processors that share the node.
For all nodes that we don't own, we need to receive the field-IDs and equation numbers.
Definition at line 37 of file fei_NodeCommMgr.hpp.
anonymous enum |
Enumerator | |
---|---|
STRICTLY_LOW_PROC | |
PROC_WITH_LOCAL_ELEM | |
CALLER_SPECIFIES |
Definition at line 39 of file fei_NodeCommMgr.hpp.
NodeCommMgr::NodeCommMgr | ( | MPI_Comm | comm, |
const SNL_FEI_Structure & | problemStructure, | ||
int | sharedNodeOwnership = STRICTLY_LOW_PROC |
||
) |
Definition at line 29 of file fei_NodeCommMgr.cpp.
References comm_, fei::localProc(), localProc_, fei::numProcs(), numProcs_, and trivialSubdomainList.
|
virtual |
Definition at line 59 of file fei_NodeCommMgr.cpp.
References sharedNodeIDs, sharedNodes_, sharedNodesAllocated_, and sharingProcs_.
|
private |
|
inline |
Definition at line 44 of file fei_NodeCommMgr.hpp.
References sharedNodeIDs.
Referenced by SNL_FEI_Structure::finalizeNodeCommMgr(), SNL_FEI_Structure::getNumSharedNodes(), SNL_FEI_Structure::initializeEqnCommMgr(), FEDataFilter::initLinSysCore(), and NodeDatabase::synchronize().
|
inline |
Definition at line 45 of file fei_NodeCommMgr.hpp.
References localNodeIDs.
Referenced by FEDataFilter::initLinSysCore(), LinSysCoreFilter::initLinSysCore(), and SNL_FEI_Structure::isInLocalElement().
|
inline |
Definition at line 46 of file fei_NodeCommMgr.hpp.
References sharedNodeIDs.
Referenced by SNL_FEI_Structure::finalizeActiveNodes(), FEDataFilter::getReducedSolnEntry(), FEDataFilter::initLinSysCore(), and LinSysCoreFilter::initLinSysCore().
|
inline |
Definition at line 47 of file fei_NodeCommMgr.hpp.
References sharedNodeNumbers.
Referenced by SNL_FEI_Structure::getSharedNodeNumbers().
int NodeCommMgr::getSharedNodeIndex_num | ( | int | nodeNumber | ) |
Definition at line 505 of file fei_NodeCommMgr.cpp.
References sharedNodeNumbers.
Referenced by SNL_FEI_Structure::getNumSharingProcs(), and SNL_FEI_Structure::getSharedNodeProcs().
int NodeCommMgr::addSharedNodes | ( | const GlobalID * | nodeIDs, |
int | numNodes, | ||
const int *const * | procs, | ||
const int * | numProcs | ||
) |
Definition at line 515 of file fei_NodeCommMgr.cpp.
References fei::binarySearch(), fei::console_out(), ERReturn, FEI_ENDL, sharedNodeIDs, sharingProcs_, and storeNodeProcs().
Referenced by SNL_FEI_Structure::initSharedNodes().
int NodeCommMgr::initComplete | ( | NodeDatabase & | nodeDB, |
bool | safetyCheck | ||
) |
Definition at line 578 of file fei_NodeCommMgr.cpp.
References adjustSharedOwnership(), allocateNodeDescriptorPtrs(), fei::binarySearch(), checkSharedNodeInfo(), createProcLists(), exchangeSharedRemoteFieldsBlks(), initCompleteCalled_, localNodeIDs, localProc_, PROC_WITH_LOCAL_ELEM, NodeDescriptor::setOwnerProc(), sharedNodeIDs, sharedNodeOwnership_, sharedNodes_, sharedNodeSubdomains, and sharingProcs_.
Referenced by SNL_FEI_Structure::finalizeNodeCommMgr().
int NodeCommMgr::informLocal | ( | const NodeDescriptor & | node | ) |
Definition at line 105 of file fei_NodeCommMgr.cpp.
References NodeDescriptor::getGlobalNodeID(), getSharedNodeIndex(), localNodeIDs, numProcs_, and fei::sortedListInsert().
Referenced by SNL_FEI_Structure::finalizeActiveNodes(), and SNL_FEI_Structure::initSharedNodes().
int NodeCommMgr::exchangeEqnInfo | ( | ) |
Definition at line 282 of file fei_NodeCommMgr.cpp.
References CHK_ERR, comm_, fei::exchange(), getGlobalMaxFieldsBlocksSubdomains(), numProcs_, and setNodeNumbersArray().
Referenced by NodeDatabase::synchronize().
int NodeCommMgr::getSharedNodeIndex | ( | GlobalID | nodeID | ) |
Definition at line 70 of file fei_NodeCommMgr.cpp.
References fei::binarySearch(), and sharedNodeIDs.
Referenced by adjustSharedOwnership(), SNL_FEI_Structure::calculateSlaveEqns(), getSharedNodeNumSubdomains(), getSharedNodeSubdomainList(), informLocal(), and SNL_FEI_Structure::isInLocalElement().
int NodeCommMgr::getSharedNodeNumSubdomains | ( | GlobalID | nodeID | ) |
Definition at line 76 of file fei_NodeCommMgr.cpp.
References getSharedNodeIndex(), and sharedNodeSubdomains.
Referenced by SNL_FEI_Structure::getNumSubdomains().
std::vector< int > * NodeCommMgr::getSharedNodeSubdomainList | ( | GlobalID | nodeID | ) |
Definition at line 91 of file fei_NodeCommMgr.cpp.
References getSharedNodeIndex(), sharedNodeSubdomains, and trivialSubdomainList.
Referenced by SNL_FEI_Structure::getSubdomainList().
|
inline |
Definition at line 65 of file fei_NodeCommMgr.hpp.
References sharedNodes_.
Referenced by SNL_FEI_Structure::finalizeNodeCommMgr(), SNL_FEI_Structure::initializeEqnCommMgr(), and NodeDatabase::synchronize().
|
inline |
Definition at line 68 of file fei_NodeCommMgr.hpp.
References sharingProcs_.
Referenced by SNL_FEI_Structure::calculateSlaveEqns(), SNL_FEI_Structure::getNumSharingProcs(), SNL_FEI_Structure::getSharedNodeProcs(), and SNL_FEI_Structure::initializeEqnCommMgr().
|
inline |
Definition at line 71 of file fei_NodeCommMgr.hpp.
References sharedNodeOwnership_.
Referenced by FEI_Implementation::FEI_Implementation(), and SNL_FEI_Structure::parameters().
|
virtual |
Get the list of processors to which messages are to be sent in a sparse data exchange.
Implements fei::MessageHandler< int >.
Definition at line 185 of file fei_NodeCommMgr.cpp.
References remoteSharingProcs_.
|
virtual |
Get the list of processors from which messages are to be received in
a sparse data exchange.
Implements fei::MessageHandler< int >.
Definition at line 191 of file fei_NodeCommMgr.cpp.
References remoteOwnerProcs_.
|
virtual |
Get the length of a message that is to be send to the specified
destination processor.
Implements fei::MessageHandler< int >.
Definition at line 197 of file fei_NodeCommMgr.cpp.
References ERReturn, maxBlocks_, maxFields_, maxSubdomains_, nodesPerSharingProc_, and remoteSharingProcs_.
Referenced by getSendMessage().
|
virtual |
Prepare (pack) a message that is to be sent to the specified
destination processor.
Implements fei::MessageHandler< int >.
Definition at line 214 of file fei_NodeCommMgr.cpp.
References CHK_ERR, ERReturn, getSendMessageLength(), nodesPerSharingProc_, packLocalNodesAndData(), and remoteSharingProcs_.
|
virtual |
Process a message that has been received from the specified source
processor.
Implements fei::MessageHandler< int >.
Definition at line 234 of file fei_NodeCommMgr.cpp.
References NodeDescriptor::addBlockIndex(), NodeDescriptor::addField(), fei::binarySearch(), SNL_FEI_Structure::getIndexOfBlock(), nodesPerOwnerProc_, probStruc, remoteOwnerProcs_, NodeDescriptor::setBlkEqnNumber(), NodeDescriptor::setFieldEqnNumber(), NodeDescriptor::setNodeNumber(), NodeDescriptor::setNumNodalDOF(), sharedNodeIDs, sharedNodes_, and sharedNodeSubdomains.
|
private |
|
private |
Definition at line 552 of file fei_NodeCommMgr.cpp.
References NodeDatabase::getNodeWithID(), sharedNodeIDs, sharedNodes_, and sharedNodesAllocated_.
Referenced by initComplete().
|
private |
Definition at line 1065 of file fei_NodeCommMgr.cpp.
References fei::numProcs().
Referenced by addSharedNodes().
|
private |
Definition at line 658 of file fei_NodeCommMgr.cpp.
References fei::Allgatherv(), checkCommArrays(), CHK_ERR, comm_, fei::GlobalSum(), nodesPerOwnerProc_, nodesPerSharingProc_, numProcs_, remoteOwnerProcs_, and remoteSharingProcs_.
Referenced by initComplete().
|
private |
Definition at line 722 of file fei_NodeCommMgr.cpp.
References fei::binarySearch(), fei::console_out(), FEI_ENDL, localProc_, and numProcs_.
Referenced by checkSharedNodeInfo().
|
private |
Definition at line 866 of file fei_NodeCommMgr.cpp.
References NodeDescriptor::getNodeNumber(), sharedNodeIDs, sharedNodeNumbers, and sharedNodes_.
Referenced by exchangeEqnInfo().
|
private |
Definition at line 318 of file fei_NodeCommMgr.cpp.
References fei::binarySearch(), fei::console_out(), FEI_ENDL, NodeDescriptor::getBlkEqnNumber(), SNL_FEI_Structure::getBlockID(), NodeDescriptor::getBlockIndexList(), NodeDescriptor::getFieldEqnNumbers(), NodeDescriptor::getFieldIDList(), NodeDescriptor::getGlobalNodeID(), NodeDescriptor::getNodeNumber(), NodeDescriptor::getNumBlocks(), NodeDescriptor::getNumFields(), NodeDescriptor::getNumNodalDOF(), localProc_, probStruc, sharedNodeIDs, sharedNodes_, sharedNodeSubdomains, and sharingProcs_.
Referenced by getSendMessage().
|
private |
Definition at line 405 of file fei_NodeCommMgr.cpp.
References fei::binarySearch(), fei::console_out(), FEI_ENDL, SNL_FEI_Structure::getBlockID(), NodeDescriptor::getBlockIndexList(), NodeDescriptor::getFieldIDList(), NodeDescriptor::getGlobalNodeID(), NodeDescriptor::getNumBlocks(), NodeDescriptor::getNumFields(), NodeDescriptor::getNumNodalDOF(), NodeDescriptor::getOwnerProc(), localNodeIDs, localProc_, probStruc, sharedNodeIDs, and sharedNodes_.
Referenced by exchangeSharedRemoteFieldsBlks().
|
private |
Definition at line 772 of file fei_NodeCommMgr.cpp.
References fei::Allgatherv(), fei::binarySearch(), comm_, getSharedNodeIndex(), localNodeIDs, localProc_, remoteNodeIDs, NodeDescriptor::setOwnerProc(), sharedNodeIDs, sharedNodes_, sharingProcs_, and fei::sortedListInsert().
Referenced by initComplete().
|
private |
Definition at line 876 of file fei_NodeCommMgr.cpp.
References createProcList(), NodeDescriptor::getOwnerProc(), localProc_, nodesPerOwnerProc_, nodesPerSharingProc_, numProcs_, remoteOwnerProcs_, remoteSharingProcs_, sharedNodeIDs, sharedNodes_, and sharingProcs_.
Referenced by initComplete().
|
private |
Definition at line 477 of file fei_NodeCommMgr.cpp.
References fei::numProcs().
Referenced by createProcLists().
|
private |
Definition at line 932 of file fei_NodeCommMgr.cpp.
References NodeDescriptor::addBlockIndex(), NodeDescriptor::addField(), fei::Barrier(), fei::binarySearch(), comm_, fei::console_out(), FEI_ENDL, getGlobalMaxFieldsBlocks(), SNL_FEI_Structure::getIndexOfBlock(), MPI_Request, nodesPerOwnerProc_, nodesPerSharingProc_, packRemoteNodesAndData(), probStruc, remoteOwnerProcs_, remoteSharingProcs_, sharedNodeIDs, sharedNodes_, and sharedNodeSubdomains.
Referenced by initComplete().
|
private |
Definition at line 137 of file fei_NodeCommMgr.cpp.
References comm_, NodeDescriptor::getNumBlocks(), NodeDescriptor::getNumFields(), fei::GlobalMax(), sharedNodeIDs, and sharedNodes_.
Referenced by exchangeSharedRemoteFieldsBlks().
|
private |
Definition at line 159 of file fei_NodeCommMgr.cpp.
References comm_, NodeDescriptor::getNumBlocks(), NodeDescriptor::getNumFields(), fei::GlobalMax(), maxBlocks_, maxFields_, maxSubdomains_, sharedNodeIDs, sharedNodes_, and sharingProcs_.
Referenced by exchangeEqnInfo().
|
private |
Definition at line 119 of file fei_NodeCommMgr.hpp.
Referenced by adjustSharedOwnership(), allocateNodeDescriptorPtrs(), createProcLists(), exchangeSharedRemoteFieldsBlks(), getGlobalMaxFieldsBlocks(), getGlobalMaxFieldsBlocksSubdomains(), getSharedNodeAtIndex(), initComplete(), packLocalNodesAndData(), packRemoteNodesAndData(), processRecvMessage(), setNodeNumbersArray(), and ~NodeCommMgr().
|
private |
Definition at line 120 of file fei_NodeCommMgr.hpp.
Referenced by allocateNodeDescriptorPtrs(), and ~NodeCommMgr().
|
private |
Definition at line 122 of file fei_NodeCommMgr.hpp.
Referenced by initComplete(), and setSharedOwnershipRule().
|
private |
Definition at line 124 of file fei_NodeCommMgr.hpp.
Referenced by adjustSharedOwnership(), getLocalNodeIDs(), informLocal(), initComplete(), and packRemoteNodesAndData().
|
private |
Definition at line 125 of file fei_NodeCommMgr.hpp.
Referenced by adjustSharedOwnership().
|
private |
Definition at line 127 of file fei_NodeCommMgr.hpp.
Referenced by addSharedNodes(), adjustSharedOwnership(), allocateNodeDescriptorPtrs(), createProcLists(), exchangeSharedRemoteFieldsBlks(), getGlobalMaxFieldsBlocks(), getGlobalMaxFieldsBlocksSubdomains(), getNumSharedNodes(), getSharedNodeIDs(), getSharedNodeIndex(), initComplete(), packLocalNodesAndData(), packRemoteNodesAndData(), processRecvMessage(), setNodeNumbersArray(), and ~NodeCommMgr().
|
private |
Definition at line 129 of file fei_NodeCommMgr.hpp.
Referenced by exchangeSharedRemoteFieldsBlks(), getSharedNodeNumSubdomains(), getSharedNodeSubdomainList(), initComplete(), packLocalNodesAndData(), and processRecvMessage().
|
private |
Definition at line 132 of file fei_NodeCommMgr.hpp.
Referenced by getSharedNodeSubdomainList(), and NodeCommMgr().
|
private |
Definition at line 134 of file fei_NodeCommMgr.hpp.
Referenced by addSharedNodes(), adjustSharedOwnership(), createProcLists(), getGlobalMaxFieldsBlocksSubdomains(), getSharedNodeProcs(), initComplete(), packLocalNodesAndData(), and ~NodeCommMgr().
|
private |
Definition at line 137 of file fei_NodeCommMgr.hpp.
Referenced by getSharedNodeIndex_num(), getSharedNodeNumbers(), and setNodeNumbersArray().
|
private |
Definition at line 139 of file fei_NodeCommMgr.hpp.
Referenced by checkSharedNodeInfo(), createProcLists(), exchangeSharedRemoteFieldsBlks(), getRecvProcs(), and processRecvMessage().
|
private |
Definition at line 139 of file fei_NodeCommMgr.hpp.
Referenced by checkSharedNodeInfo(), createProcLists(), exchangeSharedRemoteFieldsBlks(), getSendMessage(), getSendMessageLength(), and getSendProcs().
|
private |
Definition at line 140 of file fei_NodeCommMgr.hpp.
Referenced by checkSharedNodeInfo(), createProcLists(), exchangeSharedRemoteFieldsBlks(), and processRecvMessage().
|
private |
Definition at line 140 of file fei_NodeCommMgr.hpp.
Referenced by checkSharedNodeInfo(), createProcLists(), exchangeSharedRemoteFieldsBlks(), getSendMessage(), and getSendMessageLength().
|
private |
Definition at line 142 of file fei_NodeCommMgr.hpp.
Referenced by adjustSharedOwnership(), checkSharedNodeInfo(), exchangeEqnInfo(), exchangeSharedRemoteFieldsBlks(), getGlobalMaxFieldsBlocks(), getGlobalMaxFieldsBlocksSubdomains(), and NodeCommMgr().
|
private |
Definition at line 143 of file fei_NodeCommMgr.hpp.
Referenced by checkCommArrays(), checkSharedNodeInfo(), createProcLists(), exchangeEqnInfo(), informLocal(), and NodeCommMgr().
|
private |
Definition at line 143 of file fei_NodeCommMgr.hpp.
Referenced by adjustSharedOwnership(), checkCommArrays(), createProcLists(), initComplete(), NodeCommMgr(), packLocalNodesAndData(), and packRemoteNodesAndData().
|
private |
Definition at line 145 of file fei_NodeCommMgr.hpp.
Referenced by getGlobalMaxFieldsBlocksSubdomains(), and getSendMessageLength().
|
private |
Definition at line 146 of file fei_NodeCommMgr.hpp.
Referenced by getGlobalMaxFieldsBlocksSubdomains(), and getSendMessageLength().
|
private |
Definition at line 147 of file fei_NodeCommMgr.hpp.
Referenced by getGlobalMaxFieldsBlocksSubdomains(), and getSendMessageLength().
|
private |
Definition at line 149 of file fei_NodeCommMgr.hpp.
Referenced by initComplete().
|
private |
Definition at line 150 of file fei_NodeCommMgr.hpp.
Referenced by exchangeSharedRemoteFieldsBlks(), packLocalNodesAndData(), packRemoteNodesAndData(), and processRecvMessage().