IFPACK  Development
 All Classes Namespaces Files Functions Variables Enumerations Friends Pages
Public Member Functions | List of all members
Ifpack_Polynomial Class Reference

Ifpack_Polynomial: class for preconditioning with least squares polynomials in Ifpack. More...

#include <Ifpack_Polynomial.h>

Inheritance diagram for Ifpack_Polynomial:
Inheritance graph
[legend]
Collaboration diagram for Ifpack_Polynomial:
Collaboration graph
[legend]

Public Member Functions

virtual int SetUseTranspose (bool UseTranspose_in)
 
 Ifpack_Polynomial (const Epetra_Operator *Matrix)
 Ifpack_Polynomial constructor with given Epetra_Operator/Epetra_RowMatrix. More...
 
 Ifpack_Polynomial (const Epetra_RowMatrix *Matrix)
 Ifpack_Polynomial constructor with given Epetra_Operator/Epetra_RowMatrix. More...
 
virtual ~Ifpack_Polynomial ()
 Destructor.
 
virtual int Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
 Applies the matrix to an Epetra_MultiVector. More...
 
virtual int ApplyInverse (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
 Applies the preconditioner to X, returns the result in Y. More...
 
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 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 std::ostream & Print (std::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.
 
int GMRES (const Epetra_Operator &Operator, const Epetra_Vector &InvPointDiagonal, const int MaximumIterations, double &lambda_real_min, double &lambda_real_max, double &lambda_imag_min, double &lambda_imag_max)
 Uses AztecOO's GMRES to estimate the height and width of the spectrum.
 
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.
 

Detailed Description

Ifpack_Polynomial: class for preconditioning with least squares polynomials in Ifpack.

The Ifpack_Polynomial class enables the construction of preconditioners based on least squares polynomials for an Epetra_RowMatrix. Similar to Ifpack_Chebyshev, Ifpack_Polynomial is designed for indefinite linear systems.

The list of parameters is

Author
Paul Tsuji, May 2013.

Definition at line 99 of file Ifpack_Polynomial.h.

Constructor & Destructor Documentation

Ifpack_Polynomial::Ifpack_Polynomial ( const Epetra_Operator Matrix)

Ifpack_Polynomial constructor with given Epetra_Operator/Epetra_RowMatrix.

Creates an instance of Ifpack_Polynomial class.

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

Definition at line 86 of file Ifpack_Polynomial.cpp.

Ifpack_Polynomial::Ifpack_Polynomial ( const Epetra_RowMatrix Matrix)

Ifpack_Polynomial constructor with given Epetra_Operator/Epetra_RowMatrix.

Creates an instance of Ifpack_Polynomial class.

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

Definition at line 135 of file Ifpack_Polynomial.cpp.

Member Function Documentation

int Ifpack_Polynomial::Apply ( const Epetra_MultiVector X,
Epetra_MultiVector Y 
) const
inlinevirtual

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 252 of file Ifpack_Polynomial.cpp.

References IsComputed(), and UseTranspose().

int Ifpack_Polynomial::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 628 of file Ifpack_Polynomial.cpp.

References IsComputed().

virtual int Ifpack_Polynomial::SetUseTranspose ( bool  UseTranspose_in)
inlinevirtual

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 131 of file Ifpack_Polynomial.h.


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