Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Related Functions
Playa::EpetraMatrix Class Reference
Inheritance diagram for Playa::EpetraMatrix:
Playa::LinearOpWithSpaces< double > Playa::LoadableMatrix< double > Playa::RowAccessibleOp< double > Playa::Printable Playa::ILUFactorizableOp< double > Playa::ICCFactorizableOp< 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
virtual void getICCPreconditioner (int fillLevels, int overlapFill, double dropTolerance, double relaxationValue, double relativeThreshold, double absoluteThreshold, 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 62 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 67 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 74 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 120 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:
globalRowIndexthe global index of the row to which these elements belong.
nElemsToInsertthe number of elements being inserted in this step
globalColumnIndicesarray of column indices. Must be nElemsToInsert in length.
elementsarray of element values. Must be nElemsToInsert in length

Implements Playa::LoadableMatrix< double >.

Definition at line 101 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 82 of file PlayaEpetraMatrix.cpp.

References getConcrete(), and matrix_.

const Epetra_CrsMatrix * EpetraMatrix::crsMatrix ( ) const
Epetra_CrsMatrix * EpetraMatrix::crsMatrix ( ) [private]

Definition at line 228 of file PlayaEpetraMatrix.cpp.

References matrix_.

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 186 of file PlayaEpetraMatrix.hpp.

References description().

string EpetraMatrix::description ( ) const

Definition at line 218 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::getICCPreconditioner ( int  fillLevels,
int  overlapFill,
double  dropTolerance,
double  relaxationValue,
double  relativeThreshold,
double  absoluteThreshold,
Preconditioner< double > &  rtn 
) const [virtual]

create an incomplete factorization.

Parameters:
fillLevelsnumber of levels of fill on the local processor
overlapFillnumber of levels of fill on remote processors
relaxationValuefraction of dropped values to be added to the diagonal
relativeThresholdrelative diagonal perutrbation
absoluteThresholdabsolute diagonal perturbation
rtnnewly created preconditioner, returned by reference argument.

Definition at line 189 of file PlayaEpetraMatrix.cpp.

References Playa::LinearOperator< Scalar >::transpose().

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:
fillLevelsnumber of levels of fill on the local processor
overlapFillnumber of levels of fill on remote processors
relaxationValuefraction of dropped values to be added to the diagonal
relativeThresholdrelative diagonal perutrbation
absoluteThresholdabsolute diagonal perturbation
leftOrRightwhether this preconditioner is to be applied from the left or right
rtnnewly created preconditioner, returned by reference argument.

Implements Playa::ILUFactorizableOp< double >.

Definition at line 161 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 253 of file PlayaEpetraMatrix.cpp.

References crsMatrix().

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

Print the matrix

Implements Playa::Printable.

Definition at line 212 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 154 of file PlayaEpetraMatrix.cpp.

References crsMatrix().

Referenced by Playa::makeEpetraDiagonalMatrix().


Friends And Related Function Documentation

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

Definition at line 63 of file PlayaEpetraMatrixOps.cpp.

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

Definition at line 79 of file PlayaEpetraMatrixOps.cpp.


Member Data Documentation

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

Definition at line 215 of file PlayaEpetraMatrix.hpp.

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

Site Contact