Playa::EpetraMatrix Class Reference

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)

Private Member Functions

Epetra_CrsMatrix * crsMatrix ()
const Epetra_Map & getRangeMap () const
const Epetra_Map & getDomainMap () const

Private Attributes

RCP< Epetra_CrsMatrix > matrix_

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

References crsMatrix().

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.

References crsMatrix().

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.

References getConcrete(), and matrix_.

Epetra_CrsMatrix * EpetraMatrix::crsMatrix (  )  [private]

Definition at line 164 of file PlayaEpetraMatrix.cpp.

References matrix_.

const Epetra_CrsMatrix * EpetraMatrix::crsMatrix (  )  const

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.

References description().

string EpetraMatrix::description (  )  const

Definition at line 154 of file PlayaEpetraMatrix.cpp.

References crsMatrix(), and Teuchos::toString().

Referenced by describe().

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

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

const Epetra_Map& Playa::EpetraMatrix::getDomainMap (  )  const [private]

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.

References Playa::Left.

const Epetra_Map& Playa::EpetraMatrix::getRangeMap (  )  const [private]

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.

References crsMatrix().

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

Print the matrix

Implements Playa::Printable.

Definition at line 148 of file PlayaEpetraMatrix.cpp.

References crsMatrix().

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.

References crsMatrix().


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.


Member Data Documentation

RCP<Epetra_CrsMatrix> Playa::EpetraMatrix::matrix_ [private]

Definition at line 155 of file PlayaEpetraMatrix.hpp.

Referenced by apply(), crsMatrix(), and getConcretePtr().

Site Contact