Playa::EpetraMatrix Class Reference

#include <PlayaEpetraMatrix.hpp>

Inheritance diagram for Playa::EpetraMatrix:

Playa::LinearOpWithSpaces< double > Playa::LoadableMatrix< double > Playa::RowAccessibleOp< double > Playa::Printable Playa::ILUFactorizableOp< double > Playa::LinearOperatorBase< double > Playa::ObjectWithVerbosity

List of all members.

Public Member Functions

 EpetraMatrix (const Epetra_CrsGraph &graph, const VectorSpace< double > &domain, const VectorSpace< double > &range)
 EpetraMatrix (const RCP< Epetra_CrsMatrix > &mat, const VectorSpace< double > &domain, const VectorSpace< double > &range)
virtual void apply (Teuchos::ETransp applyType, const Vector< double > &in, Vector< double > out) const
std::ostream & describe (std::ostream &out, const Teuchos::EVerbosityLevel verbLevel, const std::string leadingIndent, const std::string indentSpacer) const
std::string description () const
const Epetra_CrsMatrix * crsMatrix () const
LoadableMatrix interface functions


virtual void addToRow (int globalRowIndex, int nElemsToInsert, const int *globalColumnIndices, const double *elementValues)
virtual void addToElementBatch (int numRows, int rowBlockSize, const int *globalRowIndices, int numColumnsPerRow, const int *globalColumnIndices, const double *values, const int *skipRow)
virtual void zero ()
incomplete factorization preconditioning interface


virtual void getILUKPreconditioner (int fillLevels, int overlapFill, double relaxationValue, double relativeThreshold, double absoluteThreshold, LeftOrRight leftOrRight, Preconditioner< double > &rtn) const
Row access interface


void getRow (const int &row, Teuchos::Array< int > &indices, Teuchos::Array< double > &values) const
Diagnostic output


virtual void print (std::ostream &os) const

Static Public Member Functions

static Epetra_CrsMatrix & getConcrete (const LinearOperator< double > &A)
static RCP< const
Epetra_CrsMatrix > 
getConcretePtr (const LinearOperator< double > &A)

Related Functions

(Note that these are not member functions.)

Vector< double > getEpetraDiagonal (const LinearOperator< double > &A)
LinearOperator< double > makeEpetraDiagonalMatrix (const Vector< double > &d)


Detailed Description

Playa wrapper for epetra matrix

Definition at line 24 of file PlayaEpetraMatrix.hpp.


Constructor & Destructor Documentation

EpetraMatrix::EpetraMatrix ( const Epetra_CrsGraph &  graph,
const VectorSpace< double > &  domain,
const VectorSpace< double > &  range 
)

Construct an empty EpetraMatrix structured according to the graph argument

Definition at line 25 of file PlayaEpetraMatrix.cpp.

EpetraMatrix::EpetraMatrix ( const RCP< Epetra_CrsMatrix > &  mat,
const VectorSpace< double > &  domain,
const VectorSpace< double > &  range 
)

Wrap an existing Epetra CRS Matrix

Definition at line 32 of file PlayaEpetraMatrix.cpp.


Member Function Documentation

void EpetraMatrix::apply ( Teuchos::ETransp  applyType,
const Vector< double > &  in,
Vector< double >  out 
) const [virtual]

Apply the operator

Implements Playa::LinearOperatorBase< double >.

Definition at line 40 of file PlayaEpetraMatrix.cpp.

void EpetraMatrix::addToRow ( int  globalRowIndex,
int  nElemsToInsert,
const int *  globalColumnIndices,
const double *  elementValues 
) [virtual]

Insert a set of elements in a row, adding to any previously existing values.

Parameters:
globalRowIndex the global index of the row to which these elements belong.
nElemsToInsert the number of elements being inserted in this step
globalColumnIndices array of column indices. Must be nElemsToInsert in length.
elements array of element values. Must be nElemsToInsert in length

Implements Playa::LoadableMatrix< double >.

Definition at line 59 of file PlayaEpetraMatrix.cpp.

void EpetraMatrix::addToElementBatch ( int  numRows,
int  rowBlockSize,
const int *  globalRowIndices,
int  numColumnsPerRow,
const int *  globalColumnIndices,
const double *  values,
const int *  skipRow 
) [virtual]

Add to a batch of elements

Reimplemented from Playa::LoadableMatrix< double >.

Definition at line 78 of file PlayaEpetraMatrix.cpp.

void EpetraMatrix::zero (  )  [virtual]

Set all elements to zero, preserving the existing structure

Implements Playa::LoadableMatrix< double >.

Definition at line 112 of file PlayaEpetraMatrix.cpp.

void EpetraMatrix::getILUKPreconditioner ( int  fillLevels,
int  overlapFill,
double  relaxationValue,
double  relativeThreshold,
double  absoluteThreshold,
LeftOrRight  leftOrRight,
Preconditioner< double > &  rtn 
) const [virtual]

create an incomplete factorization.

Parameters:
fillLevels number of levels of fill on the local processor
overlapFill number of levels of fill on remote processors
relaxationValue fraction of dropped values to be added to the diagonal
relativeThreshold relative diagonal perutrbation
absoluteThreshold absolute diagonal perturbation
leftOrRight whether this preconditioner is to be applied from the left or right
rtn newly created preconditioner, returned by reference argument.

Implements Playa::ILUFactorizableOp< double >.

Definition at line 119 of file PlayaEpetraMatrix.cpp.

void EpetraMatrix::getRow ( const int &  row,
Teuchos::Array< int > &  indices,
Teuchos::Array< double > &  values 
) const [virtual]

Get the specified row as defined by RowAccessible

Implements Playa::RowAccessibleOp< double >.

Definition at line 189 of file PlayaEpetraMatrix.cpp.

void EpetraMatrix::print ( std::ostream &  os  )  const [virtual]

Print the matrix

Implements Playa::Printable.

Definition at line 148 of file PlayaEpetraMatrix.cpp.

std::ostream& Playa::EpetraMatrix::describe ( std::ostream &  out,
const Teuchos::EVerbosityLevel  verbLevel,
const std::string  leadingIndent,
const std::string  indentSpacer 
) const [inline]

Definition at line 126 of file PlayaEpetraMatrix.hpp.

string EpetraMatrix::description (  )  const

Definition at line 154 of file PlayaEpetraMatrix.cpp.

Epetra_CrsMatrix & EpetraMatrix::getConcrete ( const LinearOperator< double > &  A  )  [static]

Definition at line 176 of file PlayaEpetraMatrix.cpp.

RCP< const Epetra_CrsMatrix > EpetraMatrix::getConcretePtr ( const LinearOperator< double > &  A  )  [static]

Definition at line 183 of file PlayaEpetraMatrix.cpp.

const Epetra_CrsMatrix * EpetraMatrix::crsMatrix (  )  const

Read-only access to the underlying crs matrix. Needed by Ifpack and ML.

Definition at line 170 of file PlayaEpetraMatrix.cpp.


Friends And Related Function Documentation

Vector< double > getEpetraDiagonal ( const LinearOperator< double > &  A  )  [related]

Definition at line 26 of file PlayaEpetraMatrixOps.cpp.

LinearOperator< double > makeEpetraDiagonalMatrix ( const Vector< double > &  d  )  [related]

Definition at line 42 of file PlayaEpetraMatrixOps.cpp.


The documentation for this class was generated from the following files:

doxygen