Amesos Package Browser (Single Doxygen Collection) Development
Public Member Functions | Private Member Functions | Private Attributes
Amesos_TestRowMatrix Class Reference

Amesos_TestRowMatrix: a class to test Epetra_RowMatrix based codes. More...

#include <Amesos_TestRowMatrix.h>

Inheritance diagram for Amesos_TestRowMatrix:
Inheritance graph
[legend]

List of all members.

Public Member Functions

int SetUseTranspose (bool UseTranspose_in)
 Sets use transpose (not implemented).
bool UseTranspose () const
 Returns the current UseTranspose setting.
bool HasNormInf () const
 Returns true if the this object can provide an approximate Inf-norm, false otherwise.
const Epetra_CommComm () const
 Returns a pointer to the Epetra_Comm communicator associated with this operator.
const Epetra_MapOperatorDomainMap () const
 Returns the Epetra_Map object associated with the domain of this operator.
const Epetra_MapOperatorRangeMap () const
 Returns the Epetra_Map object associated with the range of this operator.
const Epetra_BlockMapMap () const
const char * Label () const

Private Member Functions

Epetra_RowMatrixMatrix ()
const Epetra_RowMatrixMatrix () const

Private Attributes

Epetra_RowMatrixMatrix_
 Pointer to the matrix to be preconditioned.
 Amesos_TestRowMatrix (Epetra_RowMatrix *Matrix_in)
 Constructor.
virtual ~Amesos_TestRowMatrix ()
 Destructor.
virtual int NumMyRowEntries (int MyRow, int &NumEntries) const
 Returns the number of nonzero entries in MyRow.
virtual int MaxNumEntries () const
 Returns the maximum of NumMyRowEntries() over all rows.
virtual 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.
virtual int ExtractDiagonalCopy (Epetra_Vector &Diagonal) const
 Returns a copy of the main diagonal in a user-provided vector.
