FEI Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
FEData Class Reference

#include <FEData.hpp>

Inheritance diagram for FEData:
Inheritance graph
[legend]

Public Member Functions

 FEData (MPI_Comm comm)
 
virtual ~FEData ()
 
int parameters (int numParams, char **params)
 
int setLookup (Lookup &lookup)
 
int describeStructure (int numElemBlocks, const int *numElemsPerBlock, const int *numNodesPerElem, const int *elemMatrixSizePerBlock, int totalNumNodes, int numSharedNodes, int numMultCRs)
 
int setConnectivity (int elemBlockID, int elemID, int numNodes, const int *nodeNumbers, const int *numDofPerNode, const int *dof_ids)
 
int setElemMatrix (int elemBlockID, int elemID, int numNodes, const int *nodeNumbers, const int *dofPerNode, const int *dof_ids, const double *const *coefs)
 
int setElemVector (int elemBlockID, int elemID, int numNodes, const int *nodeNumbers, const int *dofPerNode, const int *dof_ids, const double *coefs)
 
int setDirichletBCs (int numBCs, const int *nodeNumbers, const int *dofOffsets, const double *values)
 
int sumIntoMatrix (int numRowNodes, const int *rowNodeNumbers, const int *rowDofOffsets, const int *numColNodesPerRow, const int *colNodeNumbers, const int *colDofOffsets, const double *coefs)
 
int sumIntoRHSVector (int numNodes, const int *nodeNumbers, const int *dofOffsets, const double *coefs)
 
int putIntoRHSVector (int numNodes, const int *nodeNumbers, const int *dofOffsets, const double *coefs)
 
int loadComplete ()
 
int launchSolver (int &solveStatus, int &iterations)
 
int reset ()
 
int resetRHSVector ()
 
int resetMatrix ()
 
int deleteConstraints ()
 
int getSolnEntry (int nodeNumber, int dofOffset, double &value)
 
int getMultiplierSoln (int CRID, double &lagrangeMultiplier)
 
int putNodalFieldData (int fieldID, int fieldSize, int numNodes, const int *nodeNumbers, const double *coefs)
 
int setMultiplierCR (int CRID, int numNodes, const int *nodeNumbers, const int *dofOffsets, const double *coefWeights, double rhsValue)
 
int setPenaltyCR (int CRID, int numNodes, const int *nodeNumbers, const int *dofOffsets, const double *coefWeights, double penaltyValue, double rhsValue)
 
- Public Member Functions inherited from FiniteElementData
virtual ~FiniteElementData ()
 

Private Member Functions

int setDebugLog (int debugOutputLevel, const char *path)
 

Private Attributes

MPI_Comm comm_
 
int numProcs_
 
int localProc_
 
int debugOutputLevel_
 
char * dbgPath_
 
FEI_OSTREAMdbgOStreamPtr_
 
bool dbgFileOpened_
 
FEI_OFSTREAMdbgFStreamPtr_
 

Detailed Description

Simply a test harness to use for checking the FEI layer's usage of the FiniteElementData interface.

Definition at line 28 of file FEData.hpp.

Constructor & Destructor Documentation

FEData::FEData ( MPI_Comm  comm)
inline

Constructor.

Definition at line 31 of file FEData.hpp.

References comm_, localProc_, MPI_Abort, MPI_SUCCESS, numProcs_, and setDebugLog().

virtual FEData::~FEData ( )
inlinevirtual

Definition at line 46 of file FEData.hpp.

References dbgFileOpened_, dbgFStreamPtr_, dbgOStreamPtr_, and dbgPath_.

Member Function Documentation

int FEData::parameters ( int  numParams,
char **  params 
)
virtual

For setting argc/argv style parameters.

Parameters
numParamsNumber of strings in the params argument
paramsA list of strings which will usually contain space-separated key-value pairs. Example: "debugOutput /usr/users/me/work_dir"

Implements FiniteElementData.

Definition at line 20 of file FEData.cpp.

References dbgOut, FEI_ENDL, snl_fei::getParamValue(), and setDebugLog().

int FEData::setLookup ( Lookup lookup)
inlinevirtual

Supply the FiniteElementData implementation with an object (created and owned by the caller) that can be used to obtain various information about problem layout, shared finite-element nodes, etc. For details, see the documentation for the Lookup interface.

Parameters
lookupInput. Reference to an implementation of the Lookup interface

Implements FiniteElementData.

Definition at line 68 of file FEData.hpp.

References dbgOut, and FEI_ENDL.

int FEData::describeStructure ( int  numElemBlocks,
const int *  numElemsPerBlock,
const int *  numNodesPerElem,
const int *  elemMatrixSizePerBlock,
int  totalNumNodes,
int  numSharedNodes,
int  numMultCRs 
)
inlinevirtual

For describing the general structure of the finite-element problem that is to be assembled.

Implements FiniteElementData.

Definition at line 78 of file FEData.hpp.

References dbgOut, and FEI_ENDL.

int FEData::setConnectivity ( int  elemBlockID,
int  elemID,
int  numNodes,
const int *  nodeNumbers,
const int *  numDofPerNode,
const int *  dof_ids 
)
inlinevirtual

For passing element-connectivity arrays.

Implements FiniteElementData.

Definition at line 100 of file FEData.hpp.

References dbgOut, and FEI_ENDL.

int FEData::setElemMatrix ( int  elemBlockID,
int  elemID,
int  numNodes,
const int *  nodeNumbers,
const int *  numDofPerNode,
const int *  dof_ids,
const double *const *  coefs 
)
inlinevirtual

For passing element-stiffness arrays.

Parameters
elemBlockIDIdentifier for the element-block that these elements belong to.
elemIDLocally zero-based identifier for this element.
numNodesNumber of nodes on this element.
nodeNumbersList of length numNodes
numDofPerNodeList of length numNodes.
dof_idsList of length sum(numDofPerNode[i])
coefsC-style table (list of pointers). Each row of the table is of length sum(dofPerNode[i]), and that is also the number of rows.

Implements FiniteElementData.

Definition at line 126 of file FEData.hpp.

References dbgOut, and FEI_ENDL.

int FEData::setElemVector ( int  elemBlockID,
int  elemID,
int  numNodes,
const int *  nodeNumbers,
const int *  numDofPerNode,
const int *  dof_ids,
const double *  coefs 
)
inlinevirtual

For passing element-load vectors.

Parameters
elemBlockIDIdentifier for the element-block that this element belongs to.
elemIDLocally zero-based identifier for this element.
numNodesNumber of nodes on this element.
nodeNumbers
numDofPerNode
dof_ids
coefsPacked list, length sum(dofPerNode[i]).

Implements FiniteElementData.

Definition at line 161 of file FEData.hpp.

References dbgOut, and FEI_ENDL.

int FEData::setDirichletBCs ( int  numBCs,
const int *  nodeNumbers,
const int *  dof_ids,
const double *  values 
)
inlinevirtual

Specify dirichlet boundary-condition values.

Parameters
numBCsNumber of boundary-condition values.
nodeNumbersList of length numBCs.
dof_idsList of length numBCs.
valuesList of length numBCs.

Implements FiniteElementData.

Definition at line 191 of file FEData.hpp.

References dbgOut, and FEI_ENDL.

int FEData::sumIntoMatrix ( int  numRowNodes,
const int *  rowNodeNumbers,
const int *  row_dof_ids,
const int *  numColNodesPerRow,
const int *  colNodeNumbers,
const int *  col_dof_ids,
const double *  coefs 
)
inlinevirtual

Sum coefficients into the matrix. This may be used to pass a dense rectangular block of coefs, or a diagonal band of coefs, or an arbitrary sparse block of coefs.

Parameters
numRowNodes
rowNodeNumbersList of length numRowNodes
row_dof_idsList of length numRowNodes
numColNodesPerRowList of length numRowNodes
colNodeNumbersList of length sum(numColNodesPerRow[i])
col_dof_idsList of length sum(numColNodesPerRow[i])
coefsList of length sum(numColNodesPerRow[i])

Implements FiniteElementData.

Definition at line 206 of file FEData.hpp.

References dbgOut, and FEI_ENDL.

int FEData::sumIntoRHSVector ( int  numNodes,
const int *  nodeNumbers,
const int *  dofOffsets,
const double *  coefs 
)
inlinevirtual

Implements FiniteElementData.

Definition at line 230 of file FEData.hpp.

References dbgOut, and FEI_ENDL.

int FEData::putIntoRHSVector ( int  numNodes,
const int *  nodeNumbers,
const int *  dofOffsets,
const double *  coefs 
)
inlinevirtual

Implements FiniteElementData.

Definition at line 244 of file FEData.hpp.

References dbgOut, and FEI_ENDL.

int FEData::loadComplete ( )
inlinevirtual

Function called to signal to the FiniteElementData implementation that data-loading is complete and any synchronization or other final operations may be performed now. This is a collective function, must be called by all processors.

Returns
error-code 0 if successful

Implements FiniteElementData.

Definition at line 258 of file FEData.hpp.

References dbgOut, and FEI_ENDL.

int FEData::launchSolver ( int &  solveStatus,
int &  iterations 
)
inlinevirtual

Function called to request the launching of the linear solver.

Parameters
solveStatusOutput, should indicate the status of the solve. A successful solve is usually indicated by a value of 0.
iterationsOutput, how many iterations were performed.
Returns
error-code, 0 if convergence tolerance was achieved within the specified maximum number of iterations. If error return is non-zero, the calling application will be expected to check solveStatus, and consult the solver-library's documentation to figure out exactly what happened.

Implements FiniteElementData.

Definition at line 274 of file FEData.hpp.

References dbgOut, and FEI_ENDL.

int FEData::reset ( )
inlinevirtual

Function to signal that all coefficient values should be zero'd in preparation for a new assemble/solve phase. This is to handle cases where no structural information is changing from one time-step to the next, but new coefficient values need to be loaded for the next solve.

Implements FiniteElementData.

Definition at line 284 of file FEData.hpp.

References dbgOut, and FEI_ENDL.

int FEData::resetRHSVector ( )
inline

Definition at line 290 of file FEData.hpp.

References dbgOut, and FEI_ENDL.

int FEData::resetMatrix ( )
inline

Definition at line 296 of file FEData.hpp.

References dbgOut, and FEI_ENDL.

int FEData::deleteConstraints ( )
inlinevirtual

Function to signal that lagrange multiplier constraints should be deleted.

Implements FiniteElementData.

Definition at line 302 of file FEData.hpp.

References dbgOut, and FEI_ENDL.

int FEData::getSolnEntry ( int  nodeNumber,
int  dof_id,
double &  value 
)
inlinevirtual

Get solution value from the underlying solver.

Parameters
nodeNumber
dof_id
value

Implements FiniteElementData.

Definition at line 308 of file FEData.hpp.

References dbgOut, and FEI_ENDL.

int FEData::getMultiplierSoln ( int  CRID,
double &  lagrangeMultiplier 
)
inlinevirtual

Get solution value of a Lagrange Multiplier from the solver.

Implements FiniteElementData.

Definition at line 320 of file FEData.hpp.

int FEData::putNodalFieldData ( int  fieldID,
int  fieldSize,
int  numNodes,
const int *  nodeNumbers,
const double *  coefs 
)
inlinevirtual

Pass nodal data that probably doesn't mean anything to the FEI implementation, but may mean something to the linear solver. Examples: geometric coordinates, nullspace data, etc.

Parameters
fieldIDIdentifier for the field that describes this data. Lists of field identifiers and field sizes defined for the finite-element problem may be obtained from the Lookup interface that is supplied to the ESI_Broker by the FEI implementation.
nodeNumbersList of nodes for which data is being supplied.
numNodes
dataList of length numNodes * (size of field 'fieldID')

Implements FiniteElementData.

Definition at line 337 of file FEData.hpp.

References dbgOut, and FEI_ENDL.

int FEData::setMultiplierCR ( int  CRID,
int  numNodes,
const int *  nodeNumbers,
const int *  dof_ids,
const double *  coefWeights,
double  rhsValue 
)
inlinevirtual

Specify lagrange-multipler constraint-relation.

Implements FiniteElementData.

Definition at line 357 of file FEData.hpp.

References dbgOut, and FEI_ENDL.

int FEData::setPenaltyCR ( int  CRID,
int  numNodes,
const int *  nodeNumbers,
const int *  dof_ids,
const double *  coefWeights,
double  penaltyValue,
double  rhsValue 
)
inlinevirtual

Specify penalty constraint-relation.

Implements FiniteElementData.

Definition at line 375 of file FEData.hpp.

References dbgOut, and FEI_ENDL.

int FEData::setDebugLog ( int  debugOutputLevel,
const char *  path 
)
private

Member Data Documentation

MPI_Comm FEData::comm_
private

Definition at line 398 of file FEData.hpp.

Referenced by FEData().

int FEData::numProcs_
private

Definition at line 399 of file FEData.hpp.

Referenced by FEData(), and setDebugLog().

int FEData::localProc_
private

Definition at line 399 of file FEData.hpp.

Referenced by FEData(), and setDebugLog().

int FEData::debugOutputLevel_
private

Definition at line 401 of file FEData.hpp.

Referenced by setDebugLog().

char* FEData::dbgPath_
private

Definition at line 402 of file FEData.hpp.

Referenced by setDebugLog(), and ~FEData().

FEI_OSTREAM* FEData::dbgOStreamPtr_
private

Definition at line 403 of file FEData.hpp.

Referenced by setDebugLog(), and ~FEData().

bool FEData::dbgFileOpened_
private

Definition at line 404 of file FEData.hpp.

Referenced by setDebugLog(), and ~FEData().

FEI_OFSTREAM* FEData::dbgFStreamPtr_
private

Definition at line 405 of file FEData.hpp.

Referenced by setDebugLog(), and ~FEData().


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