fei::Matrix_Impl< T > Class Template Reference

#include <fei_Matrix_Impl.hpp>

Inheritance diagram for fei::Matrix_Impl< T >:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Matrix_Impl (fei::SharedPtr< T > matrix, fei::SharedPtr< fei::MatrixGraph > matrixGraph, int numLocalEqns)
virtual ~Matrix_Impl ()
const char * typeName ()
int parameters (const fei::ParameterSet &paramset)
fei::SharedPtr< T > getMatrix ()
const fei::SharedPtr< T > getMatrix () const
fei::SharedPtr< fei::MatrixGraphgetMatrixGraph ()
void setMatrixGraph (fei::SharedPtr< fei::MatrixGraph > matrixGraph)
int getGlobalNumRows () const
int getLocalNumRows () const
int putScalar (double scalar)
int getRowLength (int row, int &length) const
int copyOutRow (int row, int len, double *coefs, int *indices) const
int sumIn (int numRows, const int *rows, int numCols, const int *cols, const double *const *values, int format=0)
int copyIn (int numRows, const int *rows, int numCols, const int *cols, const double *const *values, int format=0)
int sumInFieldData (int fieldID, int idType, int rowID, int colID, const double *const *data, int format=0)
int sumInFieldData (int fieldID, int idType, int rowID, int colID, const double *data, int format=0)
int sumIn (int blockID, int connectivityID, const double *const *values, int format=0)
int globalAssemble ()
int multiply (fei::Vector *x, fei::Vector *y)
int gatherFromOverlap (bool accumulate=true)
int writeToFile (const char *filename, bool matrixMarketFormat=true)
int writeToStream (FEI_OSTREAM &ostrm, bool matrixMarketFormat=true)
bool usingBlockEntryStorage ()
int giveToUnderlyingMatrix (int numRows, const int *rows, int numCols, const int *cols, const double *const *values, bool sumInto, int format)
int giveToUnderlyingBlockMatrix (int row, int rowDim, int numCols, const int *cols, const int *LDAs, const int *colDims, const double *const *values, bool sumInto)
void markState ()
bool changedSinceMark ()

Detailed Description

template<typename T>
class fei::Matrix_Impl< T >

To be used for local assembly of shared data. Provides operations for gathering the overlapped data (locally-stored shared data) to a non- overlapped data distribution (e.g., send shared data to owning processor) and vice-versa for scattering non-overlapped data to the overlapped distribution.

When shared data that is not locally-owned is assembled into this object, it will be held locally until the above-mentioned gather operation is performed. When data that is locally-owned is assembled into this object, it will be passed directly to the underlying algebraic (non-overlapping) matrix.

Definition at line 52 of file fei_Matrix_Impl.hpp.


Constructor & Destructor Documentation

template<typename T>
fei::Matrix_Impl< T >::Matrix_Impl ( fei::SharedPtr< T >  matrix,
fei::SharedPtr< fei::MatrixGraph matrixGraph,
int  numLocalEqns 
)

Constructor

Definition at line 413 of file fei_Matrix_Impl.hpp.

template<typename T>
fei::Matrix_Impl< T >::~Matrix_Impl (  )  [virtual]

Destructor

Definition at line 439 of file fei_Matrix_Impl.hpp.


Member Function Documentation

template<typename T>
const char* fei::Matrix_Impl< T >::typeName (  )  [inline, virtual]

Return a name describing the run-time type of this object.

Implements fei::Matrix.

Definition at line 65 of file fei_Matrix_Impl.hpp.

template<typename T>
int fei::Matrix_Impl< T >::parameters ( const fei::ParameterSet paramset  )  [virtual]

Parameters method

Implements fei::Matrix.

Definition at line 445 of file fei_Matrix_Impl.hpp.

template<typename T>
fei::SharedPtr<T> fei::Matrix_Impl< T >::getMatrix (  )  [inline]

Obtain the underlying matrix object. Note that this will generally be only the locally-owned portion of the matrix, not including any data corresponding to shared-but-not-owned nodes, etc.

Definition at line 85 of file fei_Matrix_Impl.hpp.

template<typename T>
fei::SharedPtr<fei::MatrixGraph> fei::Matrix_Impl< T >::getMatrixGraph (  )  [inline, virtual]

Obtain the fei::MatrixGraph associated with this matrix

Implements fei::Matrix.

Definition at line 88 of file fei_Matrix_Impl.hpp.

template<typename T>
void fei::Matrix_Impl< T >::setMatrixGraph ( fei::SharedPtr< fei::MatrixGraph matrixGraph  )  [inline, virtual]

Set the fei::MatrixGraph associated with this matrix

Implements fei::Matrix.

Definition at line 312 of file fei_Matrix_Impl.hpp.

template<typename T>
int fei::Matrix_Impl< T >::getGlobalNumRows (  )  const [inline, virtual]

Get the global number of rows in the matrix.

Implements fei::Matrix.

Definition at line 96 of file fei_Matrix_Impl.hpp.

template<typename T>
int fei::Matrix_Impl< T >::getLocalNumRows (  )  const [inline, virtual]

Get the local number of rows in the matrix.

Implements fei::Matrix.

Definition at line 104 of file fei_Matrix_Impl.hpp.

template<typename T>
int fei::Matrix_Impl< T >::putScalar ( double  scalar  )  [virtual]

Set a specified scalar throughout the matrix.

Implements fei::Matrix.

Definition at line 465 of file fei_Matrix_Impl.hpp.

template<typename T>
int fei::Matrix_Impl< T >::getRowLength ( int  row,
int &  length 
) const [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.

Implements fei::Matrix.

Definition at line 453 of file fei_Matrix_Impl.hpp.

template<typename T>
int fei::Matrix_Impl< T >::copyOutRow ( int  row,
int  len,
double *  coefs,
int *  indices 
) const [virtual]

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

Parameters:
row Global 0-based equation number
len Length of the caller-allocated coefs and indices arrays
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.)
Returns:
error-code non-zero if any error occurs.

Implements fei::Matrix.

Definition at line 496 of file fei_Matrix_Impl.hpp.

template<typename T>
int fei::Matrix_Impl< T >::sumIn ( int  numRows,
const int *  rows,
int  numCols,
const int *  cols,
const double *const *  values,
int  format = 0 
) [virtual]

Sum coefficients into the matrix, adding them to any coefficients that may already exist at the specified row/column locations.

Parameters:
numRows 
rows 
numCols 
cols 
values 
format For compatibility with old FEI elemFormat... 0 means row-wise or row-major, 3 means column-major. Others not recognized

Implements fei::Matrix.

Definition at line 513 of file fei_Matrix_Impl.hpp.

template<typename T>
int fei::Matrix_Impl< T >::copyIn ( int  numRows,
const int *  rows,
int  numCols,
const int *  cols,
const double *const *  values,
int  format = 0 
) [virtual]

Copy coefficients into the matrix, overwriting any coefficients that may already exist at the specified row/column locations.

Parameters:
numRows 
rows 
numCols 
cols 
values 
format For compatibility with old FEI elemFormat... 0 means row-wise or row-major, 3 means column-major. Others not recognized

Implements fei::Matrix.

Definition at line 536 of file fei_Matrix_Impl.hpp.

template<typename T>
int fei::Matrix_Impl< T >::sumInFieldData ( int  fieldID,
int  idType,
int  rowID,
int  colID,
const double *const *  data,
int  format = 0 
) [virtual]

Sum coefficients into the matrix, specifying row/column locations by identifier/fieldID pairs.

Parameters:
fieldID Input. field-identifier for which data is being input.
idType Input. The identifier-type of the identifiers.
rowID Input. Identifier in row-space, for which data is being input.
colID Input. Identifier in column-space, for which data is being input.
data Input. C-style table of data. num-rows is the field-size (i.e., number of scalar components that make up the field) of 'fieldID', as is num-columns.
format For compatibility with old FEI elemFormat... 0 means row-wise or row-major, 3 means column-major. Others not recognized
Returns:
error-code 0 if successful

Implements fei::Matrix.

Definition at line 558 of file fei_Matrix_Impl.hpp.

template<typename T>
int fei::Matrix_Impl< T >::sumInFieldData ( int  fieldID,
int  idType,
int  rowID,
int  colID,
const double *  data,
int  format = 0 
) [virtual]

Sum coefficients into the matrix, specifying row/column locations by identifier/fieldID pairs.

Parameters:
fieldID Input. field-identifier for which data is being input.
idType Input. The identifier-type of the identifiers.
rowID Input. Identifier in row-space, for which data is being input.
colID Input. Identifier in column-space, for which data is being input.
data Input. 1-D list representing a packed table of data. Data may be backed in row-major or column-major order and this may be specified with the 'format' argument. The "table" of data is of size num-rows X num-columns and num-rows is the field-size (i.e., number of scalar components that make up the field) of 'fieldID', as is num-columns.
format For compatibility with old FEI elemFormat... 0 means row-wise or row-major, 3 means column-major. Others not recognized
Returns:
error-code 0 if successful

Implements fei::Matrix.

Definition at line 594 of file fei_Matrix_Impl.hpp.

template<typename T>
int fei::Matrix_Impl< T >::sumIn ( int  blockID,
int  connectivityID,
const double *const *  values,
int  format = 0 
) [virtual]

Sum coefficients, associated with a connectivity-block that was initialized on the MatrixGraph object, into this matrix.

Parameters:
blockID 
connectivityID 
values 
format For compatibility with old FEI elemFormat... 0 means row-wise or row-major, 3 means column-major. Others not recognized

Implements fei::Matrix.

Definition at line 621 of file fei_Matrix_Impl.hpp.

template<typename T>
int fei::Matrix_Impl< T >::globalAssemble (  )  [inline, virtual]

Perform any necessary internal communications/synchronizations or other operations appropriate at end of data input. For some implementations this will be a no-op.

Implements fei::Matrix.

Definition at line 295 of file fei_Matrix_Impl.hpp.

template<typename T>
int fei::Matrix_Impl< T >::multiply ( fei::Vector x,
fei::Vector y 
) [virtual]

Form a matrix-vector product y = 'this' * x

Implements fei::Matrix.

Definition at line 826 of file fei_Matrix_Impl.hpp.

template<typename T>
int fei::Matrix_Impl< T >::gatherFromOverlap ( bool  accumulate = true  )  [virtual]

After local overlapping data has been input, (e.g., element-data for a finite-element application) call this method to have data that corresponds to shared identifiers be communicated from sharing-but-not- owning processors, to owning processors.

Implements fei::Matrix.

Definition at line 834 of file fei_Matrix_Impl.hpp.

template<typename T>
int fei::Matrix_Impl< T >::writeToFile ( const char *  filename,
bool  matrixMarketFormat = true 
) [virtual]

Implementation of fei::Matrix::writeToFile

Implements fei::Matrix.

Definition at line 1119 of file fei_Matrix_Impl.hpp.

template<typename T>
int fei::Matrix_Impl< T >::writeToStream ( FEI_OSTREAM &  ostrm,
bool  matrixMarketFormat = true 
) [virtual]

Implementation of fei::Matrix::writeToStream

Implements fei::Matrix.

Definition at line 1217 of file fei_Matrix_Impl.hpp.

template<typename T>
bool fei::Matrix_Impl< T >::usingBlockEntryStorage (  )  [inline, virtual]

Query whether the underlying matrix object is a block-entry matrix.

Implements fei::Matrix.

Definition at line 248 of file fei_Matrix_Impl.hpp.

template<typename T>
int fei::Matrix_Impl< T >::giveToUnderlyingMatrix ( int  numRows,
const int *  rows,
int  numCols,
const int *  cols,
const double *const *  values,
bool  sumInto,
int  format 
) [virtual]

for experts only

Implements fei::Matrix_core.

Definition at line 333 of file fei_Matrix_Impl.hpp.

template<typename T>
int fei::Matrix_Impl< T >::giveToUnderlyingBlockMatrix ( int  row,
int  rowDim,
int  numCols,
const int *  cols,
const int *  LDAs,
const int *  colDims,
const double *const *  values,
bool  sumInto 
) [virtual]

for experts only

Implements fei::Matrix_core.

Definition at line 366 of file fei_Matrix_Impl.hpp.

template<typename T>
void fei::Matrix_Impl< T >::markState (  )  [inline, virtual]

Set a "mark" point on the current state of the matrix, so that later a query can be made to see if the matrix has changed since this mark was set.

Implements fei::Matrix.

Definition at line 319 of file fei_Matrix_Impl.hpp.

template<typename T>
bool fei::Matrix_Impl< T >::changedSinceMark (  )  [inline, virtual]

Query whether the matrix has changed since markState() was called. If markState() hasn't been called since the matrix was constructed, then this query will return true.

Implements fei::Matrix.

Definition at line 326 of file fei_Matrix_Impl.hpp.


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