Ifpack Package Browser (Single Doxygen Collection)  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
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]

Public Member Functions

 Ifpack_DiagonalFilter (const Teuchos::RefCountPtr< Epetra_RowMatrix > &Matrix, double AbsoluteThreshold, double RelativeThreshold)
 Constructor. More...
 
virtual ~Ifpack_DiagonalFilter ()
 Destructor. More...
 
virtual int NumMyRowEntries (int MyRow, int &NumEntries) const
 Returns the number of entries in MyRow. More...
 
virtual int MaxNumEntries () const
 Returns the maximum number of entries. More...
 
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, bool, bool, const Epetra_MultiVector &, Epetra_MultiVector &) const
 
virtual int Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
 
virtual int ApplyInverse (const Epetra_MultiVector &, Epetra_MultiVector &) const
 
virtual int InvRowSums (Epetra_Vector &) const
 
virtual int LeftScale (const Epetra_Vector &x)
 
virtual int InvColSums (Epetra_Vector &) const
 
virtual int RightScale (const Epetra_Vector &x)
 
virtual bool Filled () const
 
virtual double NormInf () const
 Not implemented for efficiency reasons. More...
 
virtual double NormOne () const
 Not implemented for efficiency reasons. More...
 
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. More...
 
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. More...
 
double AbsoluteThreshold_
 This value (times the sgn(A(i,i)) is added to the diagonal elements. More...
 
double RelativeThreshold_
 Multiplies A(i,i) by this value. More...
 
std::vector< int > pos_
 Stores the position of the diagonal element, or -1 if not present. More...
 
std::vector< double > val_
 Stores as additional diagonal contribution due to the filter. More...
 

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 80 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 53 of file Ifpack_DiagonalFilter.cpp.

virtual Ifpack_DiagonalFilter::~Ifpack_DiagonalFilter ( )
inlinevirtual

Destructor.

Definition at line 89 of file Ifpack_DiagonalFilter.h.

Member Function Documentation

virtual int Ifpack_DiagonalFilter::NumMyRowEntries ( int  MyRow,
int &  NumEntries 
) const
inlinevirtual

Returns the number of entries in MyRow.

Implements Epetra_RowMatrix.

Definition at line 92 of file Ifpack_DiagonalFilter.h.

virtual int Ifpack_DiagonalFilter::MaxNumEntries ( ) const
inlinevirtual

Returns the maximum number of entries.

Implements Epetra_RowMatrix.

Definition at line 98 of file Ifpack_DiagonalFilter.h.

int Ifpack_DiagonalFilter::ExtractMyRowCopy ( int  MyRow,
int  Length,
int &  NumEntries,
double *  Values,
int *  Indices 
) const
inlinevirtual

Implements Epetra_RowMatrix.

Definition at line 95 of file Ifpack_DiagonalFilter.cpp.

virtual int Ifpack_DiagonalFilter::ExtractDiagonalCopy ( Epetra_Vector Diagonal) const
inlinevirtual

Implements Epetra_RowMatrix.

Definition at line 106 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 110 of file Ifpack_DiagonalFilter.cpp.

virtual int Ifpack_DiagonalFilter::Solve ( bool  ,
bool  ,
bool  ,
const Epetra_MultiVector ,
Epetra_MultiVector  
) const
inlinevirtual

Implements Epetra_RowMatrix.

Definition at line 115 of file Ifpack_DiagonalFilter.h.

virtual int Ifpack_DiagonalFilter::Apply ( const Epetra_MultiVector X,
Epetra_MultiVector Y 
) const
inlinevirtual

Implements Epetra_Operator.

Definition at line 122 of file Ifpack_DiagonalFilter.h.

virtual int Ifpack_DiagonalFilter::ApplyInverse ( const Epetra_MultiVector ,
Epetra_MultiVector  
) const
inlinevirtual

Implements Epetra_Operator.

Definition at line 129 of file Ifpack_DiagonalFilter.h.

virtual int Ifpack_DiagonalFilter::InvRowSums ( Epetra_Vector ) const
inlinevirtual

Implements Epetra_RowMatrix.

Definition at line 135 of file Ifpack_DiagonalFilter.h.

virtual int Ifpack_DiagonalFilter::LeftScale ( const Epetra_Vector x)
inlinevirtual

Implements Epetra_RowMatrix.

Definition at line 140 of file Ifpack_DiagonalFilter.h.

virtual int Ifpack_DiagonalFilter::InvColSums ( Epetra_Vector ) const
inlinevirtual

Implements Epetra_RowMatrix.

Definition at line 145 of file Ifpack_DiagonalFilter.h.

virtual int Ifpack_DiagonalFilter::RightScale ( const Epetra_Vector x)
inlinevirtual

Implements Epetra_RowMatrix.

Definition at line 150 of file Ifpack_DiagonalFilter.h.

virtual bool Ifpack_DiagonalFilter::Filled ( ) const
inlinevirtual

Implements Epetra_RowMatrix.

Definition at line 155 of file Ifpack_DiagonalFilter.h.

virtual double Ifpack_DiagonalFilter::NormInf ( ) const
inlinevirtual

Not implemented for efficiency reasons.

Implements Epetra_RowMatrix.

Definition at line 161 of file Ifpack_DiagonalFilter.h.

virtual double Ifpack_DiagonalFilter::NormOne ( ) const
inlinevirtual

Not implemented for efficiency reasons.

Implements Epetra_RowMatrix.

Definition at line 167 of file Ifpack_DiagonalFilter.h.

virtual int Ifpack_DiagonalFilter::NumGlobalNonzeros ( ) const
inlinevirtual

Implements Epetra_RowMatrix.

Definition at line 173 of file Ifpack_DiagonalFilter.h.

virtual int Ifpack_DiagonalFilter::NumGlobalRows ( ) const
inlinevirtual

Implements Epetra_RowMatrix.

Definition at line 178 of file Ifpack_DiagonalFilter.h.

virtual int Ifpack_DiagonalFilter::NumGlobalCols ( ) const
inlinevirtual

Implements Epetra_RowMatrix.

Definition at line 183 of file Ifpack_DiagonalFilter.h.

virtual int Ifpack_DiagonalFilter::NumGlobalDiagonals ( ) const
inlinevirtual

Implements Epetra_RowMatrix.

Definition at line 188 of file Ifpack_DiagonalFilter.h.

virtual long long Ifpack_DiagonalFilter::NumGlobalNonzeros64 ( ) const
inlinevirtual

Implements Epetra_RowMatrix.

Definition at line 194 of file Ifpack_DiagonalFilter.h.

virtual long long Ifpack_DiagonalFilter::NumGlobalRows64 ( ) const
inlinevirtual

Implements Epetra_RowMatrix.

Definition at line 199 of file Ifpack_DiagonalFilter.h.

virtual long long Ifpack_DiagonalFilter::NumGlobalCols64 ( ) const
inlinevirtual

Implements Epetra_RowMatrix.

Definition at line 204 of file Ifpack_DiagonalFilter.h.

virtual long long Ifpack_DiagonalFilter::NumGlobalDiagonals64 ( ) const
inlinevirtual

Implements Epetra_RowMatrix.

Definition at line 209 of file Ifpack_DiagonalFilter.h.

virtual int Ifpack_DiagonalFilter::NumMyNonzeros ( ) const
inlinevirtual

Implements Epetra_RowMatrix.

Definition at line 214 of file Ifpack_DiagonalFilter.h.

virtual int Ifpack_DiagonalFilter::NumMyRows ( ) const
inlinevirtual

Implements Epetra_RowMatrix.

Definition at line 219 of file Ifpack_DiagonalFilter.h.

virtual int Ifpack_DiagonalFilter::NumMyCols ( ) const
inlinevirtual

Implements Epetra_RowMatrix.

Definition at line 224 of file Ifpack_DiagonalFilter.h.

virtual int Ifpack_DiagonalFilter::NumMyDiagonals ( ) const
inlinevirtual

Implements Epetra_RowMatrix.

Definition at line 229 of file Ifpack_DiagonalFilter.h.

virtual bool Ifpack_DiagonalFilter::LowerTriangular ( ) const
inlinevirtual

Implements Epetra_RowMatrix.

Definition at line 234 of file Ifpack_DiagonalFilter.h.

virtual bool Ifpack_DiagonalFilter::UpperTriangular ( ) const
inlinevirtual

Implements Epetra_RowMatrix.

Definition at line 239 of file Ifpack_DiagonalFilter.h.

virtual const Epetra_Map& Ifpack_DiagonalFilter::RowMatrixRowMap ( ) const
inlinevirtual

Implements Epetra_RowMatrix.

Definition at line 244 of file Ifpack_DiagonalFilter.h.

virtual const Epetra_Map& Ifpack_DiagonalFilter::RowMatrixColMap ( ) const
inlinevirtual

Implements Epetra_RowMatrix.

Definition at line 249 of file Ifpack_DiagonalFilter.h.

virtual const Epetra_Import* Ifpack_DiagonalFilter::RowMatrixImporter ( ) const
inlinevirtual

Implements Epetra_RowMatrix.

Definition at line 254 of file Ifpack_DiagonalFilter.h.

int Ifpack_DiagonalFilter::SetUseTranspose ( bool  UseTranspose_in)
inlinevirtual

Implements Epetra_Operator.

Definition at line 259 of file Ifpack_DiagonalFilter.h.

bool Ifpack_DiagonalFilter::UseTranspose ( ) const
inlinevirtual

Implements Epetra_Operator.

Definition at line 264 of file Ifpack_DiagonalFilter.h.

bool Ifpack_DiagonalFilter::HasNormInf ( ) const
inlinevirtual

Not implemented for efficiency reasons.

Implements Epetra_Operator.

Definition at line 270 of file Ifpack_DiagonalFilter.h.

const Epetra_Comm& Ifpack_DiagonalFilter::Comm ( ) const
inlinevirtual

Implements Epetra_Operator.

Definition at line 275 of file Ifpack_DiagonalFilter.h.

const Epetra_Map& Ifpack_DiagonalFilter::OperatorDomainMap ( ) const
inlinevirtual

Implements Epetra_Operator.

Definition at line 280 of file Ifpack_DiagonalFilter.h.

const Epetra_Map& Ifpack_DiagonalFilter::OperatorRangeMap ( ) const
inlinevirtual

Implements Epetra_Operator.

Definition at line 285 of file Ifpack_DiagonalFilter.h.

const Epetra_BlockMap& Ifpack_DiagonalFilter::Map ( ) const
inlinevirtual

Implements Epetra_SrcDistObject.

Definition at line 290 of file Ifpack_DiagonalFilter.h.

const char* Ifpack_DiagonalFilter::Label ( ) const
inlinevirtual

Implements Epetra_Operator.

Definition at line 295 of file Ifpack_DiagonalFilter.h.

Member Data Documentation

Teuchos::RefCountPtr<Epetra_RowMatrix> Ifpack_DiagonalFilter::A_
private

Pointer to the matrix to be filtered.

Definition at line 302 of file Ifpack_DiagonalFilter.h.

double Ifpack_DiagonalFilter::AbsoluteThreshold_
private

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

Definition at line 304 of file Ifpack_DiagonalFilter.h.

double Ifpack_DiagonalFilter::RelativeThreshold_
private

Multiplies A(i,i) by this value.

Definition at line 306 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 308 of file Ifpack_DiagonalFilter.h.

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

Stores as additional diagonal contribution due to the filter.

Definition at line 310 of file Ifpack_DiagonalFilter.h.


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