fei_trilinos::Aztec_LinSysCore Class Reference

Inheritance diagram for fei_trilinos::Aztec_LinSysCore:

Inheritance graph
[legend]
List of all members.

Public Member Functions

LinearSystemCoreclone ()
int parameters (int numParams, const char *const *params)
int setLookup (Lookup &lookup)
int setGlobalOffsets (int len, int *nodeOffsets, int *eqnOffsets, int *blkEqnOffsets)
int setConnectivities (GlobalID elemBlock, int numElements, int numNodesPerElem, const GlobalID *elemIDs, const int *const *connNodes)
int setStiffnessMatrices (GlobalID, int, const GlobalID *, const double *const *const *, int, const int *const *)
int setLoadVectors (GlobalID, int, const GlobalID *, const double *const *, int, const int *const *)
int setMatrixStructure (int **ptColIndices, int *ptRowLengths, int **blkColIndices, int *blkRowLengths, int *ptRowsPerBlkRow)
int setMultCREqns (int, int, int, int **, int **, int *, int *)
int setPenCREqns (int, int, int, int **, int **, int *)
int resetMatrixAndVector (double s)
int resetMatrix (double s)
int resetRHSVector (double s)
int sumIntoSystemMatrix (int numPtRows, const int *ptRows, int numPtCols, const int *ptCols, int numBlkRows, const int *blkRows, int numBlkCols, const int *blkCols, const double *const *values)
int sumIntoSystemMatrix (int numPtRows, const int *ptRows, int numPtCols, const int *ptCols, const double *const *values)
int putIntoSystemMatrix (int numPtRows, const int *ptRows, int numPtCols, const int *ptCols, const double *const *values)
int getMatrixRowLength (int row, int &length)
int getMatrixRow (int row, double *coefs, int *indices, int len, int &rowLength)
int sumIntoRHSVector (int num, const double *values, const int *indices)
int putIntoRHSVector (int num, const double *values, const int *indices)
int getFromRHSVector (int num, double *values, const int *indices)
int matrixLoadComplete ()
int enforceEssentialBC (int *globalEqn, double *alpha, double *gamma, int len)
int enforceRemoteEssBCs (int numEqns, int *globalEqns, int **colIndices, int *colIndLen, double **coefs)
int getMatrixPtr (Data &data)
int copyInMatrix (double scalar, const Data &data)
int copyOutMatrix (double scalar, Data &data)
int sumInMatrix (double scalar, const Data &data)
int getRHSVectorPtr (Data &data)
int copyInRHSVector (double scalar, const Data &data)
int copyOutRHSVector (double scalar, Data &data)
int sumInRHSVector (double scalar, const Data &data)
int destroyMatrixData (Data &data)
int destroyVectorData (Data &data)
int setNumRHSVectors (int numRHSs, const int *rhsIDs)
int setRHSID (int rhsID)
int putInitialGuess (const int *eqnNumbers, const double *values, int len)
int getSolution (double *answers, int len)
int getSolnEntry (int eqnNumber, double &answer)
int formResidual (double *values, int len)
int launchSolver (int &solveStatus, int &iterations)
int putNodalFieldData (int, int, int *, int, const double *)
int writeSystem (const char *name)

Detailed Description

Definition at line 33 of file fei_Aztec_LinSysCore.hpp.


Member Function Documentation

LinearSystemCore* fei_trilinos::Aztec_LinSysCore::clone (  )  [virtual]

For cloning a LinearSystemCore instance. Caller recieves a pointer to a new instantiation of the implementing object.

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::parameters ( int  numParams,
const char *const *  params 
) [virtual]

For setting argc/argv style parameters.

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

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::setLookup ( Lookup lookup  )  [virtual]

Supply the LinearSystemCore 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:
lookup Input. Reference to an implementation of the Lookup interface

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::setGlobalOffsets ( int  len,
int *  nodeOffsets,
int *  eqnOffsets,
int *  blkEqnOffsets 
) [virtual]

Supply LinearSystemCore with global offset information for the problem being assembled.

Parameters:
len Length of the following list arguments. This will be numProcs+1
nodeOffsets The FEI implementation assigns a global 0-based numbering to the finite-element nodes in the problem. Each processor is given ownership of a contiguous subset of these node-numbers. nodeOffsets[i] gives the first local node-number for processor i. nodeOffsets[len-1] gives the total number of nodes.
eqnOffsets eqnOffsets[i] gives the first local equation number for processor i, eqnOffsets[len-1] gives the global number of equations.
blkEqnOffsets Contains the same kind of information as eqnOffsets, but for 'block-equations'. A block-equation contains all of the point-equations present at a finite-element node. Special case: if this problem contains Lagrange Multiplier constraints, they will be equations that don't correspond to any node, and there will only be one of these equations mapped to a block-equation.

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::setConnectivities ( GlobalID  elemBlock,
int  numElements,
int  numNodesPerElem,
const GlobalID *  elemIDs,
const int *const *  connNodes 
) [virtual]

For passing element-connectivity arrays.

Parameters:
elemBlock Identifier for the element-block that these elements belong to.
numElements Length of the elemIDs list.
numNodesPerElem Length of each row in the connNodes table.
elemIDs Identifiers for each element for which connectivities are being supplied.
connNodes Table, with one row for each element. Each row is a list of the nodes that are connected to that element.

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::setStiffnessMatrices ( GlobalID  ,
int  ,
const GlobalID *  ,
const double *const *const *  ,
int  ,
const int *const *   
) [inline, virtual]

For passing element-stiffness arrays.

Parameters:
elemBlock Identifier for the element-block that these elements belong to.
numElems Length of the elemIDs list.
elemIDs Identifiers for each element for which a stiffness array is being supplied.
stiff List of 'numElems' tables, each table is of size 'numEqnsPerElem' X 'numEqnsPerElem'.
numEqnsPerElem 
eqnIndices Table, with 'numElems' rows, each row being a list of 'numEqnsPerElem' scatter indices (0-based global matrix row/column indices).

Implements LinearSystemCore.

Definition at line 58 of file fei_Aztec_LinSysCore.hpp.

int fei_trilinos::Aztec_LinSysCore::setLoadVectors ( GlobalID  ,
int  ,
const GlobalID *  ,
const double *const *  ,
int  ,
const int *const *   
) [inline, virtual]

For passing element-load vectors.

Parameters:
elemBlock Identifier for the element-block that these elements belong to.
numElems Length of the elemIDs list.
elemIDs Identifiers for each element for which a load vector is being supplied.
load Table with 'numElems' rows, each row is of length 'numEqnsPerElem'.
numEqnsPerElem 
eqnIndices Table, with 'numElems' rows, each row being a list of 'numEqnsPerElem' scatter indices (0-based global equation numbers).

Implements LinearSystemCore.

Definition at line 66 of file fei_Aztec_LinSysCore.hpp.

int fei_trilinos::Aztec_LinSysCore::setMatrixStructure ( int **  ptColIndices,
int *  ptRowLengths,
int **  blkColIndices,
int *  blkRowLengths,
int *  ptRowsPerBlkRow 
) [virtual]

Supply LinearSystemCore with information defining the structure of the sparse matrix to be assembled. Implementers of LinearSystemCore may safely assume that this function will not be called until after the function 'setGlobalOffsets' has been called. Using the information provided via setGlobalOffsets, the number-of-local-equations can be trivially calculated. After setMatrixStructure has been called, there should be enough information to instantiate internal linear-algebra entities, such as vectors, matrix, etc.

Parameters:
ptColIndices Table, with num-local-eqns rows, and the i-th row is of length ptRowLengths[i].
ptRowLengths 
blkColIndices Table, with num-local-blkEqns rows, and the i-th row is of length blkRowLengths[i].
blkRowLengths 
ptRowsPerBlkRow The i-th local block-equation corresponds to ptRowsPerBlkRow[i] point-equations.

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::setMultCREqns ( int  ,
int  ,
int  ,
int **  ,
int **  ,
int *  ,
int *   
) [inline, virtual]

Specify which global equation numbers correspond to Lagrange Multiplier equations. This function won't be called if there are no Lagrange Multiplier constraints in the problem. If this function is called, it is guaranteed to be called after 'setGlobalOffsets' and before 'setMatrixStructure'. The primary purpose of this function is to give LinearSystemCore implementers the opportunity to deal with constraints in a special way, rather than assembling everything into one matrix. If the problem being assembled does have Lagrange constraints, then the FEI implementation will request an ESI_MatrixRowWriteAccess interface for "C_Matrix" from LinearSystemCore. If that is not available, then the FEI implementation will request "A_Matrix" and assemble everything into that.

Parameters:
numCRs number of constraint relations
numNodesPerCR number of constrained node in each constraint relation
nodeNumbers Table of constrained nodes. 'numCRs' rows, with the i-th row being of length numNodesPerCR[i].
eqnNumbers Table, same dimensions as 'nodeNumbers'. These are the global 0-based matrix column indices of the constraint coefficients.
multiplierEqnNumbers Equation numbers that the Lagrange Multipliers correspond to.

Implements LinearSystemCore.

Definition at line 80 of file fei_Aztec_LinSysCore.hpp.

int fei_trilinos::Aztec_LinSysCore::setPenCREqns ( int  ,
int  ,
int  ,
int **  ,
int **  ,
int *   
) [inline, virtual]

Specify which nodes and equation numbers correspond to penalty constraints. This function is included for completeness, but hasn't yet been proven to be useful or necessary, and will probably not be included in the successor to LinearSystemCore (ESI_LSManager).

Implements LinearSystemCore.

Definition at line 87 of file fei_Aztec_LinSysCore.hpp.

int fei_trilinos::Aztec_LinSysCore::resetMatrixAndVector ( double  s  )  [virtual]

For setting the scalar 's' (usually 0.0) throughout the matrix rhs vector.

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::resetMatrix ( double  s  )  [virtual]

For setting the scalar 's' (usually 0.0) throughout the matrix.

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::resetRHSVector ( double  s  )  [virtual]

For setting the scalar 's' (usually 0.0) throughout the rhs vector.

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::sumIntoSystemMatrix ( int  numPtRows,
const int *  ptRows,
int  numPtCols,
const int *  ptCols,
int  numBlkRows,
const int *  blkRows,
int  numBlkCols,
const int *  blkCols,
const double *const *  values 
) [virtual]

Provides point-entry data, as well as block-entry data. This is the primary assembly function, through which the FEI implementation provides the local equation contributions of all element contributions.

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::sumIntoSystemMatrix ( int  numPtRows,
const int *  ptRows,
int  numPtCols,
const int *  ptCols,
const double *const *  values 
) [virtual]

Purely point-entry version for accumulating coefficient data into the matrix. This will be called when a matrix contribution fills only part of a block-equation. e.g., when a penalty constraint is being applied to a single solution field on a node that has several solution fields. (A block-equation contains all solution field equations at a node.)

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::putIntoSystemMatrix ( int  numPtRows,
const int *  ptRows,
int  numPtCols,
const int *  ptCols,
const double *const *  values 
) [virtual]

Point-entry matrix data as for 'sumIntoSystemMatrix', but in this case the data should be "put" into the matrix (i.e., overwrite any coefficients already present) rather than being "summed" into the matrix.

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::getMatrixRowLength ( int  row,
int &  length 
) [virtual]

Get the length of a row of the matrix.

Parameters:
row Global 0-based equation number
length Output. Length of the row.
Returns:
error-code non-zero if any error occurs, e.g., row is not local.

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::getMatrixRow ( int  row,
double *  coefs,
int *  indices,
int  len,
int &  rowLength 
) [virtual]

Obtain the coefficients and indices for a row of the matrix.

Parameters:
row Global 0-based equation number
coefs Caller-allocated array, length 'len', to be filled with coefficients
indices Caller-allocated array, length 'len', to be filled with indices. (These indices will be global 0-based equation numbers.)
len Length of the caller-allocated coefs and indices arrays
rowLength Output. Actual length of this row. Not referenced if row is not in the local portion of the matrix.
Returns:
error-code non-zero if any error occurs, e.g., row is not local.

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::sumIntoRHSVector ( int  num,
const double *  values,
const int *  indices 
) [virtual]

For accumulating coefficients into the rhs vector

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::putIntoRHSVector ( int  num,
const double *  values,
const int *  indices 
) [virtual]

For putting coefficients into the rhs vector

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::getFromRHSVector ( int  num,
double *  values,
const int *  indices 
) [virtual]

For getting coefficients out of the rhs vector

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::matrixLoadComplete (  )  [virtual]

The FEI implementation calls this function to signal the linsyscore object that data-loading is finished.

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::enforceEssentialBC ( int *  globalEqn,
double *  alpha,
double *  gamma,
int  len 
) [virtual]

The FEI implementation calls this function to inform LinearSystemCore of equations that need to have essential (Dirichlet) boundary conditions enforced on them. The intent is that the LinearSystemCore implementation will perform the column-modification b[i] = gamma[i]/alpha[i] if i == globalEqn[i], otherwise b[i] -= gamma[i]/alpha[i] * A(i,globalEqn[i]) if i != globalEqn[i]. After this operation is performed, all of row globalEqn[i] and column globalEqn[i] should be set to 0.0, except for the diagonal position. (Naturally the implementer is free to enforce the boundary condition another way if they wish.)

Parameters:
globalEqn List, of length 'len', of global 0-based equation numbers.
alpha List, of length 'len', of coefficients. When the solution to the linear system is later requested, the solution value for globalEqn[i] should be gamma[i]/alpha[i].
gamma 
len 

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::enforceRemoteEssBCs ( int  numEqns,
int *  globalEqns,
int **  colIndices,
int *  colIndLen,
double **  coefs 
) [virtual]

The FEI implementation calls this function to inform LinearSystemCore that certain local equations need column-modifications made due to essential boundary-conditions being enforced on other processors. The column modification is roughly this: b(globalEqns[i]) -= A(globalEqns[i], colIndices[i][j]) * coefs[i][j], for i in [0..numEqns-1] and j in [0.. colIndLen[i]-1]. (Note that A(globalEqns[i], colIndices[i][j]) should be set = 0.0 after the appropriate value has been accumulated into b also.)

Parameters:
numEqns Length of 'globalEqns'
globalEqns Equations that are local to this processor.
colIndices Table, with 'numEqns' rows, and the i-th row is of length colIndLen[i]. The i-th row contains column indices in equation globalEqns[i]. These column indices correspond to equations (rows) that are owned by other processors, and those other processors are imposing essential boundary conditions on those equations.
colIndLen List of length 'numEqns'.
coefs This table holds the gamma/alpha coeficients that are the value of the boundary conditions being enforced on each of the remote equations in the 'colIndices' table.

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::getMatrixPtr ( Data data  )  [virtual]

The FEI implementation calls this function to request a pointer to the internal 'A-matrix' data.

Parameters:
data See Data class documentation.

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::copyInMatrix ( double  scalar,
const Data data 
) [virtual]

LinearSystemCore's internal 'A-matrix' should be replaced with a scaled copy of the incoming data.

Parameters:
scalar coefficient by which to scale the incoming data.
data See documentation for Data class.

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::copyOutMatrix ( double  scalar,
Data data 
) [virtual]

The FEI implementation calls this function to request a scaled copy of the internal 'A-matrix' data. The FEI implementation will then be responsible for deciding when this matrix data should be destroyed. The LinearSystemCore implementation should not keep a reference to the pointer that was handed out.

Parameters:
scalar 
data See documentation for Data class.

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::sumInMatrix ( double  scalar,
const Data data 
) [virtual]

A scaled copy of the incoming data should be added to the internal 'A-matrix'.

Parameters:
scalar 
data See documentation for Data class.

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::getRHSVectorPtr ( Data data  )  [virtual]

Same semantics as getMatrixPtr, but applied to rhs vector.

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::copyInRHSVector ( double  scalar,
const Data data 
) [virtual]

Same semantics as copyInMatrix, but applied to rhs vector.

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::copyOutRHSVector ( double  scalar,
Data data 
) [virtual]

Same semantics as copyOutMatrix, but applied to rhs vector.

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::sumInRHSVector ( double  scalar,
const Data data 
) [virtual]

Same semantics as sumInMatrix, but applied to rhs vector.

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::destroyMatrixData ( Data data  )  [virtual]

Utility function for destroying the matrix in a Data container. The caller (owner of 'data') can't destroy the matrix because they don't know what concrete type it is and can't get to its destructor. The contents of 'data' is a matrix previously passed out via 'copyOutMatrix'.

Parameters:
data See documentation for Data class.

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::destroyVectorData ( Data data  )  [virtual]

Utility function for destroying the vector in a Data container. The caller (owner of 'data') can't destroy the vector because they don't know what concrete type it is and can't get to its destructor. The contents of 'data' is a vector previously passed out via 'copyOutRHSVector'.

Parameters:
data See documentation for Data class.

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::setNumRHSVectors ( int  numRHSs,
const int *  rhsIDs 
) [virtual]

Indicate the number of rhs-vectors being assembled/solved for. This function will be called by the FEI implementation at or near the beginning of the problem assembly. If numRHSs is greater than 1, then calls to 'getMemberInterface' requesting an interface to an rhs vector will use the 'objName' argument "b_Vector_n", where n is in [0 .. numRHSs-1]. If there is only one rhs-vector, then 'objName' will be simply "b_Vector".

Parameters:
numRHSs Length of the rhsIDs list.
rhsIDs Caller-supplied integer identifiers for the rhs vectors. This argument will probably be removed, as it is obsolete (a carry-over from LinearSystemCore).

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::setRHSID ( int  rhsID  )  [virtual]

Set the 'current context' to the rhs-vector corresponding to rhsID. Subsequent data received via 'sumIntoRHSVector' should be directed into this rhs-vector. Any other function-calls having to do with the rhs-vector should also effect this rhs-vector.

Parameters:
rhsID 

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::putInitialGuess ( const int *  eqnNumbers,
const double *  values,
int  len 
) [virtual]

The FEI implementation will call this function to supply initial-guess data that should be used as the starting 'x-vector' if an iterative solution is to be performed.

Parameters:
eqnNumbers Global 0-based equation numbers for which the initial guess should be set.
values The initial guess data.
len Number of equations for which an initial guess is being supplied.

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::getSolution ( double *  answers,
int  len 
) [virtual]

The FEI implementation will call this function to request all local solution values.

Parameters:
answers Solution coefficients.
len This should equal the number of local equations. If it is less, the LinearSystemCore implementation should simply pass out the first 'len' local solution values. If it is more, then just pass out numLocalEqns solution values.

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::getSolnEntry ( int  eqnNumber,
double &  answer 
) [virtual]

The FEI implementation will call this function to request a single solution value.

Parameters:
eqnNumber Global 0-based equation number.
answer 

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::formResidual ( double *  values,
int  len 
) [virtual]

This will be called to request that LinearSystemCore form the residual vector r = b - A*x, and pass the coefficients for r back out in the 'values' list.

Parameters:
values 
len This should equal num-local-eqns.

Implements LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::launchSolver ( int &  solveStatus,
int &  iterations 
) [virtual]

Function called to request the launching of the linear solver.

Parameters:
solveStatus Output, should indicate the status of the solve. A successful solve is usually indicated by a value of 0.
iterations Output, 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 LinearSystemCore.

int fei_trilinos::Aztec_LinSysCore::putNodalFieldData ( int  ,
int  ,
int *  ,
int  ,
const double *   
) [inline, virtual]

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:
fieldID Identifier 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 LinearSystemCore by the FEI implementation.
nodeNumbers List of nodes for which data is being supplied.
numNodes 
data List of length numNodes * (size of field 'fieldID')

Implements LinearSystemCore.

Definition at line 231 of file fei_Aztec_LinSysCore.hpp.

int fei_trilinos::Aztec_LinSysCore::writeSystem ( const char *  name  )  [virtual]

This function's intent is to provide a file-name to be used by LinearSystemCore in writing the linear system into disk files. Format is not specified. Implementers may choose to augment this name in the style of writing 3 files: A_name, x_name, b_name, or some other convention. This function is ill-defined, obsolete, and will probably never be called by the FEI implementation.

Implements LinearSystemCore.


The documentation for this class was generated from the following file:
Generated on Wed May 12 01:33:54 2010 for FEI by  doxygen 1.4.7