FEI Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
NodeCommMgr Class Reference

#include <fei_NodeCommMgr.hpp>

Inheritance diagram for NodeCommMgr:

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)
 
NodeDescriptorgetSharedNodeAtIndex (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)
 
NodeCommMgroperator= (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< GlobalIDlocalNodeIDs
 
std::vector< GlobalIDremoteNodeIDs
 
std::vector< GlobalIDsharedNodeIDs
 
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_StructureprobStruc
 

Detailed Description

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.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
STRICTLY_LOW_PROC 
PROC_WITH_LOCAL_ELEM 
CALLER_SPECIFIES 

Definition at line 39 of file fei_NodeCommMgr.hpp.

Constructor & Destructor Documentation

◆ NodeCommMgr() [1/2]

◆ ~NodeCommMgr()

NodeCommMgr::~NodeCommMgr ( )
virtual

Definition at line 59 of file fei_NodeCommMgr.cpp.

References sharedNodeIDs, sharedNodes_, sharedNodesAllocated_, and sharingProcs_.

◆ NodeCommMgr() [2/2]

NodeCommMgr::NodeCommMgr ( const NodeCommMgr & src)
private

References NodeCommMgr().

Member Function Documentation

◆ getNumSharedNodes()

size_t NodeCommMgr::getNumSharedNodes ( )
inline

Definition at line 44 of file fei_NodeCommMgr.hpp.

References sharedNodeIDs.

Referenced by FEDataFilter::initLinSysCore().

◆ getLocalNodeIDs()

std::vector< GlobalID > & NodeCommMgr::getLocalNodeIDs ( )
inline

Definition at line 45 of file fei_NodeCommMgr.hpp.

References localNodeIDs.

Referenced by FEDataFilter::initLinSysCore(), and LinSysCoreFilter::initLinSysCore().

◆ getSharedNodeIDs()

std::vector< GlobalID > & NodeCommMgr::getSharedNodeIDs ( )
inline

◆ getSharedNodeNumbers()

std::vector< int > & NodeCommMgr::getSharedNodeNumbers ( )
inline

Definition at line 47 of file fei_NodeCommMgr.hpp.

References sharedNodeNumbers.

◆ getSharedNodeIndex_num()

int NodeCommMgr::getSharedNodeIndex_num ( int nodeNumber)

Definition at line 505 of file fei_NodeCommMgr.cpp.

References sharedNodeNumbers.

◆ addSharedNodes()

int NodeCommMgr::addSharedNodes ( const GlobalID * nodeIDs,
int numNodes,
const int *const * procs,
const int * numProcs )

◆ initComplete()

◆ informLocal()

int NodeCommMgr::informLocal ( const NodeDescriptor & node)

◆ exchangeEqnInfo()

int NodeCommMgr::exchangeEqnInfo ( )

◆ getSharedNodeIndex()

int NodeCommMgr::getSharedNodeIndex ( GlobalID nodeID)

◆ getSharedNodeNumSubdomains()

int NodeCommMgr::getSharedNodeNumSubdomains ( GlobalID nodeID)

Definition at line 76 of file fei_NodeCommMgr.cpp.

References getSharedNodeIndex(), and sharedNodeSubdomains.

◆ getSharedNodeSubdomainList()

std::vector< int > * NodeCommMgr::getSharedNodeSubdomainList ( GlobalID nodeID)

◆ getSharedNodeAtIndex()

NodeDescriptor & NodeCommMgr::getSharedNodeAtIndex ( int index)
inline

Definition at line 65 of file fei_NodeCommMgr.hpp.

References sharedNodes_.

◆ getSharedNodeProcs()

std::vector< int > & NodeCommMgr::getSharedNodeProcs ( int index)
inline

Definition at line 68 of file fei_NodeCommMgr.hpp.

References sharingProcs_.

◆ setSharedOwnershipRule()

void NodeCommMgr::setSharedOwnershipRule ( int ownershipRule)
inline

Definition at line 71 of file fei_NodeCommMgr.hpp.

References sharedNodeOwnership_.

Referenced by FEI_Implementation::FEI_Implementation().

◆ getSendProcs()

std::vector< int > & NodeCommMgr::getSendProcs ( )
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_.

◆ getRecvProcs()

std::vector< int > & NodeCommMgr::getRecvProcs ( )
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_.

◆ getSendMessageLength()

int NodeCommMgr::getSendMessageLength ( int destProc,
int & messageLength )
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().

◆ getSendMessage()

int NodeCommMgr::getSendMessage ( int destProc,
std::vector< int > & message )
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_.

◆ processRecvMessage()

int NodeCommMgr::processRecvMessage ( int srcProc,
std::vector< int > & message )
virtual

◆ operator=()

NodeCommMgr & NodeCommMgr::operator= ( const NodeCommMgr & src)
private

References NodeCommMgr().

◆ allocateNodeDescriptorPtrs()

int NodeCommMgr::allocateNodeDescriptorPtrs ( NodeDatabase & nodeDB)
private

◆ storeNodeProcs()

int NodeCommMgr::storeNodeProcs ( int index,
std::vector< std::vector< int > * > & procTable,
const int * procs,
int numProcs )
private

Definition at line 1065 of file fei_NodeCommMgr.cpp.

Referenced by addSharedNodes().

◆ checkSharedNodeInfo()

int NodeCommMgr::checkSharedNodeInfo ( )
private

◆ checkCommArrays()

int NodeCommMgr::checkCommArrays ( const char * whichCheck,
std::vector< int > & globalRemoteProcs,
std::vector< int > & globalNodesPerRemoteProc,
std::vector< int > & globalRemoteProcLengths,
std::vector< int > & nodesPerRemoteProc,
std::vector< int > & remoteProcs )
private

Definition at line 722 of file fei_NodeCommMgr.cpp.

References fei::binarySearch(), fei::console_out(), FEI_ENDL, localProc_, and numProcs_.

Referenced by checkSharedNodeInfo().

◆ setNodeNumbersArray()

void NodeCommMgr::setNodeNumbersArray ( )
private

Definition at line 866 of file fei_NodeCommMgr.cpp.

References sharedNodeIDs, sharedNodeNumbers, and sharedNodes_.

Referenced by exchangeEqnInfo().

◆ packLocalNodesAndData()

◆ packRemoteNodesAndData()

◆ adjustSharedOwnership()

int NodeCommMgr::adjustSharedOwnership ( )
private

◆ createProcLists()

int NodeCommMgr::createProcLists ( )
private

◆ createProcList()

int NodeCommMgr::createProcList ( std::vector< int > & itemsPerProc,
std::vector< int > & procs )
private

Definition at line 477 of file fei_NodeCommMgr.cpp.

Referenced by createProcLists().

◆ exchangeSharedRemoteFieldsBlks()

◆ getGlobalMaxFieldsBlocks()

int NodeCommMgr::getGlobalMaxFieldsBlocks ( int & maxFields,
int & maxBlocks )
private

Definition at line 137 of file fei_NodeCommMgr.cpp.

References comm_, fei::GlobalMax(), sharedNodeIDs, and sharedNodes_.

Referenced by exchangeSharedRemoteFieldsBlks().

◆ getGlobalMaxFieldsBlocksSubdomains()

int NodeCommMgr::getGlobalMaxFieldsBlocksSubdomains ( )
private

Member Data Documentation

◆ sharedNodes_

◆ sharedNodesAllocated_

bool NodeCommMgr::sharedNodesAllocated_
private

Definition at line 120 of file fei_NodeCommMgr.hpp.

Referenced by allocateNodeDescriptorPtrs(), NodeCommMgr(), and ~NodeCommMgr().

◆ sharedNodeOwnership_

int NodeCommMgr::sharedNodeOwnership_
private

Definition at line 122 of file fei_NodeCommMgr.hpp.

Referenced by initComplete(), NodeCommMgr(), and setSharedOwnershipRule().

◆ localNodeIDs

std::vector<GlobalID> NodeCommMgr::localNodeIDs
private

◆ remoteNodeIDs

std::vector<GlobalID> NodeCommMgr::remoteNodeIDs
private

Definition at line 125 of file fei_NodeCommMgr.hpp.

Referenced by adjustSharedOwnership(), and NodeCommMgr().

◆ sharedNodeIDs

◆ sharedNodeSubdomains

std::vector<std::vector<int> > NodeCommMgr::sharedNodeSubdomains
private

◆ trivialSubdomainList

std::vector<int> NodeCommMgr::trivialSubdomainList
private

Definition at line 132 of file fei_NodeCommMgr.hpp.

Referenced by getSharedNodeSubdomainList(), and NodeCommMgr().

◆ sharingProcs_

std::vector<std::vector<int>*> NodeCommMgr::sharingProcs_
private

◆ sharedNodeNumbers

std::vector<int> NodeCommMgr::sharedNodeNumbers
private

◆ remoteOwnerProcs_

std::vector<int> NodeCommMgr::remoteOwnerProcs_
private

◆ remoteSharingProcs_

std::vector<int> NodeCommMgr::remoteSharingProcs_
private

◆ nodesPerOwnerProc_

std::vector<int> NodeCommMgr::nodesPerOwnerProc_
private

◆ nodesPerSharingProc_

std::vector<int> NodeCommMgr::nodesPerSharingProc_
private

◆ comm_

◆ numProcs_

int NodeCommMgr::numProcs_
private

◆ localProc_

◆ maxFields_

int NodeCommMgr::maxFields_
private

◆ maxBlocks_

int NodeCommMgr::maxBlocks_
private

◆ maxSubdomains_

int NodeCommMgr::maxSubdomains_
private

◆ initCompleteCalled_

bool NodeCommMgr::initCompleteCalled_
private

Definition at line 149 of file fei_NodeCommMgr.hpp.

Referenced by initComplete(), and NodeCommMgr().

◆ probStruc


The documentation for this class was generated from the following files: