SNL_FEI_Structure Class Reference

#include <SNL_FEI_Structure.hpp>

Inheritance diagram for SNL_FEI_Structure:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 SNL_FEI_Structure (MPI_Comm comm)
virtual ~SNL_FEI_Structure ()
int parameters (int numParams, const char *const *paramStrings)
int initFields (int numFields, const int *fieldSizes, const int *fieldIDs)
int initElemBlock (GlobalID elemBlockID, int numElements, int numNodesPerElement, const int *numFieldsPerNode, const int *const *nodalFieldIDs, int numElemDofFieldsPerElement, const int *elemDofFieldIDs, int interleaveStrategy)
int initElem (GlobalID elemBlockID, GlobalID elemID, const GlobalID *elemConn)
int initSlaveVariable (GlobalID slaveNodeID, int slaveFieldID, int offsetIntoSlaveField, int numMasterNodes, const GlobalID *masterNodeIDs, const int *masterFieldIDs, const double *weights, double rhsValue)
int deleteMultCRs ()
int initSharedNodes (int numSharedNodes, const GlobalID *sharedNodeIDs, const int *numProcsPerNode, const int *const *sharingProcIDs)
int initCRMult (int numCRNodes, const GlobalID *CRNodes, const int *CRFields, int &CRID)
int initCRPen (int numCRNodes, const GlobalID *CRNodes, const int *CRFields, int &CRID)
int initComplete (bool generateGraph=true)
std::map< int, int > & getFieldDatabase ()
const int * getFieldIDsPtr ()
const int * getFieldSizesPtr ()
int getNumFields ()
int getFieldSize (int fieldID)
bool isInLocalElement (int nodeNumber)
const int * getNumFieldsPerNode (GlobalID blockID)
const int *const * getFieldIDsTable (GlobalID blockID)
int getEqnNumber (int nodeNumber, int fieldID)
int getOwnerProcForEqn (int eqn)
int getNumElemBlocks ()
const GlobalID * getElemBlockIDs ()
void getElemBlockInfo (GlobalID blockID, int &interleaveStrategy, int &lumpingStrategy, int &numElemDOF, int &numElements, int &numNodesPerElem, int &numEqnsPerElem)
int addBlock (GlobalID blockID)
int getBlockDescriptor (GlobalID blockID, BlockDescriptor *&block)
int getBlockDescriptor_index (int index, BlockDescriptor *&block)
int getIndexOfBlock (GlobalID blockID)
int allocateBlockConnectivity (GlobalID blockID)
void destroyConnectivityTables ()
ConnectivityTablegetBlockConnectivity (GlobalID blockID)
void getScatterIndices_ID (GlobalID blockID, GlobalID elemID, int interleaveStrategy, int *scatterIndices)
void getScatterIndices_index (int blockIndex, int elemIndex, int interleaveStrategy, int *scatterIndices)
int getBlkScatterIndices_index (int blockIndex, int elemIndex, int *scatterIndices)
void getScatterIndices_ID (GlobalID blockID, GlobalID elemID, int interleaveStrategy, int *scatterIndices, int *blkScatterIndices, int *blkSizes)
void getScatterIndices_index (int blockIndex, int elemIndex, int interleaveStrategy, int *scatterIndices, int *blkScatterIndices, int *blkSizes)
int getNumSharedNodes ()
const int * getSharedNodeNumbers ()
const int * getSharedNodeProcs (int nodeNumber)
int getNumSharingProcs (int nodeNumber)
int getNumSubdomains (int nodeNumber)
int * getSubdomainList (int nodeNumber)
int translateToReducedNodeNumber (int nodeNumber, int proc)
int getAssociatedNodeNumber (int eqnNumber)
int getAssociatedFieldID (int eqnNumber)
bool isExactlyBlkEqn (int ptEqn)
int ptEqnToBlkEqn (int ptEqn)
int getOffsetIntoBlkEqn (int blkEqn, int ptEqn)
int getBlkEqnSize (int blkEqn)
int getNumActiveNodes ()
NodeDatabasegetNodeDatabase ()
std::map< GlobalID, int > & getActiveNodeIDList ()
std::vector< int > & getGlobalNodeOffsets ()
std::vector< int > & getGlobalEqnOffsets ()
std::vector< int > & getGlobalBlkEqnOffsets ()
NodeCommMgrgetNodeCommMgr ()
EqnCommMgrgetEqnCommMgr ()
void initializeEqnCommMgr ()
void getEqnInfo (int &numGlobalEqns, int &numLocalEqns, int &localStartRow, int &localEndRow)
int getEqnNumbers (GlobalID ID, int idType, int fieldID, int &numEqns, int *eqnNumbers)
int getEqnNumbers (int numIDs, const GlobalID *IDs, int idType, int fieldID, int &numEqns, int *eqnNumbers)
void getEqnBlkInfo (int &numGlobalEqnBlks, int &numLocalEqnBlks, int &localBlkOffset)
snl_fei::PointBlockMapgetBlkEqnMapper ()
void destroyMatIndices ()
int getNumMultConstRecords ()
std::map< GlobalID, snl_fei::Constraint<
GlobalID > * > & 
getMultConstRecords ()
int getMultConstRecord (int CRID, snl_fei::Constraint< GlobalID > *&multCR)
int getNumPenConstRecords ()
std::map< GlobalID, snl_fei::Constraint<
GlobalID > * > & 
getPenConstRecords ()
int getPenConstRecord (int CRID, snl_fei::Constraint< GlobalID > *&penCR)
void addSlaveVariable (SlaveVariable *svar)
int calculateSlaveEqns (MPI_Comm comm)
fei::FillableMatgetSlaveDependencies ()
EqnBuffergetSlaveEqns ()
int numSlaveEquations ()
bool isSlaveEqn (int eqn)
bool translateToReducedEqn (int eqn, int &reducedEqn)
int translateToReducedEqns (EqnCommMgr &eqnCommMgr)
int translateToReducedEqns (EqnBuffer &eqnBuf)
int translateToReducedEqns (ProcEqns &procEqns)
int translateMatToReducedEqns (fei::CSRMat &mat)
int translateFromReducedEqn (int reducedEqn)
int getMasterEqnNumbers (int slaveEqn, std::vector< int > *&masterEqns)
int getMasterEqnCoefs (int slaveEqn, std::vector< double > *&masterCoefs)
int getMasterEqnRHS (int slaveEqn, double &rhsValue)
int getNumGlobalEqns ()
int getNumLocalEqns ()
int getFirstLocalEqn ()
int getLastLocalEqn ()
int getFirstReducedEqn ()
int getLastReducedEqn ()
int getNumGlobalEqnBlks ()
int getNumLocalEqnBlks ()
int getNumLocalReducedEqnBlks ()
int getGlobalMaxBlkSize ()
int getNumLocalReducedEqns ()
int getMatrixRowLengths (std::vector< int > &rowLengths)
int getMatrixStructure (int **colIndices, std::vector< int > &rowLengths)
int getMatrixStructure (int **ptColIndices, std::vector< int > &ptRowLengths, int **blkColIndices, int *blkIndices_1D, std::vector< int > &blkRowLengths, std::vector< int > &numPtRowsPerBlkRow)
int calcTotalNumElemDOF ()
int calcNumMultCREqns ()
MPI_Comm getCommunicator () const

Static Public Member Functions

static int removeCouplings (EqnBuffer &eqnbuf, int &levelsOfCoupling)

Detailed Description

The SNL_FEI_Structure class is a container for the data that makes up the structure of a finite element problem. It contains things like the FieldDatabase, NodeDatabase, ConnectivityTable, etc.

This class is the primary class that implements the general "FEI initialization phase", where the user passes all structure-defining data, which ends up being translated into a corresponding sparse matrix structure.

The problem structure is initialized gradually by calling the 'init' functions in this class. They also exist in the FEI class, where they are documented.

Once all structure-defining data has been passed, the process is completed by calling the initComplete function.

Definition at line 41 of file SNL_FEI_Structure.hpp.


Constructor & Destructor Documentation

SNL_FEI_Structure::SNL_FEI_Structure ( MPI_Comm  comm  ) 

Constructor.

Parameters:
comm MPI_Communicator
name String by which this structure instance may be referred to.
debugOutputLevel Determines whether this object will produce a file containing a log of debug output information.
path If debugOutputLevel is not zero, the debug log file will be placed in the location specified by path.

Definition at line 50 of file SNL_FEI_Structure.cpp.

SNL_FEI_Structure::~SNL_FEI_Structure (  )  [virtual]

Destructor.

Definition at line 186 of file SNL_FEI_Structure.cpp.


Member Function Documentation

int SNL_FEI_Structure::parameters ( int  numParams,
const char *const *  paramStrings 
)

Set parameters on this object. Currently three parameters are recognized: "debugOutput 'path'" where 'path' is the path to the location where debug-log files will be produced.
"debugOutputOff" which will turn off debug-output.
"checkSharedNodes" which specifies that a 'sanity-check' should be done to make sure that the shared-node information is globally consistent, before any communication is attempted which depends on the consistency of that information.
"sharedNodeOwnership <string>" where <string> can be either LowNumberedProc or ProcWithLocalElem. LowNumberedProc specifies that the lowest-numbered sharing processor will be the owner of shared nodes, while ProcWithLocalElem specifies that ownership will be given to the proc with a local element containing the shared node, if not all sharing procs have local elements containing the shared node.

Definition at line 145 of file SNL_FEI_Structure.cpp.

const int* SNL_FEI_Structure::getFieldIDsPtr (  )  [inline, virtual]

implementation of Lookup::getFieldIDsPtr

Implements Lookup.

Definition at line 122 of file SNL_FEI_Structure.hpp.

const int* SNL_FEI_Structure::getFieldSizesPtr (  )  [inline, virtual]

implementation of Lookup::getFieldSizesPtr

Implements Lookup.

Definition at line 133 of file SNL_FEI_Structure.hpp.

int SNL_FEI_Structure::getNumFields (  )  [inline, virtual]

implementation of Lookup::getNumFields

Implements Lookup.

Definition at line 144 of file SNL_FEI_Structure.hpp.

int SNL_FEI_Structure::getFieldSize ( int  fieldID  )  [inline, virtual]

implementation of Lookup::getFieldSize

Implements Lookup.

Definition at line 147 of file SNL_FEI_Structure.hpp.

bool SNL_FEI_Structure::isInLocalElement ( int  nodeNumber  )  [virtual]

implementation of Lookup::isInLocalElement

Implements Lookup.

Definition at line 788 of file SNL_FEI_Structure.cpp.

const int * SNL_FEI_Structure::getNumFieldsPerNode ( GlobalID  blockID  )  [virtual]

Given a blockID, return a pointer to a list (of length numNodesPerElem) of numFieldsPerNode.

Parameters:
blockID identifier of the elem-block in question

Implements Lookup.

Definition at line 272 of file SNL_FEI_Structure.cpp.

const int *const * SNL_FEI_Structure::getFieldIDsTable ( GlobalID  blockID  )  [virtual]

Given a blockID, return a pointer to a table, (num-rows == numNodesPerElem, row-length[i] == fieldsPerNode[i]) containing the fieldIDs at each node of elements in that element-block.

Parameters:
blockID identifier of the elem-block in question

Implements Lookup.

Definition at line 282 of file SNL_FEI_Structure.cpp.

int SNL_FEI_Structure::getEqnNumber ( int  nodeNumber,
int  fieldID 
) [virtual]

Given a nodeNumber/fieldID pair, return the associated first equation- number.

Returns:
eqnNumber

Implements Lookup.

Definition at line 317 of file SNL_FEI_Structure.cpp.

int SNL_FEI_Structure::getOwnerProcForEqn ( int  eqn  ) 

Given a global equation number, return the processor on which that equation resides.

Parameters:
eqn Global 0-based equation number.
Returns:
proc Owning processor. If eqn is out of range (less than 0 or greater than global-number-of-equations) then -1 is returned.

Definition at line 342 of file SNL_FEI_Structure.cpp.

int SNL_FEI_Structure::getNumElemBlocks (  )  [inline, virtual]

Returns the number of element-blocks in the (local) finite-element problem.

Implements Lookup.

Definition at line 180 of file SNL_FEI_Structure.hpp.

const GlobalID* SNL_FEI_Structure::getElemBlockIDs (  )  [inline, virtual]

Return a pointer to the list (of length numElemBlocks) containing the element-block identifiers for the (local) finite-element problem.

Implements Lookup.

Definition at line 181 of file SNL_FEI_Structure.hpp.

void SNL_FEI_Structure::getElemBlockInfo ( GlobalID  blockID,
int &  interleaveStrategy,
int &  lumpingStrategy,
int &  numElemDOF,
int &  numElements,
int &  numNodesPerElem,
int &  numEqnsPerElem 
) [virtual]

Given a blockID, provide several pieces of element-block information.

Parameters:
interleaveStrategy element-equation ordering: 0 => node-major, 1 => field-major
lumpingStrategy element-matrices may be lumped if they're mass matrices, 0 => not lumped, 1 => lumped
numElemDOF number of element-dof at each element in this block
numElements number of elements in this block
numNodesPerElem number of nodes connected to each element in this block
numEqnsPerElem number of scalar equations at each element in this block

