Public Member Functions
| ||NodeDatabase (std::map< int, int > *fieldDatabase, NodeCommMgr *nodeCommMgr)|
|virtual ||~NodeDatabase ()|
|int ||getNumNodeDescriptors () const |
|std::map< GlobalID, int > & ||getNodeIDs ()|
|int ||getNodeWithID (GlobalID nodeID, const NodeDescriptor *&node) const |
|int ||getNodeWithNumber (int nodeNumber, const NodeDescriptor *&node) const |
|int ||getNodeWithEqn (int eqnNumber, const NodeDescriptor *&node) const |
|void ||getNodeAtIndex (int i, const NodeDescriptor *&node) const |
|int ||countLocalNodalEqns (int localRank)|
|int ||countLocalNodeDescriptors (int localRank)|
|int ||getIndexOfID (GlobalID nodeID) const |
|int ||initNodeID (GlobalID nodeID)|
|int ||initNodeIDs (GlobalID *nodeIDs, int numNodes)|
|int ||synchronize (int firstLocalNodeNumber, int firstLocalEqn, int localRank, MPI_Comm comm)|
|int ||getAssociatedNodeNumber (int eqnNumber)|
|int ||getAssociatedFieldID (int eqnNumber)|
|bool ||isSynchronized ()|
Container that holds NodeDescriptors, and is able to reference them by global identifiers, or by nodeNumbers or eqnNumbers.
These are the 3 fundamental ways to refer to a node:
nodeID -- global node identifier. nodeID's are provided by the calling finite-element application. nodeID's are not necessarily contiguous, nor do they necessarily start at 0 or 1 or anything else. The only requirement is that they are globally unique.
nodeNumber -- node-numbers are assigned by the FEI implementation. They are globally 0-based and contiguous. Each processor will have a first and last node-number, and all nodes lying in that range may be assumed to be locally owned. However, processors usually share nodes that are not locally owned, and thus those nodes will have node-numbers that lie outside the 'local range'.
eqnNumber -- equation-numbers are also assigned by the FEI implementation, and are also globally 0-based and contiguous. Multiple eqnNumbers may refer to a single node, whereas each node only has one nodeNumber and one nodeID.
The goal of this class is to be able to provide a node's descriptor as fast as possible, given a nodeID, nodeNumber, or eqnNumber. Binary searches are used wherever possible.
The return-value of all functions in this class (except trivial query/accessor functions) is an error-code. If the function is successful, the error-code is 0. If a node-not-found error occurs, -1 is returned. If an allocation fails, -2 is returned.
This class is intended to be used by an FEI implementation, with usage proceeding in 3 distinct 'phases':
nodeID initialization. After construction, NodeDatabase can accept an arbitrary number of calls to the initNodeID function.
NodeDescriptor initialization. After all nodeIDs have been 'pushed' into the NodeDatabase using initNodeID, the function allocateNodeDescriptors() should be called. After this, some of the node-query functions are available to serve out NodeDescriptors on which the calling code can set things like fieldIDs with associated equation-numbers, owning processors, etc. After the NodeDescriptors have been initialized, NodeDatabase::synchronize should be called.
general node queries. After synchronize has been called, the user is able to request NodeDescriptors by supplying a nodeNumber or an eqnNumber.
Definition at line 66 of file fei_NodeDatabase.hpp.