Public Member Functions | Related Functions
TSFExtended::EpetraMatrix Class Reference
Inheritance diagram for TSFExtended::EpetraMatrix:
TSFExtended::LoadableMatrix< double > TSFExtended::RowAccessibleOp< double > Sundance::Printable Sundance::NamedObject TSFExtended::ILUFactorizableOp< double >

List of all members.

Public Member Functions

 EpetraMatrix (const Epetra_CrsGraph &graph, const RCP< const EpetraVectorSpace > &domain, const RCP< const EpetraVectorSpace > &range)
 Construct an empty EpetraMatrix structured according to the graph argument.
 EpetraMatrix (const RCP< Epetra_CrsMatrix > &mat, const RCP< const EpetraVectorSpace > &domain, const RCP< const EpetraVectorSpace > &range)
 Wrap an existing Epetra CRS Matrix.
RCP< const VectorSpaceBase
< double > > 
domain () const
RCP< const VectorSpaceBase
< double > > 
range () const
bool opSupportedImpl (Thyra::EOpTransp M_trans) const
 
void applyImpl (const Thyra::EOpTransp M_trans, const Thyra::MultiVectorBase< double > &x, const Teuchos::Ptr< Thyra::MultiVectorBase< double > > &y, const double alpha, const double beta) const
virtual void addToRow (int globalRowIndex, int nElemsToInsert, const int *globalColumnIndices, const double *elementValues)
 Insert a set of elements in a row, adding to any previously existing values.
virtual void addToElementBatch (int numRows, int rowBlockSize, const int *globalRowIndices, int numColumnsPerRow, const int *globalColumnIndices, const double *values, const int *skipRow)
 Add to a batch of elements.
virtual void zero ()
 Set all elements to zero, preserving the existing structure.
Epetra-Thyra adapter interface
void getNonconstEpetraOpView (const Teuchos::Ptr< Teuchos::RCP< Epetra_Operator > > &epetraOp, const Teuchos::Ptr< Thyra::EOpTransp > &epetraOpTransp, const Teuchos::Ptr< Thyra::EApplyEpetraOpAs > &epetraOpApplyAs, const Teuchos::Ptr< Thyra::EAdjointEpetraOp > &epetraOpAdjointSupport)
 
void getEpetraOpView (const Teuchos::Ptr< Teuchos::RCP< const Epetra_Operator > > &epetraOp, const Teuchos::Ptr< Thyra::EOpTransp > &epetraOpTransp, const Teuchos::Ptr< Thyra::EApplyEpetraOpAs > &epetraOpApplyAs, const Teuchos::Ptr< Thyra::EAdjointEpetraOp > &epetraOpAdjointSupport) const
 
Teuchos::RCP< const
ScalarProdVectorSpaceBase
< double > > 
rangeScalarProdVecSpc () const
 Returns this->mpiRange()
Teuchos::RCP< const
ScalarProdVectorSpaceBase
< double > > 
domainScalarProdVecSpc () const
 Returns this->mpiDomain()

Related Functions

(Note that these are not member functions.)

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

incomplete factorization preconditioning interface

RCP< Epetra_CrsMatrix > matrix_
RCP< const VectorSpaceBase
< double > > 
range_
RCP< const VectorSpaceBase
< double > > 
domain_
virtual void getILUKPreconditioner (int fillLevels, int overlapFill, double relaxationValue, double relativeThreshold, double absoluteThreshold, LeftOrRight leftOrRight, Preconditioner< double > &rtn) const
 create an incomplete factorization.
virtual void print (std::ostream &os) const
 Printable interface.
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
 Read-only access to the underlying crs matrix.
static Epetra_CrsMatrix & getConcrete (const LinearOperator< double > &A)
static RCP< const
Epetra_CrsMatrix > 
getConcretePtr (const LinearOperator< double > &A)
void getRow (const int &row, Teuchos::Array< int > &indices, Teuchos::Array< double > &values) const
 Get the specified row as defined by RowAccessible.
Epetra_CrsMatrix * crsMatrix ()
const Epetra_Map & getRangeMap () const
const Epetra_Map & getDomainMap () const

Detailed Description

Definition at line 49 of file TSFEpetraMatrix.hpp.


Constructor & Destructor Documentation

EpetraMatrix::EpetraMatrix ( const Epetra_CrsGraph &  graph,
const RCP< const EpetraVectorSpace > &  domain,
const RCP< const EpetraVectorSpace > &  range 
)

Construct an empty EpetraMatrix structured according to the graph argument.

Definition at line 56 of file TSFEpetraMatrix.cpp.

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

Wrap an existing Epetra CRS Matrix.

Definition at line 64 of file TSFEpetraMatrix.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 TSFExtended::LoadableMatrix< double >.