virtual int Multiply (bool TransA, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
 Returns the result of a Epetra_RowMatrix multiplied by a Epetra_MultiVector X in Y.
virtual int Solve (bool Upper, bool Trans, bool UnitDiagonal, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
 Returns result of a local-only solve using a triangular Epetra_RowMatrix with Epetra_MultiVectors X and Y (NOT IMPLEMENTED).
virtual int Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
virtual int ApplyInverse (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
virtual int InvRowSums (Epetra_Vector &x) const
 Computes the sum of absolute values of the rows of the Epetra_RowMatrix, results returned in x (NOT IMPLEMENTED).
virtual int LeftScale (const Epetra_Vector &x)
 Scales the Epetra_RowMatrix on the left with a Epetra_Vector x (NOT IMPLEMENTED).
virtual int InvColSums (Epetra_Vector &x) const
 Computes the sum of absolute values of the columns of the Epetra_RowMatrix, results returned in x (NOT IMPLEMENTED).
virtual int RightScale (const Epetra_Vector &x)
 Scales the Epetra_RowMatrix on the right with a Epetra_Vector x (NOT IMPLEMENTED).
virtual bool Filled () const
 If FillComplete() has been called, this query returns true, otherwise it returns false.
virtual double NormInf () const
 Returns the infinity norm of the global matrix.
virtual double NormOne () const
 Returns the one norm of the global matrix.
virtual int NumGlobalNonzeros () const
 Returns the number of nonzero entries in the global matrix.
virtual int NumGlobalRows () const
 Returns the number of global matrix rows.
virtual int NumGlobalCols () const
 Returns the number of global matrix columns.
virtual int NumGlobalDiagonals () const
 Returns the number of global nonzero diagonal entries, based on global row/column index comparisons.
virtual int NumMyNonzeros () const
 Returns the number of nonzero entries in the calling processor's portion of the matrix.
virtual int NumMyRows () const
 Returns the number of matrix rows owned by the calling processor.
virtual int NumMyCols () const
 Returns the number of matrix columns owned by the calling processor.
virtual int NumMyDiagonals () const
 Returns the number of local nonzero diagonal entries, based on global row/column index comparisons.
virtual bool LowerTriangular () const
 If matrix is lower triangular in local index space, this query returns true, otherwise it returns false.
virtual bool UpperTriangular () const
 If matrix is upper triangular in local index space, this query returns true, otherwise it returns false.
virtual const Epetra_MapRowMatrixRowMap () const
 Returns the Epetra_Map object associated with the rows of this matrix.
virtual const Epetra_MapRowMatrixColMap () const
 Returns the Epetra_Map object associated with the columns of this matrix.
virtual const Epetra_ImportRowMatrixImporter () const
 Returns the Epetra_Import object that contains the import operations for distributed operations.

Detailed Description

Amesos_TestRowMatrix: a class to test Epetra_RowMatrix based codes.

Class Amesos_TestRowMatrix enables the creation of a Epetra_RowMatrix derived class for testing purposed. This class requires another Epetra_RowMatrix as input, and minimic the behavior of this matrix. However, as it this object is not derived from Epetra_CrsMatrix or Epetra_VbrMatrix, a dynamic_cast will not result in any Epetra_CrsMatrix or Epetra_VrbMatrix object.

Author:
Marzio Sala, SNL 9214
Date:
Sep-04

Definition at line 30 of file Amesos_TestRowMatrix.h.


Constructor & Destructor Documentation

Amesos_TestRowMatrix::Amesos_TestRowMatrix ( Epetra_RowMatrix Matrix_in) [inline]

Constructor.

Definition at line 35 of file Amesos_TestRowMatrix.h.

virtual Amesos_TestRowMatrix::~Amesos_TestRowMatrix ( ) [inline, virtual]

Destructor.

Definition at line 42 of file Amesos_TestRowMatrix.h.


Member Function Documentation

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

Returns the number of nonzero entries in MyRow.

Parameters:
MyRow- (In) Local row.
NumEntries- (Out) Number of nonzero values present.
Returns:
Integer error code, set to 0 if successful.

Implements Epetra_RowMatrix.

Definition at line 58 of file Amesos_TestRowMatrix.h.

virtual int Amesos_TestRowMatrix::MaxNumEntries ( ) const [inline, virtual]

Returns the maximum of NumMyRowEntries() over all rows.

Implements Epetra_RowMatrix.

Definition at line 64 of file Amesos_TestRowMatrix.h.

virtual int Amesos_TestRowMatrix::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.

Implements Epetra_RowMatrix.

Definition at line 84 of file Amesos_TestRowMatrix.h.

virtual int Amesos_TestRowMatrix::ExtractDiagonalCopy ( Epetra_Vector Diagonal) const [inline, virtual]

Returns a copy of the main diagonal in a user-provided vector.

Parameters:
Diagonal- (Out) Extracted main diagonal.
Returns:
Integer error code, set to 0 if successful.

Implements Epetra_RowMatrix.

Definition at line 97 of file Amesos_TestRowMatrix.h.

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

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

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

Implements Epetra_RowMatrix.

Definition at line 116 of file Amesos_TestRowMatrix.h.

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

Returns result of a local-only solve using a triangular Epetra_RowMatrix with Epetra_MultiVectors X and Y (NOT IMPLEMENTED).

Implements Epetra_RowMatrix.

Definition at line 122 of file Amesos_TestRowMatrix.h.

virtual int Amesos_TestRowMatrix::Apply ( const Epetra_MultiVector X,
Epetra_MultiVector Y 
) const [inline, virtual]

Implements Epetra_Operator.

Definition at line 128 of file Amesos_TestRowMatrix.h.

virtual int Amesos_TestRowMatrix::ApplyInverse ( const Epetra_MultiVector X,
Epetra_MultiVector Y 
) const [inline, virtual]

Implements Epetra_Operator.

Definition at line 134 of file Amesos_TestRowMatrix.h.

virtual int Amesos_TestRowMatrix::InvRowSums ( Epetra_Vector x) const [inline, virtual]

Computes the sum of absolute values of the rows of the Epetra_RowMatrix, results returned in x (NOT IMPLEMENTED).

Implements Epetra_RowMatrix.

Definition at line 140 of file Amesos_TestRowMatrix.h.

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

Scales the Epetra_RowMatrix on the left with a Epetra_Vector x (NOT IMPLEMENTED).

Implements Epetra_RowMatrix.

Definition at line 146 of file Amesos_TestRowMatrix.h.

virtual int Amesos_TestRowMatrix::InvColSums ( Epetra_Vector x) const [inline, virtual]

Computes the sum of absolute values of the columns of the Epetra_RowMatrix, results returned in x (NOT IMPLEMENTED).

Implements Epetra_RowMatrix.

Definition at line 152 of file Amesos_TestRowMatrix.h.

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

Scales the Epetra_RowMatrix on the right with a Epetra_Vector x (NOT IMPLEMENTED).

Implements Epetra_RowMatrix.

Definition at line 159 of file Amesos_TestRowMatrix.h.

virtual bool Amesos_TestRowMatrix::Filled ( ) const [inline, virtual]

If FillComplete() has been called, this query returns true, otherwise it returns false.

Implements Epetra_RowMatrix.

Definition at line 169 of file Amesos_TestRowMatrix.h.

virtual double Amesos_TestRowMatrix::NormInf ( ) const [inline, virtual]

Returns the infinity norm of the global matrix.

Implements Epetra_RowMatrix.

Definition at line 178 of file Amesos_TestRowMatrix.h.

virtual double Amesos_TestRowMatrix::NormOne ( ) const [inline, virtual]

Returns the one norm of the global matrix.

Implements Epetra_RowMatrix.

Definition at line 187 of file Amesos_TestRowMatrix.h.

virtual int Amesos_TestRowMatrix::NumGlobalNonzeros ( ) const [inline, virtual]

Returns the number of nonzero entries in the global matrix.

Implements Epetra_RowMatrix.

Definition at line 193 of file Amesos_TestRowMatrix.h.

virtual int Amesos_TestRowMatrix::NumGlobalRows ( ) const [inline, virtual]

Returns the number of global matrix rows.

Implements Epetra_RowMatrix.

Definition at line 199 of file Amesos_TestRowMatrix.h.

virtual int Amesos_TestRowMatrix::NumGlobalCols ( ) const [inline, virtual]

Returns the number of global matrix columns.

Implements Epetra_RowMatrix.

Definition at line 205 of file Amesos_TestRowMatrix.h.

virtual int Amesos_TestRowMatrix::NumGlobalDiagonals ( ) const [inline, virtual]

Returns the number of global nonzero diagonal entries, based on global row/column index comparisons.

Implements Epetra_RowMatrix.

Definition at line 211 of file Amesos_TestRowMatrix.h.

virtual int Amesos_TestRowMatrix::NumMyNonzeros ( ) const [inline, virtual]

Returns the number of nonzero entries in the calling processor's portion of the matrix.

Implements Epetra_RowMatrix.

Definition at line 217 of file Amesos_TestRowMatrix.h.

virtual int Amesos_TestRowMatrix::NumMyRows ( ) const [inline, virtual]

Returns the number of matrix rows owned by the calling processor.

Implements Epetra_RowMatrix.

Definition at line 223 of file Amesos_TestRowMatrix.h.

virtual int Amesos_TestRowMatrix::NumMyCols ( ) const [inline, virtual]

Returns the number of matrix columns owned by the calling processor.

Implements Epetra_RowMatrix.

Definition at line 229 of file Amesos_TestRowMatrix.h.

virtual int Amesos_TestRowMatrix::NumMyDiagonals ( ) const [inline, virtual]

Returns the number of local nonzero diagonal entries, based on global row/column index comparisons.

Implements Epetra_RowMatrix.

Definition at line 235 of file Amesos_TestRowMatrix.h.

virtual bool Amesos_TestRowMatrix::LowerTriangular ( ) const [inline, virtual]

If matrix is lower triangular in local index space, this query returns true, otherwise it returns false.

Implements Epetra_RowMatrix.

Definition at line 241 of file Amesos_TestRowMatrix.h.

virtual bool Amesos_TestRowMatrix::UpperTriangular ( ) const [inline, virtual]

If matrix is upper triangular in local index space, this query returns true, otherwise it returns false.

Implements Epetra_RowMatrix.

Definition at line 247 of file Amesos_TestRowMatrix.h.

virtual const Epetra_Map& Amesos_TestRowMatrix::RowMatrixRowMap ( ) const [inline, virtual]

Returns the Epetra_Map object associated with the rows of this matrix.

Implements Epetra_RowMatrix.

Definition at line 253 of file Amesos_TestRowMatrix.h.

virtual const Epetra_Map& Amesos_TestRowMatrix::RowMatrixColMap ( ) const [inline, virtual]

Returns the Epetra_Map object associated with the columns of this matrix.

Implements Epetra_RowMatrix.

Definition at line 258 of file Amesos_TestRowMatrix.h.

virtual const Epetra_Import* Amesos_TestRowMatrix::RowMatrixImporter ( ) const [inline, virtual]

Returns the Epetra_Import object that contains the import operations for distributed operations.

Implements Epetra_RowMatrix.

Definition at line 264 of file Amesos_TestRowMatrix.h.

int Amesos_TestRowMatrix::SetUseTranspose ( bool  UseTranspose_in) [inline, virtual]

Sets use transpose (not implemented).

Implements Epetra_Operator.

Definition at line 281 of file Amesos_TestRowMatrix.h.

bool Amesos_TestRowMatrix::UseTranspose ( ) const [inline, virtual]

Returns the current UseTranspose setting.

Implements Epetra_Operator.

Definition at line 287 of file Amesos_TestRowMatrix.h.

bool Amesos_TestRowMatrix::HasNormInf ( ) const [inline, virtual]

Returns true if the this object can provide an approximate Inf-norm, false otherwise.

Implements Epetra_Operator.

Definition at line 293 of file Amesos_TestRowMatrix.h.

const Epetra_Comm& Amesos_TestRowMatrix::Comm ( ) const [inline, virtual]

Returns a pointer to the Epetra_Comm communicator associated with this operator.

Implements Epetra_Operator.

Definition at line 299 of file Amesos_TestRowMatrix.h.

const Epetra_Map& Amesos_TestRowMatrix::OperatorDomainMap ( ) const [inline, virtual]

Returns the Epetra_Map object associated with the domain of this operator.

Implements Epetra_Operator.

Definition at line 305 of file Amesos_TestRowMatrix.h.

const Epetra_Map& Amesos_TestRowMatrix::OperatorRangeMap ( ) const [inline, virtual]

Returns the Epetra_Map object associated with the range of this operator.

Implements Epetra_Operator.

Definition at line 311 of file Amesos_TestRowMatrix.h.

const Epetra_BlockMap& Amesos_TestRowMatrix::Map ( ) const [inline, virtual]

Implements Epetra_SrcDistObject.

Definition at line 317 of file Amesos_TestRowMatrix.h.

const char* Amesos_TestRowMatrix::Label ( ) const [inline, virtual]

Implements Epetra_Operator.

Definition at line 322 of file Amesos_TestRowMatrix.h.

Epetra_RowMatrix& Amesos_TestRowMatrix::Matrix ( ) [inline, private]

Definition at line 330 of file Amesos_TestRowMatrix.h.

const Epetra_RowMatrix& Amesos_TestRowMatrix::Matrix ( ) const [inline, private]

Definition at line 335 of file Amesos_TestRowMatrix.h.


Member Data Documentation

Pointer to the matrix to be preconditioned.

Definition at line 341 of file Amesos_TestRowMatrix.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines