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

Ifpack_DiagonalFilter: Filter to modify the diagonal entries of a given Epetra_RowMatrix. More...

#include <Ifpack_DiagonalFilter.h>

Inheritance diagram for Ifpack_DiagonalFilter:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Ifpack_DiagonalFilter (const Teuchos::RefCountPtr< Epetra_RowMatrix > &Matrix, double AbsoluteThreshold, double RelativeThreshold)
 Constructor.
virtual ~Ifpack_DiagonalFilter ()
 Destructor.
virtual int NumMyRowEntries (int MyRow, int &NumEntries) const
 Returns the number of entries in MyRow.
virtual int MaxNumEntries () const
 Returns the maximum number of entries.
virtual int ExtractMyRowCopy (int MyRow, int Length, int &NumEntries, double *Values, int *Indices) const
virtual int ExtractDiagonalCopy (Epetra_Vector &Diagonal) const
virtual int Multiply (bool TransA, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
virtual int Solve (bool Upper, bool Trans, bool UnitDiagonal, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
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
virtual int LeftScale (const Epetra_Vector &x)
virtual int InvColSums (Epetra_Vector &x) const
virtual int RightScale (const Epetra_Vector &x)
virtual bool Filled () const
virtual double NormInf () const
 Not implemented for efficiency reasons.
virtual double NormOne () const
 Not implemented for efficiency reasons.
virtual int NumGlobalNonzeros () const
virtual int NumGlobalRows () const
virtual int NumGlobalCols () const
virtual int NumGlobalDiagonals () const
virtual long long NumGlobalNonzeros64 () const
virtual long long NumGlobalRows64 () const
virtual long long NumGlobalCols64 () const
virtual long long NumGlobalDiagonals64 () const
virtual int NumMyNonzeros () const
virtual int NumMyRows () const
virtual int NumMyCols () const
virtual int NumMyDiagonals () const
virtual bool LowerTriangular () const
virtual bool UpperTriangular () const
virtual const Epetra_MapRowMatrixRowMap () const
virtual const Epetra_MapRowMatrixColMap () const
virtual const Epetra_ImportRowMatrixImporter () const
int SetUseTranspose (bool UseTranspose_in)
bool UseTranspose () const
bool HasNormInf () const
 Not implemented for efficiency reasons.
const Epetra_CommComm () const
const Epetra_MapOperatorDomainMap () const
const Epetra_MapOperatorRangeMap () const
const Epetra_BlockMapMap () const
const char * Label () const

Private Attributes

Teuchos::RefCountPtr
< Epetra_RowMatrix
A_
 Pointer to the matrix to be filtered.
double AbsoluteThreshold_
 This value (times the sgn(A(i,i)) is added to the diagonal elements.
double RelativeThreshold_
 Multiplies A(i,i) by this value.
std::vector< int > pos_
 Stores the position of the diagonal element, or -1 if not present.
std::vector< double > val_
 Stores as additional diagonal contribution due to the filter.

Detailed Description

Ifpack_DiagonalFilter: Filter to modify the diagonal entries of a given Epetra_RowMatrix.

Ifpack_DiagonalFilter modifies the elements on the diagonal.

A typical use is as follows:

Teuchos::RefCountPtr<Epetra_RowMatrix> A;
// creates a matrix B such that
// B(i,i) = AbsoluteThreshold * sgn(B(i,i)) + 
//          RelativeThreshold * B(i,i)
double AbsoluteThreshold = 1e-3;
double RelativeThreshold = 1.01;

Ifpack_DiagonalFilter B(A, AbsoluteThreshold, RelativeThreshold);
Author:
Marzio Sala, SNL 9214.

Last modified on 24-Jan-05.

Definition at line 67 of file Ifpack_DiagonalFilter.h.


Constructor & Destructor Documentation

Ifpack_DiagonalFilter::Ifpack_DiagonalFilter ( const Teuchos::RefCountPtr< Epetra_RowMatrix > &  Matrix,
double  AbsoluteThreshold,
double  RelativeThreshold 
)

Constructor.

Definition at line 40 of file Ifpack_DiagonalFilter.cpp.

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

Destructor.

Definition at line 76 of file Ifpack_DiagonalFilter.h.


Member Function Documentation

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

Returns the number of entries in MyRow.

Implements Epetra_RowMatrix.

Definition at line 79 of file Ifpack_DiagonalFilter.h.

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

Returns the maximum number of entries.

Implements Epetra_RowMatrix.

Definition at line 85 of file Ifpack_DiagonalFilter.h.

int Ifpack_DiagonalFilter::ExtractMyRowCopy ( int  MyRow,
int  Length,
int &  NumEntries,
double *  Values,
int *  Indices 
) const [inline, virtual]

Implements Epetra_RowMatrix.

Definition at line 78 of file Ifpack_DiagonalFilter.cpp.

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

Implements Epetra_RowMatrix.

Definition at line 93 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 93 of file Ifpack_DiagonalFilter.cpp.

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

Implements Epetra_RowMatrix.

Definition at line 101 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_Operator.

Definition at line 108 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_Operator.

Definition at line 114 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 120 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 125 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 130 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 135 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 140 of file Ifpack_DiagonalFilter.h.

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

Not implemented for efficiency reasons.

Implements Epetra_RowMatrix.

Definition at line 146 of file Ifpack_DiagonalFilter.h.

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

Not implemented for efficiency reasons.

Implements Epetra_RowMatrix.

Definition at line 152 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 158 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 163 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 168 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 173 of file Ifpack_DiagonalFilter.h.

virtual long long Ifpack_DiagonalFilter::NumGlobalNonzeros64 ( ) const [inline, virtual]

Implements Epetra_RowMatrix.

Definition at line 179 of file Ifpack_DiagonalFilter.h.

virtual long long Ifpack_DiagonalFilter::NumGlobalRows64 ( ) const [inline, virtual]

Implements Epetra_RowMatrix.

Definition at line 184 of file Ifpack_DiagonalFilter.h.

virtual long long Ifpack_DiagonalFilter::NumGlobalCols64 ( ) const [inline, virtual]

Implements Epetra_RowMatrix.

Definition at line 189 of file Ifpack_DiagonalFilter.h.

virtual long long Ifpack_DiagonalFilter::NumGlobalDiagonals64 ( ) const [inline, virtual]

Implements Epetra_RowMatrix.

Definition at line 194 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 199 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 204 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 209 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 214 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 219 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 224 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 229 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 234 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 239 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_Operator.

Definition at line 244 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_Operator.

Definition at line 249 of file Ifpack_DiagonalFilter.h.

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

Not implemented for efficiency reasons.

Implements Epetra_Operator.

Definition at line 255 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_Operator.

Definition at line 260 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_Operator.

Definition at line 265 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_Operator.

Definition at line 270 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_SrcDistObject.

Definition at line 275 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_Operator.

Definition at line 280 of file Ifpack_DiagonalFilter.h.


Member Data Documentation

Pointer to the matrix to be filtered.

Definition at line 287 of file Ifpack_DiagonalFilter.h.

This value (times the sgn(A(i,i)) is added to the diagonal elements.

Definition at line 289 of file Ifpack_DiagonalFilter.h.

Multiplies A(i,i) by this value.

Definition at line 291 of file Ifpack_DiagonalFilter.h.

std::vector<int> Ifpack_DiagonalFilter::pos_ [private]

Stores the position of the diagonal element, or -1 if not present.

Definition at line 293 of file Ifpack_DiagonalFilter.h.

std::vector<double> Ifpack_DiagonalFilter::val_ [private]

Stores as additional diagonal contribution due to the filter.

Definition at line 295 of file Ifpack_DiagonalFilter.h.


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