FEI  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
SNL_FEI_Structure Class Reference

#include <SNL_FEI_Structure.hpp>

Inheritance diagram for SNL_FEI_Structure:
Inheritance graph
[legend]

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 ()
 

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 43 of file SNL_FEI_Structure.hpp.

Constructor & Destructor Documentation

SNL_FEI_Structure::SNL_FEI_Structure ( MPI_Comm  comm)

Constructor.

Parameters
commMPI_Communicator
nameString by which this structure instance may be referred to.
debugOutputLevelDetermines whether this object will produce a file containing a log of debug output information.
pathIf 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.

SNL_FEI_Structure::~SNL_FEI_Structure ( )
virtual

Destructor.

Definition at line 191 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 147 of file SNL_FEI_Structure.cpp.

const int* SNL_FEI_Structure::getFieldIDsPtr ( )
inlinevirtual

implementation of Lookup::getFieldIDsPtr

Implements Lookup.

Definition at line 126 of file SNL_FEI_Structure.hpp.

const int* SNL_FEI_Structure::getFieldSizesPtr ( )
inlinevirtual

implementation of Lookup::getFieldSizesPtr

Implements Lookup.

Definition at line 137 of file SNL_FEI_Structure.hpp.

int SNL_FEI_Structure::getNumFields ( )
inlinevirtual

implementation of Lookup::getNumFields

Implements Lookup.

Definition at line 148 of file SNL_FEI_Structure.hpp.

int SNL_FEI_Structure::getFieldSize ( int  fieldID)
inlinevirtual

implementation of Lookup::getFieldSize

Implements Lookup.

Definition at line 151 of file SNL_FEI_Structure.hpp.

bool SNL_FEI_Structure::isInLocalElement ( int  nodeNumber)
virtual

implementation of Lookup::isInLocalElement

Implements Lookup.

Definition at line 811 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
blockIDidentifier of the elem-block in question

Implements Lookup.

Definition at line 277 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
blockIDidentifier of the elem-block in question

Implements Lookup.

Definition at line 287 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 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.

Parameters
eqnGlobal 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 347 of file SNL_FEI_Structure.cpp.

int SNL_FEI_Structure::getNumElemBlocks ( )
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.

const GlobalID* SNL_FEI_Structure::getElemBlockIDs ( )
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.

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
interleaveStrategyelement-equation ordering: 0 => node-major, 1 => field-major
lumpingStrategyelement-matrices may be lumped if they're mass matrices, 0 => not lumped, 1 => lumped
numElemDOFnumber of element-dof at each element in this block
numElementsnumber of elements in this block
numNodesPerElemnumber of nodes connected to each element in this block
numEqnsPerElemnumber 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.

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

Definition at line 2854 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 2847 of file SNL_FEI_Structure.cpp.

int SNL_FEI_Structure::getBlockID ( unsigned  index) const
inline

Given an index, return a blockID. Returns -1 if index out of range.

Definition at line 207 of file SNL_FEI_Structure.hpp.

int SNL_FEI_Structure::getNumSharedNodes ( )
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.

const int* SNL_FEI_Structure::getSharedNodeNumbers ( )
inlinevirtual

Return a pointer to the list of shared nodeNumbers

Implements Lookup.

Definition at line 248 of file SNL_FEI_Structure.hpp.

const int* SNL_FEI_Structure::getSharedNodeProcs ( int  nodeNumber)
inlinevirtual

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

Parameters
nodeNumberThe 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.

int SNL_FEI_Structure::getNumSharingProcs ( int  nodeNumber)
inlinevirtual

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

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

Implements Lookup.

Definition at line 258 of file SNL_FEI_Structure.hpp.

int SNL_FEI_Structure::getNumSubdomains ( int  nodeNumber)
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)

Parameters
nodeNumber
Returns
numSubdomains

Implements Lookup.

Definition at line 264 of file SNL_FEI_Structure.hpp.

int* SNL_FEI_Structure::getSubdomainList ( int  nodeNumber)
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.

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

Implements Lookup.

Definition at line 272 of file SNL_FEI_Structure.hpp.

int SNL_FEI_Structure::getAssociatedNodeNumber ( int  eqnNumber)
inlinevirtual

implementation of Lookup::getAssociatedNodeNumber

Implements Lookup.

Definition at line 286 of file SNL_FEI_Structure.hpp.

int SNL_FEI_Structure::getAssociatedFieldID ( int  eqnNumber)
inlinevirtual

implementation of Lookup::getAssociatedFieldID

Implements Lookup.

Definition at line 298 of file SNL_FEI_Structure.hpp.

bool SNL_FEI_Structure::isExactlyBlkEqn ( int  ptEqn)
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.

Parameters
ptEqn

Implements Lookup.

Definition at line 308 of file SNL_FEI_Structure.hpp.

int SNL_FEI_Structure::ptEqnToBlkEqn ( int  ptEqn)
inlinevirtual

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

Parameters
ptEqn

Implements Lookup.

Definition at line 312 of file SNL_FEI_Structure.hpp.

int SNL_FEI_Structure::getOffsetIntoBlkEqn ( int  blkEqn,
int  ptEqn 
)
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)

Parameters
blkEqn
ptEqn

Implements Lookup.

Definition at line 316 of file SNL_FEI_Structure.hpp.

int SNL_FEI_Structure::getBlkEqnSize ( int  blkEqn)
inlinevirtual

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

Parameters
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 3644 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 3657 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 2096 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 2109 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 2131 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 2149 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 3680 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
masterEqnsOutput. NULL if slaveEqn is not a slave equation.
Returns
error-code

Definition at line 3701 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
masterCoefsOutput. NULL if slaveEqn is not a slave equation.
Returns
error-code

Definition at line 3724 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
rhsValueOutput. 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 3747 of file SNL_FEI_Structure.cpp.


The documentation for this class was generated from the following files: