Epetra_VbrRowMatrix Class Reference

Epetra_VbrRowMatrix: A class for using an existing Epetra_VbrMatrix object as an Epetra_RowMatrix object. More...

#include <Epetra_VbrRowMatrix.h>

Inheritance diagram for Epetra_VbrRowMatrix:

Inheritance graph
[legend]
Collaboration diagram for Epetra_VbrRowMatrix:

Collaboration graph
[legend]
List of all members.

Public Member Functions

Constructors/Destructor
 Epetra_VbrRowMatrix (Epetra_VbrMatrix *Matrix)
 Epetra_VbrRowMatrix constuctor.
virtual ~Epetra_VbrRowMatrix ()
 Epetra_VbrRowMatrix Destructor.
Post-construction modifications
int UpdateMatrix (Epetra_VbrMatrix *Matrix)
 Update the matrix to which this object points.
Methods required for implementing Epetra_BasicRowMatrix
int ExtractMyRowCopy (int MyRow, int Length, int &NumEntries, double *Values, int *Indices) const
 Returns a copy of the specified local row in user-provided arrays.
int ExtractMyEntryView (int CurEntry, double *&Value, int &RowIndex, int &ColIndex)
 Returns a reference to the ith entry in the matrix, along with its row and column index.
int ExtractMyEntryView (int CurEntry, double const *&Value, int &RowIndex, int &ColIndex) const
 Returns a const reference to the ith entry in the matrix, along with its row and column index.
int NumMyRowEntries (int MyRow, int &NumEntries) const
 Return the current number of values stored for the specified local row.
Computational methods
int RightScale (const Epetra_Vector &x)
 Scales the Epetra_VbrMatrix on the right with a Epetra_Vector x.
int LeftScale (const Epetra_Vector &x)
 Scales the Epetra_VbrMatrix on the left with a Epetra_Vector x.