Implements Lookup.

Definition at line 292 of file SNL_FEI_Structure.cpp.

int SNL_FEI_Structure::getBlockDescriptor_index ( int  index,
BlockDescriptor *&  block 
)

Given an index, return the corresponding block-descriptor.

Returns:
0 if successful, non-zero if index out of range, etc.

Definition at line 2808 of file SNL_FEI_Structure.cpp.

int SNL_FEI_Structure::getIndexOfBlock ( GlobalID  blockID  ) 

Given a blockID, return its index.

Definition at line 2801 of file SNL_FEI_Structure.cpp.

int SNL_FEI_Structure::getNumSharedNodes (  )  [inline, virtual]

Return the number of local nodes that are shared by multiple processors

Implements Lookup.

Definition at line 233 of file SNL_FEI_Structure.hpp.

const int* SNL_FEI_Structure::getSharedNodeNumbers (  )  [inline, virtual]

Return a pointer to the list of shared nodeNumbers

Implements Lookup.

Definition at line 235 of file SNL_FEI_Structure.hpp.

const int* SNL_FEI_Structure::getSharedNodeProcs ( int  nodeNumber  )  [inline, virtual]

Given a shared nodeNumber, return a pointer to the list of sharing procs.

Parameters:
nodeNumber The subject of the query. Function returns NULL if 'nodeNumber' is not a shared node.

Implements Lookup.

Definition at line 239 of file SNL_FEI_Structure.hpp.

int SNL_FEI_Structure::getNumSharingProcs ( int  nodeNumber  )  [inline, virtual]

Given a shared nodeNumber, return the number of processors that share it.

Parameters:
nodeNumber Function returns -1 if 'nodeNumber' is not a shared node.

Implements Lookup.

Definition at line 245 of file SNL_FEI_Structure.hpp.

int SNL_FEI_Structure::getNumSubdomains ( int  nodeNumber  )  [inline, virtual]

Given a nodeNumber, return the number of subdomains that contain this node. subdomains correspond to processors. The number of subdomains that contain a node does not always equal the number of processors that share a node. There are two kinds of "sharing" -- the "normal" kind, where a node is shared because it is connected to elements that reside on more than one processor, and the "wierd" kind where nodes are considered shared simply because of being in cross-processor constraints. This function describes how many processors share this node in the "normal" sense. Thus, in general, this relationship holds: getNumSubdomains(nodeNum) <= getNumSharingProcs(nodeNum)

Parameters:
nodeNumber 
Returns:
numSubdomains

Implements Lookup.

Definition at line 251 of file SNL_FEI_Structure.hpp.

int* SNL_FEI_Structure::getSubdomainList ( int  nodeNumber  )  [inline, virtual]

Given a nodeNumber, return a list of the subdomains that contain this node. This is the list of subdomains that's counted by the method 'getNumSubdomains' above.

Parameters:
nodeNumber 
Returns:
pointer to list of subdomains (processor ranks). NULL if the specified nodeNumber is not found.

Implements Lookup.

Definition at line 259 of file SNL_FEI_Structure.hpp.

int SNL_FEI_Structure::getAssociatedNodeNumber ( int  eqnNumber  )  [inline, virtual]

implementation of Lookup::getAssociatedNodeNumber

Implements Lookup.

Definition at line 273 of file SNL_FEI_Structure.hpp.

int SNL_FEI_Structure::getAssociatedFieldID ( int  eqnNumber  )  [inline, virtual]

implementation of Lookup::getAssociatedFieldID

Implements Lookup.

Definition at line 285 of file SNL_FEI_Structure.hpp.

bool SNL_FEI_Structure::isExactlyBlkEqn ( int  ptEqn  )  [inline, virtual]

Query whether a pt-eqn corresponds exactly to a blk-eqn. in other words, is pt-eqn the first point equation in a block-equation.

Parameters:
ptEqn 

Implements Lookup.

Definition at line 295 of file SNL_FEI_Structure.hpp.

int SNL_FEI_Structure::ptEqnToBlkEqn ( int  ptEqn  )  [inline, virtual]

Given a pt-eqn, return the corresponding blk-eqn.

Parameters:
ptEqn 

Implements Lookup.

Definition at line 299 of file SNL_FEI_Structure.hpp.

int SNL_FEI_Structure::getOffsetIntoBlkEqn ( int  blkEqn,
int  ptEqn 
) [inline, virtual]

Given a blk-eqn and a pt-eqn, return the pt-eqn's offset into the blk-eqn (i.e., distance from the 'beginning' of the blk-eqn)

Parameters:
blkEqn 
ptEqn 

Implements Lookup.

Definition at line 303 of file SNL_FEI_Structure.hpp.

int SNL_FEI_Structure::getBlkEqnSize ( int  blkEqn  )  [inline, virtual]

Given a blk-eqn, return the 'size', or number of pt-eqns corresponding to it.

Parameters:
blkEqn 

Implements Lookup.

Definition at line 307 of file SNL_FEI_Structure.hpp.

bool SNL_FEI_Structure::isSlaveEqn ( int  eqn  ) 

Given a "global" equation number, return true if it is a slave equation.

Definition at line 3590 of file SNL_FEI_Structure.cpp.

bool SNL_FEI_Structure::translateToReducedEqn ( int  eqn,
int &  reducedEqn 
)

Given a "global" equation number, return the corresponding equation number in the "reduced" equation space. This is a trivial one-to-one mapping unless there are slave equations. If there are slave equations, then the number of 'reduced' equations is reduced by num-slave-eqns, and any particular global equation number is reduced by the number of slave equations that are smaller than it.

Returns:
true if eqn is a slave-equation, false otherwise.

Definition at line 3603 of file SNL_FEI_Structure.cpp.

int SNL_FEI_Structure::translateToReducedEqns ( EqnCommMgr eqnCommMgr  ) 

Given an EqnCommMgr object with global equation numbers, translate all of its indices (row-numbers and column-indices) to the "reduced" equation space.

Definition at line 2059 of file SNL_FEI_Structure.cpp.

int SNL_FEI_Structure::translateToReducedEqns ( EqnBuffer eqnBuf  ) 

Given an EqnBuffer object with global equation numbers, translate all of its indices (row-numbers and column-indices) to the "reduced" equation space.

Definition at line 2072 of file SNL_FEI_Structure.cpp.

int SNL_FEI_Structure::translateToReducedEqns ( ProcEqns procEqns  ) 

Given a ProcEqns object with global equation numbers, translate all of its indices (row-numbers and column-indices) to the "reduced" equation space.

Definition at line 2094 of file SNL_FEI_Structure.cpp.

int SNL_FEI_Structure::translateMatToReducedEqns ( fei::CSRMat mat  ) 

Given a CSRMat object with global equation numbers, translate all of its indices (row-numbers and column-indices) to the "reduced" equation space.

Definition at line 2112 of file SNL_FEI_Structure.cpp.

int SNL_FEI_Structure::translateFromReducedEqn ( int  reducedEqn  ) 

Given an "Reduced" equation number, translate it to the "global" numbering, which is the numbering that includes slave equations. This is the inverse of the 'translateToReducedEqn' function above.

Returns:
eqn

Definition at line 3626 of file SNL_FEI_Structure.cpp.

int SNL_FEI_Structure::getMasterEqnNumbers ( int  slaveEqn,
std::vector< int > *&  masterEqns 
)

Given a slave equation, fill a std::vector with the equation-numbers upon which the slave depends.

Parameters:
slaveEqn 
masterEqns Output. NULL if slaveEqn is not a slave equation.
Returns:
error-code

Definition at line 3647 of file SNL_FEI_Structure.cpp.

int SNL_FEI_Structure::getMasterEqnCoefs ( int  slaveEqn,
std::vector< double > *&  masterCoefs 
)

Given a slave equation, fill a std::vector with the coefficients of the equations upon which the slave depends.

Parameters:
slaveEqn 
masterCoefs Output. NULL if slaveEqn is not a slave equation.
Returns:
error-code

Definition at line 3670 of file SNL_FEI_Structure.cpp.

int SNL_FEI_Structure::getMasterEqnRHS ( int  slaveEqn,
double &  rhsValue 
)

Given a slave equation, provide the rhs-value associated with the master equation that the slave is defined by.

Parameters:
slaveEqn 
rhsValue Output. Not referenced if slaveEqn is not a slave equation.
Returns:
error-code 0 if successful, -1 if slaveEqn is not a slave.

Definition at line 3693 of file SNL_FEI_Structure.cpp.


The documentation for this class was generated from the following files:
Generated on Mon Jul 12 09:31:28 2010 for FEI by  doxygen 1.4.7