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:

[legend]
List of all members.

Public Member Functions

 Ifpack_DiagonalFilter (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 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)
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

Epetra_RowMatrixA_
 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.
vector< int > pos_
 Stores the position of the diagonal element, or -1 if not present.
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:

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 36 of file Ifpack_DiagonalFilter.h.


Constructor & Destructor Documentation

Ifpack_DiagonalFilter::Ifpack_DiagonalFilter Epetra_RowMatrix Matrix,
double  AbsoluteThreshold,
double  RelativeThreshold
[inline]
 

Constructor.

Definition at line 40 of file Ifpack_DiagonalFilter.h.

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

Destructor.

Definition at line 77 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 80 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 86 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 12 of file Ifpack_DiagonalFilter.cpp.

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

Implements Epetra_RowMatrix.

Definition at line 94 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 27 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 102 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 109 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 115 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 121 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 126 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 131 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 136 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 141 of file Ifpack_DiagonalFilter.h.

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

Not implemented for efficiency reasons.

Implements Epetra_RowMatrix.

Definition at line 147 of file Ifpack_DiagonalFilter.h.

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

Not implemented for efficiency reasons.

Implements Epetra_RowMatrix.

Definition at line 153 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 int Ifpack_DiagonalFilter::NumMyNonzeros  )  const [inline, virtual]
 

Implements Epetra_RowMatrix.

Definition at line 178 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 183 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 188 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 193 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 198 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 203 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 208 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 213 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_RowMatrix.

Definition at line 218 of file Ifpack_DiagonalFilter.h.

int Ifpack_DiagonalFilter::SetUseTranspose bool  UseTranspose  )  [inline, virtual]
 

Implements Epetra_Operator.

Definition at line 223 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_Operator.

Definition at line 228 of file Ifpack_DiagonalFilter.h.

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

Not implemented for efficiency reasons.

Implements Epetra_Operator.

Definition at line 234 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_Operator.

Definition at line 239 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_Operator.

Definition at line 244 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_Operator.

Definition at line 249 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_SrcDistObject.

Definition at line 254 of file Ifpack_DiagonalFilter.h.

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

Implements Epetra_Operator.

Definition at line 259 of file Ifpack_DiagonalFilter.h.


Member Data Documentation

Epetra_RowMatrix& Ifpack_DiagonalFilter::A_ [private]
 

Pointer to the matrix to be filtered.

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

double Ifpack_DiagonalFilter::RelativeThreshold_ [private]
 

Multiplies A(i,i) by this value.

Definition at line 270 of file Ifpack_DiagonalFilter.h.

vector<int> Ifpack_DiagonalFilter::pos_ [private]
 

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

Definition at line 272 of file Ifpack_DiagonalFilter.h.

vector<double> Ifpack_DiagonalFilter::val_ [private]
 

Stores as additional diagonal contribution due to the filter.

Definition at line 274 of file Ifpack_DiagonalFilter.h.


The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:37:30 2008 for Ifpack Package Browser (Single Doxygen Collection) by doxygen 1.3.9.1