Definition at line 200 of file TSFEpetraMatrix.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 TSFExtended::LoadableMatrix< double >.

Definition at line 183 of file TSFEpetraMatrix.cpp.

References crsMatrix().

void EpetraMatrix::applyImpl ( const Thyra::EOpTransp  M_trans,
const Thyra::MultiVectorBase< double > &  x,
const Teuchos::Ptr< Thyra::MultiVectorBase< double > > &  y,
const double  alpha,
const double  beta 
) const

Definition at line 79 of file TSFEpetraMatrix.cpp.

References TSFExtended::EpetraVector::epetraVec(), and matrix_.

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

Definition at line 287 of file TSFEpetraMatrix.cpp.

References matrix_.

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

Definition at line 171 of file TSFEpetraMatrix.hpp.

string EpetraMatrix::description ( ) const
RCP< const VectorSpaceBase<double> > TSFExtended::EpetraMatrix::domain ( ) const [inline]

Definition at line 71 of file TSFEpetraMatrix.hpp.

RCP< const ScalarProdVectorSpaceBase< double > > EpetraMatrix::domainScalarProdVecSpc ( ) const

Returns this->mpiDomain()

Definition at line 177 of file TSFEpetraMatrix.cpp.

References domain_.

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

Definition at line 343 of file TSFEpetraMatrix.cpp.

References matrix_.

void EpetraMatrix::getEpetraOpView ( const Teuchos::Ptr< Teuchos::RCP< const Epetra_Operator > > &  epetraOp,
const Teuchos::Ptr< Thyra::EOpTransp > &  epetraOpTransp,
const Teuchos::Ptr< Thyra::EApplyEpetraOpAs > &  epetraOpApplyAs,
const Teuchos::Ptr< Thyra::EAdjointEpetraOp > &  epetraOpAdjointSupport 
) const

Definition at line 153 of file TSFEpetraMatrix.cpp.

References matrix_.

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 TSFExtended::ILUFactorizableOp< double >.

Definition at line 241 of file TSFEpetraMatrix.cpp.

References TSFExtended::Left.

void EpetraMatrix::getNonconstEpetraOpView ( const Teuchos::Ptr< Teuchos::RCP< Epetra_Operator > > &  epetraOp,
const Teuchos::Ptr< Thyra::EOpTransp > &  epetraOpTransp,
const Teuchos::Ptr< Thyra::EApplyEpetraOpAs > &  epetraOpApplyAs,
const Teuchos::Ptr< Thyra::EAdjointEpetraOp > &  epetraOpAdjointSupport 
)

Definition at line 137 of file TSFEpetraMatrix.cpp.

References matrix_.

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

Definition at line 338 of file TSFEpetraMatrix.cpp.

References matrix_.

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

Get the specified row as defined by RowAccessible.

Implements TSFExtended::RowAccessibleOp< double >.

Definition at line 312 of file TSFEpetraMatrix.cpp.

References crsMatrix().

bool EpetraMatrix::opSupportedImpl ( Thyra::EOpTransp  M_trans) const

Definition at line 73 of file TSFEpetraMatrix.cpp.

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

Printable interface.

Implements Sundance::Printable.

Definition at line 270 of file TSFEpetraMatrix.cpp.

References crsMatrix().

RCP< const VectorSpaceBase<double> > TSFExtended::EpetraMatrix::range ( ) const [inline]

Definition at line 74 of file TSFEpetraMatrix.hpp.

RCP< const ScalarProdVectorSpaceBase< double > > EpetraMatrix::rangeScalarProdVecSpc ( ) const

Returns this->mpiRange()

Definition at line 170 of file TSFEpetraMatrix.cpp.

References range_.

void EpetraMatrix::zero ( ) [virtual]

Set all elements to zero, preserving the existing structure.

Implements TSFExtended::LoadableMatrix< double >.

Definition at line 234 of file TSFEpetraMatrix.cpp.

References crsMatrix().

Referenced by TSFExtended::makeEpetraDiagonalMatrix().


Friends And Related Function Documentation

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

Definition at line 49 of file TSFEpetraMatrixOps.cpp.

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

Definition at line 65 of file TSFEpetraMatrixOps.cpp.


Member Data Documentation

RCP<const VectorSpaceBase<double> > TSFExtended::EpetraMatrix::domain_ [private]

Definition at line 212 of file TSFEpetraMatrix.hpp.

Referenced by domainScalarProdVecSpc().

RCP<Epetra_CrsMatrix> TSFExtended::EpetraMatrix::matrix_ [private]
RCP<const VectorSpaceBase<double> > TSFExtended::EpetraMatrix::range_ [private]

Definition at line 210 of file TSFEpetraMatrix.hpp.

Referenced by rangeScalarProdVecSpc().

Site Contact