int Multiply (bool TransA, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
 Returns the result of a Epetra_VbrRowMatrix multiplied by a Epetra_MultiVector X in Y.
int Solve (bool Upper, bool Trans, bool UnitDiagonal, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
 Returns the result of a Epetra_VbrRowMatrix solve with a Epetra_MultiVector X in Y (not implemented).

Detailed Description

Epetra_VbrRowMatrix: A class for using an existing Epetra_VbrMatrix object as an Epetra_RowMatrix object.

The Epetra_VbrRowMatrix class takes an existing Epetra_VbrMatrix object and allows its use as an Epetra_RowMatrix without allocating additional storage. Although the Epetra_VbrMatrix itself inherits from Epetra_RowMatrix, a design flaw in the inheritance structure of Epetra prohibits the use of an Epetra_VbrMatrix object as an Epetra_RowMatrix in some important situations. Therefore we recommend the use of this class to wrap an Epetra_VbrMatrix object.

Warning:
This class takes a pointer to an existing Epetra_VbrMatrix object. It is assumed that the user will pass in a pointer to a valid Epetra_VbrMatrix object, and will retain it throughout the life of the Epetra_VbrRowMatrix object.


Member Function Documentation

int Epetra_VbrRowMatrix::ExtractMyEntryView ( int  CurEntry,
double const *&  Value,
int &  RowIndex,
int &  ColIndex 
) const [inline, virtual]

Returns a const reference to the ith entry in the matrix, along with its row and column index.

Parameters:
CurEntry (In) - Local entry to extract.
Value (Out) - Extracted reference to current values.
RowIndex (Out) - Row index for current entry.
ColIndex (Out) - Column index for current entry.
Returns:
Integer error code, set to 0 if successful, set to -1 if CurEntry not valid.

Implements Epetra_BasicRowMatrix.

int Epetra_VbrRowMatrix::ExtractMyEntryView ( int  CurEntry,
double *&  Value,
int &  RowIndex,
int &  ColIndex 
) [inline, virtual]

Returns a reference to the ith entry in the matrix, along with its row and column index.

Parameters:
CurEntry (In) - Local entry to extract.
Value (Out) - Extracted reference to current values.
RowIndex (Out) - Row index for current entry.
ColIndex (Out) - Column index for current entry.
Returns:
Integer error code, set to 0 if successful, set to -1 if CurEntry not valid.

Implements Epetra_BasicRowMatrix.

int Epetra_VbrRowMatrix::ExtractMyRowCopy ( int  MyRow,
int  Length,
int &  NumEntries,
double *  Values,
int *  Indices 
) const [inline, virtual]

Returns a copy of the specified local row in user-provided arrays.

Parameters:
MyRow (In) - Local row to extract.
Length (In) - Length of Values and Indices.
NumEntries (Out) - Number of nonzero entries extracted.
Values (Out) - Extracted values for this row.
Indices (Out) - Extracted global column indices for the corresponding values.
Returns:
Integer error code, set to 0 if successful, set to -1 if MyRow not valid, -2 if Length is too short (NumEntries will have required length).

Implements Epetra_BasicRowMatrix.

int Epetra_VbrRowMatrix::LeftScale ( const Epetra_Vector x  )  [inline, virtual]

Scales the Epetra_VbrMatrix on the left with a Epetra_Vector x.

The this matrix will be scaled such that A(i,j) = x(i)*A(i,j) where i denotes the row number of A and j denotes the column number of A.

Parameters:
In x -A Epetra_Vector to solve for.
Returns:
Integer error code, set to 0 if successful.

Reimplemented from Epetra_BasicRowMatrix.

int Epetra_VbrRowMatrix::Multiply ( bool  TransA,
const Epetra_MultiVector X,
Epetra_MultiVector Y 
) const [inline, virtual]

Returns the result of a Epetra_VbrRowMatrix multiplied by a Epetra_MultiVector X in Y.

Parameters:
In TransA -If true, multiply by the transpose of matrix, otherwise just use matrix.
In X - A Epetra_MultiVector of dimension NumVectors to multiply with matrix.
Out Y -A Epetra_MultiVector of dimension NumVectorscontaining result.
Returns:
Integer error code, set to 0 if successful.

Reimplemented from Epetra_BasicRowMatrix.

int Epetra_VbrRowMatrix::NumMyRowEntries ( int  MyRow,
int &  NumEntries 
) const [inline, virtual]

Return the current number of values stored for the specified local row.

Similar to NumMyEntries() except NumEntries is returned as an argument and error checking is done on the input value MyRow.

Parameters:
MyRow - (In) Local row.
NumEntries - (Out) Number of nonzero values.
Returns:
Integer error code, set to 0 if successful, set to -1 if MyRow not valid.
Precondition:
None.
Postcondition:
Unchanged.

Implements Epetra_BasicRowMatrix.

int Epetra_VbrRowMatrix::RightScale ( const Epetra_Vector x  )  [inline, virtual]

Scales the Epetra_VbrMatrix on the right with a Epetra_Vector x.

The this matrix will be scaled such that A(i,j) = x(j)*A(i,j) where i denotes the global row number of A and j denotes the global column number of A.

Parameters:
In x -The Epetra_Vector used for scaling this.
Returns:
Integer error code, set to 0 if successful.

Reimplemented from Epetra_BasicRowMatrix.

int Epetra_VbrRowMatrix::Solve ( bool  Upper,
bool  Trans,
bool  UnitDiagonal,
const Epetra_MultiVector X,
Epetra_MultiVector Y 
) const [inline, virtual]

Returns the result of a Epetra_VbrRowMatrix solve with a Epetra_MultiVector X in Y (not implemented).

Parameters:
In Upper -If true, solve Ux = y, otherwise solve Lx = y.
In Trans -If true, solve transpose problem.
In UnitDiagonal -If true, assume diagonal is unit (whether it's stored or not).
In X - A Epetra_MultiVector of dimension NumVectors to solve for.
Out Y -A Epetra_MultiVector of dimension NumVectors containing result.
Returns:
Integer error code, set to 0 if successful.

Reimplemented from Epetra_BasicRowMatrix.


The documentation for this class was generated from the following file:
Generated on Tue Oct 20 12:45:57 2009 for Epetra by doxygen 1.4.7