1 #ifndef _NodeCommMgr_hpp_
2 #define _NodeCommMgr_hpp_
12 #include <fei_fwd.hpp>
14 #include <fei_CommUtils.hpp>
39 enum { STRICTLY_LOW_PROC, PROC_WITH_LOCAL_ELEM, CALLER_SPECIFIES };
44 size_t getNumSharedNodes() {
return(sharedNodeIDs.size());}
45 std::vector<GlobalID>& getLocalNodeIDs() {
return(localNodeIDs);}
46 std::vector<GlobalID>& getSharedNodeIDs() {
return(sharedNodeIDs);}
47 std::vector<int>& getSharedNodeNumbers() {
return(sharedNodeNumbers);}
49 int getSharedNodeIndex_num(
int nodeNumber);
51 int addSharedNodes(
const GlobalID* nodeIDs,
int numNodes,
52 const int*
const* procs,
const int* numProcs);
54 int initComplete(
NodeDatabase& nodeDB,
bool safetyCheck);
58 int exchangeEqnInfo();
60 int getSharedNodeIndex(GlobalID nodeID);
62 int getSharedNodeNumSubdomains(GlobalID nodeID);
63 std::vector<int>* getSharedNodeSubdomainList(GlobalID nodeID);
66 {
return(*(sharedNodes_[index]));}
68 std::vector<int>& getSharedNodeProcs(
int index)
69 {
return(*(sharingProcs_[index]));};
71 void setSharedOwnershipRule(
int ownershipRule)
72 { sharedNodeOwnership_ = ownershipRule; }
87 int storeNodeProcs(
int index, std::vector<std::vector<int>*>& procTable,
88 const int* procs,
int numProcs);
90 int checkSharedNodeInfo();
92 int checkCommArrays(
const char* whichCheck,
93 std::vector<int>& globalRemoteProcs,
94 std::vector<int>& globalNodesPerRemoteProc,
95 std::vector<int>& globalRemoteProcLengths,
96 std::vector<int>& nodesPerRemoteProc,
97 std::vector<int>& remoteProcs);
99 void setNodeNumbersArray();
101 void packLocalNodesAndData(
int* data,
int proc,
102 int numNodes,
int len);
103 void packRemoteNodesAndData(GlobalID* data,
int proc,
104 int numNodes,
int len);
106 int adjustSharedOwnership();
108 int createProcLists();
110 int createProcList(std::vector<int>& itemsPerProc,
111 std::vector<int>& procs);
113 int exchangeSharedRemoteFieldsBlks();
115 int getGlobalMaxFieldsBlocks(
int& maxFields,
int& maxBlocks);
117 int getGlobalMaxFieldsBlocksSubdomains();
120 bool sharedNodesAllocated_;
122 int sharedNodeOwnership_;
124 std::vector<GlobalID> localNodeIDs;
125 std::vector<GlobalID> remoteNodeIDs;
127 std::vector<GlobalID> sharedNodeIDs;
129 std::vector<std::vector<int> > sharedNodeSubdomains;
132 std::vector<int> trivialSubdomainList;
134 std::vector<std::vector<int>*> sharingProcs_;
137 std::vector<int> sharedNodeNumbers;
139 std::vector<int> remoteOwnerProcs_, remoteSharingProcs_;
140 std::vector<int> nodesPerOwnerProc_, nodesPerSharingProc_;
143 int numProcs_, localProc_;
149 bool initCompleteCalled_;
std::vector< int > & getSendProcs()
int getSendMessage(int destProc, std::vector< int > &message)
std::vector< int > & getRecvProcs()
int getSendMessageLength(int destProc, int &messageLength)
int processRecvMessage(int srcProc, std::vector< int > &message)