Ifpack_Chebyshev Class Reference

Ifpack_Chebyshev: class for preconditioning with Chebyshev polynomials in Ifpack. More...

#include <Ifpack_Chebyshev.h>

Inheritance diagram for Ifpack_Chebyshev:

Inheritance graph
[legend]
List of all members.
 Ifpack_Chebyshev (const Epetra_Operator *Matrix)
 Ifpack_Chebyshev constructor with given Epetra_Operator/Epetra_RowMatrix.
 Ifpack_Chebyshev (const Epetra_RowMatrix *Matrix)
 Ifpack_Chebyshev constructor with given Epetra_Operator/Epetra_RowMatrix.
virtual ~Ifpack_Chebyshev ()
 Destructor.
virtual int Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
 Applies the matrix to an Epetra_MultiVector.
virtual int ApplyInverse (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
 Applies the preconditioner to X, returns the result in Y.
virtual double NormInf () const
 Returns the infinity norm of the global matrix (not implemented).
virtual const char * Label () const
virtual bool UseTranspose () const
 Returns the current UseTranspose setting.
virtual bool HasNormInf () const
 Returns true if the this object can provide an approximate Inf-norm, false otherwise.
virtual const Epetra_CommComm () const
 Returns a pointer to the Epetra_Comm communicator associated with this operator.
virtual const Epetra_MapOperatorDomainMap () const
 Returns the Epetra_Map object associated with the domain of this operator.
virtual const Epetra_MapOperatorRangeMap () const
 Returns the Epetra_Map object associated with the range of this operator.
virtual int Initialize ()
 Computes all it is necessary to initialize the preconditioner.
virtual bool IsInitialized () const
 Returns true if the preconditioner has been successfully initialized, false otherwise.
virtual bool IsComputed () const
 Returns true if the preconditioner has been successfully computed.
virtual int Compute ()
 Computes the preconditioners.
virtual double GetLambdaMax ()
 Returns an approximation to the largest eigenvalue.
virtual double GetLambdaMin ()
 Contains an approximation to the smallest eigenvalue.
virtual const Epetra_RowMatrixMatrix () const
 Returns a pointer to the matrix to be preconditioned.
virtual double Condest (const Ifpack_CondestType CT=Ifpack_Cheap, const int MaxIters=1550, const double Tol=1e-9, Epetra_RowMatrix *Matrix_in=0)
 Computes the condition number estimates and returns the value.
virtual double Condest () const
 Returns the condition number estimate, or -1.0 if not computed.
virtual int SetParameters (Teuchos::ParameterList &List)
 Sets all the parameters for the preconditioner.
virtual ostream & Print (ostream &os) const
 Prints object to an output stream.
virtual int NumInitialize () const
 Returns the number of calls to Initialize().
virtual int NumCompute () const
 Returns the number of calls to Compute().
virtual int NumApplyInverse () const
 Returns the number of calls to ApplyInverse().
virtual double InitializeTime () const
 Returns the time spent in Initialize().
virtual double ComputeTime () const
 Returns the time spent in Compute().
virtual double ApplyInverseTime () const
 Returns the time spent in ApplyInverse().
virtual double InitializeFlops () const
 Returns the number of flops in the initialization phase.
virtual double ComputeFlops () const
 Returns the number of flops in the computation phase.
virtual double ApplyInverseFlops () const
 Returns the number of flops for the application of the preconditioner.
static int PowerMethod (const Epetra_Operator &Operator, const Epetra_Vector &InvPointDiagonal, const int MaximumIterations, double &LambdaMax)
 Simple power method to compute lambda_max.
static int CG (const Epetra_Operator &Operator, const Epetra_Vector &InvPointDiagonal, const int MaximumIterations, double &lambda_min, double &lambda_max)
 Uses AztecOO's CG to estimate lambda_min and lambda_max.
virtual void SetLabel ()
 Sets the label.
 Ifpack_Chebyshev (const Ifpack_Chebyshev &rhs)
 Copy constructor (PRIVATE, should not be used).
Ifpack_Chebyshevoperator= (const Ifpack_Chebyshev &rhs)
 operator = (PRIVATE, should not be used)
bool IsInitialized_
 If true, the preconditioner has been computed successfully.
bool IsComputed_
 If true, the preconditioner has been computed successfully.
int NumInitialize_
 Contains the number of successful calls to Initialize().
int NumCompute_
 Contains the number of successful call to Compute().
int NumApplyInverse_
 Contains the number of successful call to ApplyInverse().
double InitializeTime_
 Contains the time for all successful calls to Initialize().
double ComputeTime_
 Contains the time for all successful calls to Compute().
double ApplyInverseTime_
 Contains the time for all successful calls to ApplyInverse().
double ComputeFlops_
 Contains the number of flops for Compute().
double ApplyInverseFlops_
 Contain sthe number of flops for ApplyInverse().
int PolyDegree_
 Contains the degree of Chebyshev polynomial.
bool UseTranspose_
 If true, use the tranpose of Matrix_.
double Condest_
 Contains the estimated condition number.
bool ComputeCondest_
 If true, Compute() also computes the condition number estimate.
double EigRatio_
 Contains the ratio such that [LambdaMax_ / EigRatio_, LambdaMax_] is the interval of interest for the Chebyshev polynomial.
int EigMaxIters_
 Max number of iterations to use in eigenvalue estimation (if automatic).
string Label_
 Contains the label of this object.
double LambdaMin_
 Contains an approximation to the smallest eigenvalue.
double LambdaMax_
 Contains an approximation to the largest eigenvalue.
double MinDiagonalValue_
 Contains the minimum value on the diagonal.
int NumMyRows_
 Number of local rows.
int NumMyNonzeros_
 Number of local nonzeros.
int NumGlobalRows_
 Number of global rows.
int NumGlobalNonzeros_
 Number of global nonzeros.
Teuchos::RefCountPtr< const
Epetra_Operator
Operator_
 Pointers to the matrix to be preconditioned as an Epetra_Operator.
Teuchos::RefCountPtr< const
Epetra_RowMatrix
Matrix_
 Pointers to the matrix to be preconditioned as an Epetra_RowMatrix.
Teuchos::RefCountPtr< Epetra_VectorInvDiagonal_
 Contains the inverse of diagonal elements of Matrix.
bool UseBlockMode_
 Use Block Preconditioning.
bool IsRowMatrix_
 If true, the Operator_ is an Epetra_RowMatrix.
Teuchos::RefCountPtr< Epetra_TimeTime_
 Time object to track timing.
bool ZeroStartingSolution_
 If true, the starting solution is always the zero vector.

Public Member Functions

virtual int SetUseTranspose (bool UseTranspose_in)

Detailed Description

Ifpack_Chebyshev: class for preconditioning with Chebyshev polynomials in Ifpack.

The Ifpack_Chebyshev class enables the construction of preconditioners based on Chebyshev polynomials for an Epetra_RowMatrix. Ifpack_Chebyshev is derived from the Ifpack_Preconditioner class, which is itself derived from Epetra_Operator. Therefore this object can be used as preconditioner everywhere an ApplyInverse() method is required in the preconditioning step.

The class is an adaptation of the routine ML_Cheby in Smoother/ml_smoother.h

(04/04/06) Flops are not counted in the routine ApplyInverse()

(04/04/06) The switch to use the transpose matrix is not used in ApplyInverse()

The list of parameters is

Author:
Ulrich Hetmaniuk. SNL 1414.
Date:
Last modified on 04-Apr-06.

Definition at line 91 of file Ifpack_Chebyshev.h.


Constructor & Destructor Documentation

Ifpack_Chebyshev::Ifpack_Chebyshev ( const Epetra_Operator Matrix  ) 

Ifpack_Chebyshev constructor with given Epetra_Operator/Epetra_RowMatrix.

Creates an instance of Ifpack_Chebyshev class.

Parameters:
Matrix - (In) Pointer to the operator to precondition.

Definition at line 59 of file Ifpack_Chebyshev.cpp.

Ifpack_Chebyshev::Ifpack_Chebyshev ( const Epetra_RowMatrix Matrix  ) 

Ifpack_Chebyshev constructor with given Epetra_Operator/Epetra_RowMatrix.

Creates an instance of Ifpack_Chebyshev class.

Parameters:
Matrix - (In) Pointer to the matrix to precondition.

Definition at line 100 of file Ifpack_Chebyshev.cpp.

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

Destructor.

Definition at line 113 of file Ifpack_Chebyshev.h.

Ifpack_Chebyshev::Ifpack_Chebyshev ( const Ifpack_Chebyshev rhs  )  [inline, private]

Copy constructor (PRIVATE, should not be used).

Definition at line 332 of file Ifpack_Chebyshev.h.


Member Function Documentation

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

This flag can be used to apply the preconditioner to the transpose of the input operator.

Returns:
Integer error code, set to 0 if successful. Set to -1 if this implementation does not support transpose.

Implements Epetra_Operator.

Definition at line 123 of file Ifpack_Chebyshev.h.

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

Applies the matrix to an Epetra_MultiVector.

Parameters:
X - (In) A Epetra_MultiVector of dimension NumVectors to multiply with matrix.
Y - (Out) A Epetra_MultiVector of dimension NumVectors containing the result.
Returns:
Integer error code, set to 0 if successful.

Implements Epetra_Operator.

Definition at line 200 of file Ifpack_Chebyshev.cpp.

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

Applies the preconditioner to X, returns the result in Y.

Parameters:
X - (In) A Epetra_MultiVector of dimension NumVectors to be preconditioned.
Y - (InOut) A Epetra_MultiVector of dimension NumVectors containing result.
Returns:
Integer error code, set to 0 if successful.
Warning:
This routine is NOT AztecOO complaint.

Implements Ifpack_Preconditioner.

Definition at line 408 of file Ifpack_Chebyshev.cpp.

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

Returns the infinity norm of the global matrix (not implemented).

Implements Epetra_Operator.

Definition at line 158 of file Ifpack_Chebyshev.h.

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

Implements Epetra_Operator.

Definition at line 166 of file Ifpack_Chebyshev.h.

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

Returns the current UseTranspose setting.

Implements Epetra_Operator.

Definition at line 172 of file Ifpack_Chebyshev.h.

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

Returns true if the this object can provide an approximate Inf-norm, false otherwise.

Implements Epetra_Operator.

Definition at line 178 of file Ifpack_Chebyshev.h.

const Epetra_Comm & Ifpack_Chebyshev::Comm (  )  const [virtual]

Returns a pointer to the Epetra_Comm communicator associated with this operator.

Implements Epetra_Operator.

Definition at line 181 of file Ifpack_Chebyshev.cpp.

const Epetra_Map & Ifpack_Chebyshev::OperatorDomainMap (  )  const [virtual]

Returns the Epetra_Map object associated with the domain of this operator.

Implements Epetra_Operator.

Definition at line 187 of file Ifpack_Chebyshev.cpp.

const Epetra_Map & Ifpack_Chebyshev::OperatorRangeMap (  )  const [virtual]

Returns the Epetra_Map object associated with the range of this operator.

Implements Epetra_Operator.

Definition at line 193 of file Ifpack_Chebyshev.cpp.

int Ifpack_Chebyshev::Initialize (  )  [virtual]

Computes all it is necessary to initialize the preconditioner.

Implements Ifpack_Preconditioner.

Definition at line 221 of file Ifpack_Chebyshev.cpp.

virtual bool Ifpack_Chebyshev::IsInitialized (  )  const [inline, virtual]

Returns true if the preconditioner has been successfully initialized, false otherwise.

Implements Ifpack_Preconditioner.

Definition at line 194 of file Ifpack_Chebyshev.h.

virtual bool Ifpack_Chebyshev::IsComputed (  )  const [inline, virtual]

Returns true if the preconditioner has been successfully computed.

Implements Ifpack_Preconditioner.

Definition at line 200 of file Ifpack_Chebyshev.h.

int Ifpack_Chebyshev::Compute (  )  [virtual]

Computes the preconditioners.

Implements Ifpack_Preconditioner.

Definition at line 255 of file Ifpack_Chebyshev.cpp.

virtual double Ifpack_Chebyshev::GetLambdaMax (  )  [inline, virtual]

Returns an approximation to the largest eigenvalue.

Definition at line 209 of file Ifpack_Chebyshev.h.

virtual double Ifpack_Chebyshev::GetLambdaMin (  )  [inline, virtual]

Contains an approximation to the smallest eigenvalue.

Definition at line 212 of file Ifpack_Chebyshev.h.

virtual const Epetra_RowMatrix& Ifpack_Chebyshev::Matrix (  )  const [inline, virtual]

Returns a pointer to the matrix to be preconditioned.

Implements Ifpack_Preconditioner.

Definition at line 218 of file Ifpack_Chebyshev.h.

double Ifpack_Chebyshev::Condest ( const Ifpack_CondestType  CT = Ifpack_Cheap,
const int  MaxIters = 1550,
const double  Tol = 1e-9,
Epetra_RowMatrix Matrix_in = 0 
) [virtual]

Computes the condition number estimates and returns the value.

Implements Ifpack_Preconditioner.

Definition at line 386 of file Ifpack_Chebyshev.cpp.

virtual double Ifpack_Chebyshev::Condest (  )  const [inline, virtual]

Returns the condition number estimate, or -1.0 if not computed.

Implements Ifpack_Preconditioner.

Definition at line 230 of file Ifpack_Chebyshev.h.

int Ifpack_Chebyshev::SetParameters ( Teuchos::ParameterList &  List  )  [virtual]

Sets all the parameters for the preconditioner.

Implements Ifpack_Preconditioner.

Definition at line 134 of file Ifpack_Chebyshev.cpp.

ostream & Ifpack_Chebyshev::Print ( ostream &  os  )  const [virtual]

Prints object to an output stream.

Definition at line 329 of file Ifpack_Chebyshev.cpp.

virtual int Ifpack_Chebyshev::NumInitialize (  )  const [inline, virtual]

Returns the number of calls to Initialize().

Implements Ifpack_Preconditioner.

Definition at line 246 of file Ifpack_Chebyshev.h.

virtual int Ifpack_Chebyshev::NumCompute (  )  const [inline, virtual]

Returns the number of calls to Compute().

Implements Ifpack_Preconditioner.

Definition at line 252 of file Ifpack_Chebyshev.h.

virtual int Ifpack_Chebyshev::NumApplyInverse (  )  const [inline, virtual]

Returns the number of calls to ApplyInverse().

Implements Ifpack_Preconditioner.

Definition at line 258 of file Ifpack_Chebyshev.h.

virtual double Ifpack_Chebyshev::InitializeTime (  )  const [inline, virtual]

Returns the time spent in Initialize().

Implements Ifpack_Preconditioner.

Definition at line 264 of file Ifpack_Chebyshev.h.

virtual double Ifpack_Chebyshev::ComputeTime (  )  const [inline, virtual]

Returns the time spent in Compute().

Implements Ifpack_Preconditioner.

Definition at line 270 of file Ifpack_Chebyshev.h.

virtual double Ifpack_Chebyshev::ApplyInverseTime (  )  const [inline, virtual]

Returns the time spent in ApplyInverse().

Implements Ifpack_Preconditioner.

Definition at line 276 of file Ifpack_Chebyshev.h.

virtual double Ifpack_Chebyshev::InitializeFlops (  )  const [inline, virtual]

Returns the number of flops in the initialization phase.

Implements Ifpack_Preconditioner.

Definition at line 282 of file Ifpack_Chebyshev.h.

virtual double Ifpack_Chebyshev::ComputeFlops (  )  const [inline, virtual]

Returns the number of flops in the computation phase.

Implements Ifpack_Preconditioner.

Definition at line 288 of file Ifpack_Chebyshev.h.

virtual double Ifpack_Chebyshev::ApplyInverseFlops (  )  const [inline, virtual]

Returns the number of flops for the application of the preconditioner.

Implements Ifpack_Preconditioner.

Definition at line 294 of file Ifpack_Chebyshev.h.

int Ifpack_Chebyshev::PowerMethod ( const Epetra_Operator Operator,
const Epetra_Vector InvPointDiagonal,
const int  MaximumIterations,
double &  LambdaMax 
) [static]

Simple power method to compute lambda_max.

Definition at line 625 of file Ifpack_Chebyshev.cpp.

int Ifpack_Chebyshev::CG ( const Epetra_Operator Operator,
const Epetra_Vector InvPointDiagonal,
const int  MaximumIterations,
double &  lambda_min,
double &  lambda_max 
) [static]

Uses AztecOO's CG to estimate lambda_min and lambda_max.

Definition at line 658 of file Ifpack_Chebyshev.cpp.

void Ifpack_Chebyshev::SetLabel (  )  [private, virtual]

Sets the label.

Definition at line 401 of file Ifpack_Chebyshev.cpp.

Ifpack_Chebyshev& Ifpack_Chebyshev::operator= ( const Ifpack_Chebyshev rhs  )  [inline, private]

operator = (PRIVATE, should not be used)

Definition at line 336 of file Ifpack_Chebyshev.h.


Member Data Documentation

bool Ifpack_Chebyshev::IsInitialized_ [private]

If true, the preconditioner has been computed successfully.

Definition at line 343 of file Ifpack_Chebyshev.h.

bool Ifpack_Chebyshev::IsComputed_ [private]

If true, the preconditioner has been computed successfully.

Definition at line 345 of file Ifpack_Chebyshev.h.

int Ifpack_Chebyshev::NumInitialize_ [private]

Contains the number of successful calls to Initialize().

Definition at line 347 of file Ifpack_Chebyshev.h.

int Ifpack_Chebyshev::NumCompute_ [private]

Contains the number of successful call to Compute().

Definition at line 349 of file Ifpack_Chebyshev.h.

int Ifpack_Chebyshev::NumApplyInverse_ [mutable, private]

Contains the number of successful call to ApplyInverse().

Definition at line 351 of file Ifpack_Chebyshev.h.

double Ifpack_Chebyshev::InitializeTime_ [private]

Contains the time for all successful calls to Initialize().

Definition at line 353 of file Ifpack_Chebyshev.h.

double Ifpack_Chebyshev::ComputeTime_ [private]

Contains the time for all successful calls to Compute().

Definition at line 355 of file Ifpack_Chebyshev.h.

double Ifpack_Chebyshev::ApplyInverseTime_ [mutable, private]

Contains the time for all successful calls to ApplyInverse().

Definition at line 357 of file Ifpack_Chebyshev.h.

double Ifpack_Chebyshev::ComputeFlops_ [private]

Contains the number of flops for Compute().

Definition at line 359 of file Ifpack_Chebyshev.h.

double Ifpack_Chebyshev::ApplyInverseFlops_ [mutable, private]

Contain sthe number of flops for ApplyInverse().

Definition at line 361 of file Ifpack_Chebyshev.h.

int Ifpack_Chebyshev::PolyDegree_ [private]

Contains the degree of Chebyshev polynomial.

Definition at line 366 of file Ifpack_Chebyshev.h.

bool Ifpack_Chebyshev::UseTranspose_ [private]

If true, use the tranpose of Matrix_.

Definition at line 368 of file Ifpack_Chebyshev.h.

double Ifpack_Chebyshev::Condest_ [private]

Contains the estimated condition number.

Definition at line 370 of file Ifpack_Chebyshev.h.

bool Ifpack_Chebyshev::ComputeCondest_ [private]

If true, Compute() also computes the condition number estimate.

Definition at line 372 of file Ifpack_Chebyshev.h.

double Ifpack_Chebyshev::EigRatio_ [private]

Contains the ratio such that [LambdaMax_ / EigRatio_, LambdaMax_] is the interval of interest for the Chebyshev polynomial.

Definition at line 375 of file Ifpack_Chebyshev.h.

int Ifpack_Chebyshev::EigMaxIters_ [private]

Max number of iterations to use in eigenvalue estimation (if automatic).

Definition at line 377 of file Ifpack_Chebyshev.h.

string Ifpack_Chebyshev::Label_ [private]

Contains the label of this object.

Definition at line 379 of file Ifpack_Chebyshev.h.

double Ifpack_Chebyshev::LambdaMin_ [private]

Contains an approximation to the smallest eigenvalue.

Definition at line 381 of file Ifpack_Chebyshev.h.

double Ifpack_Chebyshev::LambdaMax_ [private]

Contains an approximation to the largest eigenvalue.

Definition at line 383 of file Ifpack_Chebyshev.h.

double Ifpack_Chebyshev::MinDiagonalValue_ [private]

Contains the minimum value on the diagonal.

Definition at line 385 of file Ifpack_Chebyshev.h.

int Ifpack_Chebyshev::NumMyRows_ [private]

Number of local rows.

Definition at line 390 of file Ifpack_Chebyshev.h.

int Ifpack_Chebyshev::NumMyNonzeros_ [private]

Number of local nonzeros.

Definition at line 392 of file Ifpack_Chebyshev.h.

int Ifpack_Chebyshev::NumGlobalRows_ [private]

Number of global rows.

Definition at line 394 of file Ifpack_Chebyshev.h.

int Ifpack_Chebyshev::NumGlobalNonzeros_ [private]

Number of global nonzeros.

Definition at line 396 of file Ifpack_Chebyshev.h.

Teuchos::RefCountPtr<const Epetra_Operator> Ifpack_Chebyshev::Operator_ [private]

Pointers to the matrix to be preconditioned as an Epetra_Operator.

Definition at line 398 of file Ifpack_Chebyshev.h.

Teuchos::RefCountPtr<const Epetra_RowMatrix> Ifpack_Chebyshev::Matrix_ [private]

Pointers to the matrix to be preconditioned as an Epetra_RowMatrix.

Definition at line 400 of file Ifpack_Chebyshev.h.

Teuchos::RefCountPtr<Epetra_Vector> Ifpack_Chebyshev::InvDiagonal_ [mutable, private]

Contains the inverse of diagonal elements of Matrix.

Definition at line 402 of file Ifpack_Chebyshev.h.

bool Ifpack_Chebyshev::UseBlockMode_ [private]

Use Block Preconditioning.

Definition at line 404 of file Ifpack_Chebyshev.h.

bool Ifpack_Chebyshev::IsRowMatrix_ [private]

If true, the Operator_ is an Epetra_RowMatrix.

Definition at line 412 of file Ifpack_Chebyshev.h.

Teuchos::RefCountPtr<Epetra_Time> Ifpack_Chebyshev::Time_ [private]

Time object to track timing.

Definition at line 414 of file Ifpack_Chebyshev.h.

bool Ifpack_Chebyshev::ZeroStartingSolution_ [private]

If true, the starting solution is always the zero vector.

Definition at line 416 of file Ifpack_Chebyshev.h.


The documentation for this class was generated from the following files:
Generated on Wed May 12 21:30:30 2010 for Ifpack Package Browser (Single Doxygen Collection) by  doxygen 1.4.7