Epetra_JadMatrix Class Reference

Epetra_JadMatrix: A class for constructing matrix objects optimized for common kernels. More...

#include <Epetra_JadMatrix.h>

Inheritance diagram for Epetra_JadMatrix:

[legend]
List of all members.

Constructors/Destructor

 Epetra_JadMatrix (const Epetra_RowMatrix &Matrix)
 Epetra_JadMatrix constuctor.
virtual ~Epetra_JadMatrix ()
 Epetra_JadMatrix Destructor.

Post-construction modifications

int UpdateValues (const Epetra_RowMatrix &Matrix, bool CheckStructure=false)
 Update values using a matrix with identical structure.

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 Multiply (bool TransA, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
 Returns the result of a Epetra_JadMatrix 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_JadMatrix solve with a Epetra_MultiVector X in Y (not implemented).

Protected Member Functions

void GeneralMV (bool TransA, double *x, double *y) const
void GeneralMM (bool TransA, double **X, int LDX, double **Y, int LDY, int NumVectors) const
void GeneralMM3RHS (bool TransA, double **X, int LDX, double **Y, int LDY, int NumVectors) const
void GeneralMM2RHS (bool TransA, double *x, int ldx, double *y, int ldy) const
void Allocate (const Epetra_RowMatrix &Matrix)

Protected Attributes

Epetra_SerialDenseVector Values_
Epetra_IntSerialDenseVector Indices_
Epetra_IntSerialDenseVector IndexOffset_
Epetra_IntSerialDenseVector Profile_
Epetra_IntSerialDenseVector RowPerm_
Epetra_IntSerialDenseVector InvRowPerm_
int NumJaggedDiagonals_

Detailed Description

Epetra_JadMatrix: A class for constructing matrix objects optimized for common kernels.

The Epetra_JadMatrix class takes an existing Epetra_RowMatrix ojbect, analyzes it and builds a jagged diagonal equivalent of it. Once constructed, it is also possible to update the values of the matrix with values from another Epetra_RowMatrix that has the identical structure.

Definition at line 56 of file Epetra_JadMatrix.h.


Constructor & Destructor Documentation

Epetra_JadMatrix::Epetra_JadMatrix const Epetra_RowMatrix Matrix  ) 
 

Epetra_JadMatrix constuctor.

Definition at line 43 of file Epetra_JadMatrix.cpp.

Epetra_JadMatrix::~Epetra_JadMatrix  )  [virtual]
 

Epetra_JadMatrix Destructor.

Definition at line 60 of file Epetra_JadMatrix.cpp.


Member Function Documentation

int Epetra_JadMatrix::UpdateValues const Epetra_RowMatrix Matrix,
bool  CheckStructure = false
 

Update values using a matrix with identical structure.

Definition at line 63 of file Epetra_JadMatrix.cpp.

int Epetra_JadMatrix::ExtractMyRowCopy int  MyRow,
int  Length,
int &  NumEntries,
double *  Values,
int *  Indices
const [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.

Definition at line 191 of file Epetra_JadMatrix.cpp.

int Epetra_JadMatrix::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.

Definition at line 115 of file Epetra_JadMatrix.h.

int Epetra_JadMatrix::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.

Definition at line 132 of file Epetra_JadMatrix.h.

int Epetra_JadMatrix::NumMyRowEntries int  MyRow,
int &  NumEntries
const [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.

Definition at line 185 of file Epetra_JadMatrix.cpp.

int Epetra_JadMatrix::Multiply bool  TransA,
const Epetra_MultiVector X,
Epetra_MultiVector Y
const [virtual]
 

Returns the result of a Epetra_JadMatrix 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.

Definition at line 206 of file Epetra_JadMatrix.cpp.

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

Returns the result of a Epetra_JadMatrix 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.

Definition at line 185 of file Epetra_JadMatrix.h.

void Epetra_JadMatrix::GeneralMV bool  TransA,
double *  x,
double *  y
const [protected]
 

Definition at line 592 of file Epetra_JadMatrix.cpp.

void Epetra_JadMatrix::GeneralMM bool  TransA,
double **  X,
int  LDX,
double **  Y,
int  LDY,
int  NumVectors
const [protected]
 

Definition at line 284 of file Epetra_JadMatrix.cpp.

void Epetra_JadMatrix::GeneralMM3RHS bool  TransA,
double **  X,
int  LDX,
double **  Y,
int  LDY,
int  NumVectors
const [protected]
 

Definition at line 298 of file Epetra_JadMatrix.cpp.

void Epetra_JadMatrix::GeneralMM2RHS bool  TransA,
double *  x,
int  ldx,
double *  y,
int  ldy
const [protected]
 

Definition at line 491 of file Epetra_JadMatrix.cpp.

void Epetra_JadMatrix::Allocate const Epetra_RowMatrix Matrix  )  [protected]
 

Definition at line 105 of file Epetra_JadMatrix.cpp.


Member Data Documentation

Epetra_SerialDenseVector Epetra_JadMatrix::Values_ [protected]
 

Definition at line 208 of file Epetra_JadMatrix.h.

Epetra_IntSerialDenseVector Epetra_JadMatrix::Indices_ [protected]
 

Definition at line 209 of file Epetra_JadMatrix.h.

Epetra_IntSerialDenseVector Epetra_JadMatrix::IndexOffset_ [protected]
 

Definition at line 210 of file Epetra_JadMatrix.h.

Epetra_IntSerialDenseVector Epetra_JadMatrix::Profile_ [protected]
 

Definition at line 211 of file Epetra_JadMatrix.h.

Epetra_IntSerialDenseVector Epetra_JadMatrix::RowPerm_ [protected]
 

Definition at line 212 of file Epetra_JadMatrix.h.

Epetra_IntSerialDenseVector Epetra_JadMatrix::InvRowPerm_ [protected]
 

Definition at line 213 of file Epetra_JadMatrix.h.

int Epetra_JadMatrix::NumJaggedDiagonals_ [protected]
 

Definition at line 214 of file Epetra_JadMatrix.h.


The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:38:05 2008 for Epetra Package Browser (Single Doxygen Collection) by doxygen 1.3.9.1