1 #ifndef _SNL_FEI_Structure_hpp_
2 #define _SNL_FEI_Structure_hpp_
73 int parameters(
int numParams,
const char*
const* paramStrings);
75 int initFields(
int numFields,
const int* fieldSizes,
const int* fieldIDs,
76 const int* fieldTypes = NULL);
80 int numNodesPerElement,
81 const int* numFieldsPerNode,
82 const int*
const* nodalFieldIDs,
83 int numElemDofFieldsPerElement,
84 const int* elemDofFieldIDs,
85 int interleaveStrategy);
93 int offsetIntoSlaveField,
96 const int* masterFieldIDs,
97 const double* weights,
104 const int* numProcsPerNode,
105 const int *
const *sharingProcIDs);
133 return( &workarray_[0] );
144 return( &workarray_[0]+len );
153 std::map<int,int>::const_iterator
191 int& interleaveStrategy,
int& lumpingStrategy,
192 int& numElemDOF,
int& numElements,
193 int& numNodesPerElem,
int& numEqnsPerElem);
219 int interleaveStrategy,
220 int* scatterIndices);
223 int interleaveStrategy,
224 int* scatterIndices);
228 int* scatterIndices);
231 int interleaveStrategy,
233 int* blkScatterIndices,
237 int interleaveStrategy,
239 int* blkScatterIndices,
254 if (index < 0)
return(NULL);
260 if (index < 0)
return(-1);
267 if (err != 0)
return(-1);
275 if (err != 0)
return(NULL);
290 int reducedNodeNumber = -1;
291 if (nodeNumber >= 0) {
294 return( reducedNodeNumber );
342 void getEqnInfo(
int& numGlobalEqns,
int& numLocalEqns,
343 int& localStartRow,
int& localEndRow);
346 int& numEqns,
int* eqnNumbers);
349 int idType,
int fieldID,
350 int& numEqns,
int* eqnNumbers);
352 void getEqnBlkInfo(
int& numGlobalEqnBlks,
int& numLocalEqnBlks,
353 int& localBlkOffset);
361 std::map<GlobalID,snl_fei::Constraint<GlobalID>*>&
367 std::map<int,snl_fei::Constraint<GlobalID>*>::iterator
371 multCR = (*cr_iter).second;
375 return( returncode );
379 std::map<GlobalID,snl_fei::Constraint<GlobalID>*>&
385 std::map<int,snl_fei::Constraint<GlobalID>*>::iterator
388 if (cr_iter !=
penCRs_.end()) {
389 penCR = (*cr_iter).second;
393 return( returncode );
495 int** blkColIndices,
int* blkIndices_1D,
496 std::vector<int>& blkRowLengths,
497 std::vector<int>& numPtRowsPerBlkRow);
510 #ifdef FEI_HAVE_IOSFWD
511 int setDbgOut(std::ostream& ostr,
const char* path,
const char* feiName);
513 int setDbgOut(ostream& ostr,
const char* path,
const char* feiName);
534 int* scatterIndices,
int& offset);
538 int* scatterIndices,
int& offset,
539 int* blkScatterIndices,
540 int* blkSizes,
int& blkOffset);
543 int** fieldIDs,
int* fieldsPerNode,
544 int* scatterIndices,
int& offset);
547 int* scatterIndices,
int& offset);
550 int** fieldIDs,
int* fieldsPerNode,
551 int* scatterIndices,
int& offset,
552 int* blkScatterIndices,
553 int* blkSizes,
int& blkOffset);
556 std::vector<int>* fieldIDs,
557 std::vector<int>& fieldsPerNode,
558 std::vector<int>& scatterIndices);
561 int** fieldIDs,
int* fieldsPerNode,
562 int* scatterIndices,
int& offset);
565 std::vector<int>* fieldIDs,
566 std::vector<int>& fieldsPerNode,
567 std::vector<int>& scatterIndices);
571 int numLocalEqnBlks);
584 const char* callingFunction);
613 #ifdef FEI_HAVE_IOSFWD
703 std::map<GlobalID, snl_fei::Constraint<GlobalID>* >
multCRs_;
705 std::map<GlobalID, snl_fei::Constraint<GlobalID>* >
penCRs_;
714 #ifdef FEI_HAVE_IOSFWD
int setDbgOut(std::ostream &ostr, const char *path, const char *feiName)
std::vector< BlockDescriptor * > blocks_
int translateMatToReducedEqns(fei::CSRMat &mat)
fei::FieldDofMap< int > fieldDofMap_
snl_fei::PointBlockMap * blkEqnMapper_
int createMatrixPositions(int row, int numCols, int *cols, const char *callingFunction)
std::vector< int > & getSharedNodeProcs(int index)
int getFieldSize(int fieldID)
const int * getFieldIDsPtr()
int setNumNodesAndEqnsPerBlock()
int getNumSharingProcs(int nodeNumber)
std::vector< int > globalNumNodesVanished_
int getBlockDescriptor_index(int index, BlockDescriptor *&block)
std::map< GlobalID, int > & getNodeIDs()
int getNodeWithNumber(int nodeNumber, const NodeDescriptor *&node) const
std::map< GlobalID, snl_fei::Constraint< GlobalID > * > penCRs_
fei::FieldDofMap< int > & getFieldDofMap()
fei::FillableMat * slaveMatrix_
int getElemNodeDescriptors(int blockIndex, int elemIndex, NodeDescriptor **nodes)
SNL_FEI_Structure(MPI_Comm comm)
int getMasterEqnRHS(int slaveEqn, double &rhsValue)
bool nodalEqnsAllSlaves(const NodeDescriptor *node, std::vector< int > &slaveEqns)
int getBlockID(unsigned index) const
int getPenConstRecord(int CRID, snl_fei::Constraint< GlobalID > *&penCR)
std::vector< GlobalID > blockIDs_
std::vector< int > * slvEqnNumbers_
int ptEqnToBlkEqn(int ptEqn)
const int * getSharedNodeNumbers()
int finalizeActiveNodes()
std::vector< NodeDescriptor * > work_nodePtrs_
int initElemBlockStructure()
void getScatterIndices_index(int blockIndex, int elemIndex, int interleaveStrategy, int *scatterIndices)
snl_fei::PointBlockMap & getBlkEqnMapper()
int finalizeNodeCommMgr()
std::vector< int > localVanishedNodeNumbers_
int getMasterEqnCoefs(int slaveEqn, std::vector< double > *&masterCoefs)
int getNumLocalReducedEqns()
int getEqnNumbers(GlobalID ID, int idType, int fieldID, int &numEqns, int *eqnNumbers)
NodeDatabase & getNodeDatabase()
fei::FillableMat * getSlaveDependencies()
int storeElementScatterBlkIndices_noSlaves(std::vector< int > &scatterIndices)
static int removeCouplings(EqnBuffer &eqnbuf, int &levelsOfCoupling)
fei::ctg_set< int > * sysMatIndices_
int getNumSubdomains(int nodeNumber)
int createBlkSymmEqnStructure(std::vector< int > &scatterIndices)
int getGlobalMaxBlkSize()
const std::vector< int > & getFieldIDs() const
bool isExactlyBlkEqn(int ptEqn)
int storeElementScatterIndices(std::vector< int > &scatterIndices)
int initMultCRStructure()
EqnCommMgr & getEqnCommMgr()
std::vector< int > fieldSizes_
void getEqnInfo(int &numGlobalEqns, int &numLocalEqns, int &localStartRow, int &localEndRow)
const int * getFieldSizesPtr()
int getBlkEqnSize(int blkEqn)
int createSymmEqnStructure(std::vector< int > &scatterIndices)
int getMasterEqnNumbers(int slaveEqn, std::vector< int > *&masterEqns)
bool activeNodesInitialized_
int getOffsetIntoBlkEqn(int blkEqn, int ptEqn)
int initElemBlock(GlobalID elemBlockID, int numElements, int numNodesPerElement, const int *numFieldsPerNode, const int *const *nodalFieldIDs, int numElemDofFieldsPerElement, const int *elemDofFieldIDs, int interleaveStrategy)
NodeDatabase * nodeDatabase_
bool isExactlyBlkEqn(int ptEqn)
MPI_Comm getCommunicator() const
int getSharedNodeIndex_num(int nodeNumber)
int assembleReducedStructure()
int translateToReducedNodeNumber(int nodeNumber, int proc)
int initFields(int numFields, const int *fieldSizes, const int *fieldIDs, const int *fieldTypes=NULL)
int getMatrixRowLengths(std::vector< int > &rowLengths)
virtual ~SNL_FEI_Structure()
std::ostream * dbgOStreamPtr_
int getMatrixStructure(int **colIndices, std::vector< int > &rowLengths)
int initSharedNodes(int numSharedNodes, const GlobalID *sharedNodeIDs, const int *numProcsPerNode, const int *const *sharingProcIDs)
int addBlock(GlobalID blockID)
int calculateSlaveEqns(MPI_Comm comm)
int getNumGlobalEqnBlks()
std::map< GlobalID, snl_fei::Constraint< GlobalID > * > & getPenConstRecords()
int firstLocalNodeNumber_
std::vector< int > fieldIDs_
fei::ctg_set< int > * sysBlkMatIndices_
void getEqnBlkInfo(int &numGlobalEqnBlks, int &numLocalEqnBlks, int &localBlkOffset)
GlobalID getGlobalNodeID() const
const int * getSharedNodeProcs(int nodeNumber)
int getNodeMajorIndices(NodeDescriptor **nodes, int numNodes, int **fieldIDs, int *fieldsPerNode, int *scatterIndices, int &offset)
std::vector< int > & getGlobalEqnOffsets()
int getBlkEqnOffset(int blkEqn, int ptEqn)
std::vector< int > cSlave_
void getScatterIndices_ID(GlobalID blockID, GlobalID elemID, int interleaveStrategy, int *scatterIndices)
std::vector< int > workSpace_
int translateToReducedEqns(EqnCommMgr &eqnCommMgr)
int initCRMult(int numCRNodes, const GlobalID *CRNodes, const int *CRFields, int &CRID)
bool isInLocalElement(int nodeNumber)
void storeNodalRowIndices(NodeDescriptor &node, int fieldID, int eqn)
void addSlaveVariable(SlaveVariable *svar)
int initCRPen(int numCRNodes, const GlobalID *CRNodes, const int *CRFields, int &CRID)
void initializeEqnCommMgr()
int getAssociatedFieldID(int eqnNumber)
const int * getNumFieldsPerNode(GlobalID blockID)
void addCR(int CRID, snl_fei::Constraint< GlobalID > *&cr, std::map< GlobalID, snl_fei::Constraint< GlobalID > * > &crDB)
int eqnToBlkEqn(int eqn) const
void destroyBlockRoster()
bool activeNodesInitialized()
std::vector< int > & getGlobalNodeOffsets()
int getSharedNodeNumSubdomains(GlobalID nodeID)
int localReducedBlkOffset_
int storeElementScatterIndices_noSlaves(std::vector< int > &scatterIndices)
int getBlockDescriptor(GlobalID blockID, BlockDescriptor *&block)
std::map< GlobalID, snl_fei::Constraint< GlobalID > * > multCRs_
std::vector< int > globalBlkEqnOffsets_
int getAssociatedFieldID(int eqnNumber)
bool translateToReducedEqn(int eqn, int &reducedEqn)
int calcTotalNumElemDOF()
SNL_FEI_Structure & operator=(const SNL_FEI_Structure &src)
ConnectivityTable & getBlockConnectivity(GlobalID blockID)
int initSlaveVariable(GlobalID slaveNodeID, int slaveFieldID, int offsetIntoSlaveField, int numMasterNodes, const GlobalID *masterNodeIDs, const int *masterFieldIDs, const double *weights, double rhsValue)
void storeNodalSendIndices(NodeDescriptor &iNode, int iField, NodeDescriptor &jNode, int jField)
std::vector< SlaveVariable * > * slaveVars_
std::vector< int > globalNodeOffsets_
int getNodeIndices_simple(NodeDescriptor **nodes, int numNodes, int fieldID, int *scatterIndices, int &offset)
int getOwnerProcForEqn(int eqn)
EqnBuffer * getSlaveEqns()
int getBlkScatterIndices_index(int blockIndex, int elemIndex, int *scatterIndices)
int * getSubdomainList(int nodeNumber)
std::map< GlobalID, int > & getActiveNodeIDList()
int getAssociatedNodeNumber(int eqnNumber)
int getAssociatedNodeNumber(int eqnNumber)
int getBlkEqnSize(int blkEqn)
int getNodeBlkIndices(NodeDescriptor **nodes, int numNodes, int *scatterIndices, int &offset)
int createMatrixPosition(int row, int col, const char *callingFunction)
void destroyConnectivityTables()
int initializeBlkEqnMapper()
void storeLocalNodeIndices(NodeDescriptor &iNode, int iField, NodeDescriptor &jNode, int jField)
NodeDescriptor & findNodeDescriptor(GlobalID nodeID)
void storeNodalSendIndex(NodeDescriptor &node, int fieldID, int col)
std::vector< int > rSlave_
int getNumLocalReducedEqnBlks()
int getMultConstRecord(int CRID, snl_fei::Constraint< GlobalID > *&multCR)
int initElem(GlobalID elemBlockID, GlobalID elemID, const GlobalID *elemConn)
NodeDescriptor * findNode(GlobalID nodeID)
std::vector< ConnectivityTable * > connTables_
void storeNodalColumnIndices(int eqn, NodeDescriptor &node, int fieldID)
std::map< int, int > * fieldDatabase_
int getNumPenConstRecords()
std::map< GlobalID, snl_fei::Constraint< GlobalID > * > & getMultConstRecords()
std::vector< int > workarray_
int translateFromReducedEqn(int reducedEqn)
std::vector< int > & getGlobalBlkEqnOffsets()
int getNumMultConstRecords()
int allocateBlockConnectivity(GlobalID blockID)
int formMatrixStructure()
const GlobalID * getElemBlockIDs()
size_t getNumSharedNodes()
NodeCommMgr * nodeCommMgr_
int parameters(int numParams, const char *const *paramStrings)
std::vector< int > & getSharedNodeNumbers()
void getElemBlockInfo(GlobalID blockID, int &interleaveStrategy, int &lumpingStrategy, int &numElemDOF, int &numElements, int &numNodesPerElem, int &numEqnsPerElem)
void calcGlobalEqnInfo(int numLocallyOwnedNodes, int numLocalEqns, int numLocalEqnBlks)
std::vector< int > globalEqnOffsets_
int initComplete(bool generateGraph=true)
static int gatherSlaveEqns(MPI_Comm comm, EqnCommMgr *eqnCommMgr, EqnBuffer *slaveEqns)
int getFieldMajorIndices(NodeDescriptor **nodes, int numNodes, int **fieldIDs, int *fieldsPerNode, int *scatterIndices, int &offset)
NodeCommMgr & getNodeCommMgr()
std::vector< int > * getSharedNodeSubdomainList(GlobalID nodeID)
int getIndexOfBlock(GlobalID blockID) const
const int *const * getFieldIDsTable(GlobalID blockID)
int numLocalReducedEqnBlks_
int getEqnNumber(int nodeNumber, int fieldID)
bool matIndicesDestroyed_