FEI
Version of the Day
|
#include <SNL_FEI_Structure.hpp>
Public Member Functions | |
SNL_FEI_Structure (MPI_Comm comm) | |
virtual | ~SNL_FEI_Structure () |
int | parameters (int numParams, const char *const *paramStrings) |
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 | getBlockDescriptor_index (int index, BlockDescriptor *&block) |
int | getIndexOfBlock (GlobalID blockID) const |
int | getBlockID (unsigned index) const |
int | getNumSharedNodes () |
const int * | getSharedNodeNumbers () |
const int * | getSharedNodeProcs (int nodeNumber) |
int | getNumSharingProcs (int nodeNumber) |
int | getNumSubdomains (int nodeNumber) |
int * | getSubdomainList (int nodeNumber) |
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) |
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) |
Public Member Functions inherited from Lookup | |
virtual | ~Lookup () |
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 43 of file SNL_FEI_Structure.hpp.
SNL_FEI_Structure::SNL_FEI_Structure | ( | MPI_Comm | comm | ) |
Constructor.
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 49 of file SNL_FEI_Structure.cpp.
|
virtual |
Destructor.
Definition at line 191 of file SNL_FEI_Structure.cpp.
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 147 of file SNL_FEI_Structure.cpp.
|
inlinevirtual |
implementation of Lookup::getFieldIDsPtr
Implements Lookup.
Definition at line 126 of file SNL_FEI_Structure.hpp.
|
inlinevirtual |
implementation of Lookup::getFieldSizesPtr
Implements Lookup.
Definition at line 137 of file SNL_FEI_Structure.hpp.
|
inlinevirtual |
implementation of Lookup::getNumFields
Implements Lookup.
Definition at line 148 of file SNL_FEI_Structure.hpp.
|
inlinevirtual |
implementation of Lookup::getFieldSize
Implements Lookup.
Definition at line 151 of file SNL_FEI_Structure.hpp.
|
virtual |
implementation of Lookup::isInLocalElement
Implements Lookup.
Definition at line 811 of file SNL_FEI_Structure.cpp.
|
virtual |
Given a blockID, return a pointer to a list (of length numNodesPerElem) of numFieldsPerNode.
blockID | identifier of the elem-block in question |
Implements Lookup.
Definition at line 277 of file SNL_FEI_Structure.cpp.
|
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.
blockID | identifier of the elem-block in question |
Implements Lookup.
Definition at line 287 of file SNL_FEI_Structure.cpp.
|
virtual |
Given a nodeNumber/fieldID pair, return the associated first equation- number.
Implements Lookup.
Definition at line 322 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.
eqn | Global 0-based equation number. |
Definition at line 347 of file SNL_FEI_Structure.cpp.
|
inlinevirtual |
Return the number of element-blocks in the (local) finite-element problem.
Implements Lookup.
Definition at line 187 of file SNL_FEI_Structure.hpp.
|
inlinevirtual |
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 188 of file SNL_FEI_Structure.hpp.
|
virtual |
Given a blockID, provide several pieces of element-block information.
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 297 of file SNL_FEI_Structure.cpp.
int SNL_FEI_Structure::getBlockDescriptor_index | ( | int | index, |
BlockDescriptor *& | block | ||
) |
Given an index, return the corresponding block-descriptor.
Definition at line 2853 of file SNL_FEI_Structure.cpp.
int SNL_FEI_Structure::getIndexOfBlock | ( | GlobalID | blockID | ) | const |
Given a blockID, return its index. Returns -1 if blockID not found.
Definition at line 2846 of file SNL_FEI_Structure.cpp.
|
inline |
Given an index, return a blockID. Returns -1 if index out of range.
Definition at line 207 of file SNL_FEI_Structure.hpp.
|
inlinevirtual |
Return the number of local nodes that are shared by multiple processors
Implements Lookup.
Definition at line 246 of file SNL_FEI_Structure.hpp.
|
inlinevirtual |
Return a pointer to the list of shared nodeNumbers
Implements Lookup.
Definition at line 248 of file SNL_FEI_Structure.hpp.
|
inlinevirtual |
Given a shared nodeNumber, return a pointer to the list of sharing procs.
nodeNumber | The subject of the query. Function returns NULL if 'nodeNumber' is not a shared node. |
Implements Lookup.
Definition at line 252 of file SNL_FEI_Structure.hpp.
|
inlinevirtual |
Given a shared nodeNumber, return the number of processors that share it.
nodeNumber | Function returns -1 if 'nodeNumber' is not a shared node. |
Implements Lookup.
Definition at line 258 of file SNL_FEI_Structure.hpp.
|
inlinevirtual |
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)
nodeNumber |
Implements Lookup.
Definition at line 264 of file SNL_FEI_Structure.hpp.
|
inlinevirtual |
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.
nodeNumber |
Implements Lookup.
Definition at line 272 of file SNL_FEI_Structure.hpp.
|
inlinevirtual |
implementation of Lookup::getAssociatedNodeNumber
Implements Lookup.
Definition at line 286 of file SNL_FEI_Structure.hpp.
|
inlinevirtual |
implementation of Lookup::getAssociatedFieldID
Implements Lookup.
Definition at line 298 of file SNL_FEI_Structure.hpp.
|
inlinevirtual |
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.
ptEqn |
Implements Lookup.
Definition at line 308 of file SNL_FEI_Structure.hpp.
|
inlinevirtual |
Given a pt-eqn, return the corresponding blk-eqn.
ptEqn |
Implements Lookup.
Definition at line 312 of file SNL_FEI_Structure.hpp.
|
inlinevirtual |
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)
blkEqn | |
ptEqn |
Implements Lookup.
Definition at line 316 of file SNL_FEI_Structure.hpp.
|
inlinevirtual |
Given a blk-eqn, return the 'size', or number of pt-eqns corresponding to it.
blkEqn |
Implements Lookup.
Definition at line 320 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 3643 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.
Definition at line 3656 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 2095 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 2108 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 2130 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 2148 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.
Definition at line 3679 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.
slaveEqn | |
masterEqns | Output. NULL if slaveEqn is not a slave equation. |
Definition at line 3700 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.
slaveEqn | |
masterCoefs | Output. NULL if slaveEqn is not a slave equation. |
Definition at line 3723 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.
slaveEqn | |
rhsValue | Output. Not referenced if slaveEqn is not a slave equation. |
Definition at line 3746 of file SNL_FEI_Structure.cpp.