Ifpack Package Browser (Single Doxygen Collection)
Development

Ifpack_Preconditioner: basic class for preconditioning in Ifpack. More...
#include <Ifpack_Preconditioner.h>
Public Member Functions  
virtual int  SetParameters (Teuchos::ParameterList &List)=0 
Sets all parameters for the preconditioner. More...  
virtual int  Initialize ()=0 
Computes all it is necessary to initialize the preconditioner. More...  
virtual bool  IsInitialized () const =0 
Returns true if the preconditioner has been successfully initialized, false otherwise. More...  
virtual int  Compute ()=0 
Computes all it is necessary to apply the preconditioner. More...  
virtual bool  IsComputed () const =0 
Returns true if the preconditioner has been successfully computed, false otherwise. More...  
virtual double  Condest (const Ifpack_CondestType CT=Ifpack_Cheap, const int MaxIters=1550, const double Tol=1e9, Epetra_RowMatrix *Matrix=0)=0 
Computes the condition number estimate, returns its value. More...  
virtual double  Condest () const =0 
Returns the computed condition number estimate, or 1.0 if not computed. More...  
virtual int  ApplyInverse (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const =0 
Applies the preconditioner to vector X, returns the result in Y. More...  
virtual const Epetra_RowMatrix &  Matrix () const =0 
Returns a pointer to the matrix to be preconditioned. More...  
virtual int  NumInitialize () const =0 
Returns the number of calls to Initialize(). More...  
virtual int  NumCompute () const =0 
Returns the number of calls to Compute(). More...  
virtual int  NumApplyInverse () const =0 
Returns the number of calls to ApplyInverse(). More...  
virtual double  InitializeTime () const =0 
Returns the time spent in Initialize(). More...  
virtual double  ComputeTime () const =0 
Returns the time spent in Compute(). More...  
virtual double  ApplyInverseTime () const =0 
Returns the time spent in ApplyInverse(). More...  
virtual double  InitializeFlops () const =0 
Returns the number of flops in the initialization phase. More...  
virtual double  ComputeFlops () const =0 
Returns the number of flops in the computation phase. More...  
virtual double  ApplyInverseFlops () const =0 
Returns the number of flops in the application of the preconditioner. More...  
virtual std::ostream &  Print (std::ostream &os) const =0 
Prints basic information on iostream. This function is used by operator<<. More...  
Public Member Functions inherited from Epetra_Operator  
virtual int  SetUseTranspose (bool UseTranspose)=0 
virtual int  Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const =0 
virtual double  NormInf () const =0 
virtual const char *  Label () const =0 
virtual bool  UseTranspose () const =0 
virtual bool  HasNormInf () const =0 
virtual const Epetra_Comm &  Comm () const =0 
virtual const Epetra_Map &  OperatorDomainMap () const =0 
virtual const Epetra_Map &  OperatorRangeMap () const =0 
virtual int  SetUseTranspose (bool UseTranspose)=0 
virtual int  Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const =0 
virtual double  NormInf () const =0 
virtual const char *  Label () const =0 
virtual bool  UseTranspose () const =0 
virtual bool  HasNormInf () const =0 
virtual const Epetra_Comm &  Comm () const =0 
virtual const Epetra_Map &  OperatorDomainMap () const =0 
virtual const Epetra_Map &  OperatorRangeMap () const =0 
Ifpack_Preconditioner: basic class for preconditioning in Ifpack.
Class Ifpack_Preconditioner is a pure virtual class, and it defines the structure of all Ifpack preconditioners.
This class is a simple extension to Epetra_Operator. It provides the following additional methods:
It is required that Compute() call Initialize() if IsInitialized() returns false. The preconditioner is applied by ApplyInverse() (which returns if IsComputed() is false). Every time that Initialize() is called, the object destroys all the previously allocated information, and reinitialize the preconditioner. Every time Compute() is called, the object recomputed the actual values of the preconditioner.
Estimating Preconditioner Condition Numbers
The condition of a matrix , called , is defined as in some appropriate norm . gives some indication of how many accurate floating point digits can be expected from operations involving the matrix and its inverse. A condition number approaching the accuracy of a given floating point number system, about 15 decimal digits in IEEE double precision, means that any results involving or may be meaningless.
Method Compute() can be use to estimate of the condition number. Compute() requires one parameter, of type Ifpack_CondestType (default value is Ifpack_Cheap; other valid choices are Ifpack_CG and Ifpack_GMRES).
While Ifpack_CG and Ifpack_GMRES construct and AztecOO solver, and use methods AZ_cg_condnum and AZ_gmres_condnum to evaluate an accurate (but very expensive) estimate of the condition number, Ifpack_Cheap computes , which is only a very crude estimation of the actual condition number. Note that this estimated number can be less than 1.0. However, this approach has the following advantages:
If this estimate is very large, the application of the computed preconditioner may generate large numerical errors. Hence, the user may check this number, and decide to recompute the preconditioner is the computed estimate is larger than a given threshold. This is particularly useful in ICT and RILUK factorizations, as for illconditioned matrices, we often have difficulty computing usable incomplete factorizations. The most common source of problems is that the factorization may encounter a small or zero pivot, in which case the factorization can fail, or even if the factorization succeeds, the factors may be so poorly conditioned that use of them in the iterative phase produces meaningless results. Before we can fix this problem, we must be able to detect it.
Ifpack_Preconditioner objects overload the << operator. Derived classes should specify a Print() method, that will be used in operator <<.
Definition at line 136 of file Ifpack_Preconditioner.h.

pure virtual 
Sets all parameters for the preconditioner.
Implemented in Ifpack_PointRelaxation, Ifpack_AdditiveSchwarz< T >, Ifpack_Chebyshev, Ifpack_BlockRelaxation< T >, Ifpack_Polynomial, Ifpack_Krylov, Ifpack_Amesos, Ifpack_SupportGraph< T >, Ifpack_ILU, Ifpack_IC, Ifpack_ICT, Ifpack_ILUT, and Ifpack_IKLU.

pure virtual 
Computes all it is necessary to initialize the preconditioner.
Implemented in Ifpack_AdditiveSchwarz< T >, Ifpack_BlockRelaxation< T >, Ifpack_PointRelaxation, Ifpack_Chebyshev, Ifpack_Polynomial, Ifpack_SupportGraph< T >, Ifpack_Amesos, Ifpack_Krylov, Ifpack_IC, Ifpack_ICT, Ifpack_ILUT, Ifpack_IKLU, and Ifpack_ILU.

pure virtual 
Returns true if the preconditioner has been successfully initialized, false otherwise.
Implemented in Ifpack_AdditiveSchwarz< T >, Ifpack_PointRelaxation, Ifpack_BlockRelaxation< T >, Ifpack_Chebyshev, Ifpack_Polynomial, Ifpack_Krylov, Ifpack_Amesos, Ifpack_SupportGraph< T >, Ifpack_IC, Ifpack_ICT, Ifpack_ILUT, Ifpack_IKLU, and Ifpack_ILU.

pure virtual 
Computes all it is necessary to apply the preconditioner.
Implemented in Ifpack_AdditiveSchwarz< T >, Ifpack_BlockRelaxation< T >, Ifpack_PointRelaxation, Ifpack_Chebyshev, Ifpack_Polynomial, Ifpack_SupportGraph< T >, Ifpack_Amesos, Ifpack_Krylov, Ifpack_IC, Ifpack_ICT, Ifpack_ILUT, Ifpack_IKLU, and Ifpack_ILU.

pure virtual 
Returns true if the preconditioner has been successfully computed, false otherwise.
Implemented in Ifpack_AdditiveSchwarz< T >, Ifpack_PointRelaxation, Ifpack_BlockRelaxation< T >, Ifpack_Chebyshev, Ifpack_Polynomial, Ifpack_Amesos, Ifpack_Krylov, Ifpack_SupportGraph< T >, Ifpack_IC, Ifpack_ICT, Ifpack_ILUT, Ifpack_IKLU, and Ifpack_ILU.

pure virtual 
Computes the condition number estimate, returns its value.
Implemented in Ifpack_AdditiveSchwarz< T >, Ifpack_PointRelaxation, Ifpack_BlockRelaxation< T >, Ifpack_Chebyshev, Ifpack_Polynomial, Ifpack_Amesos, Ifpack_SupportGraph< T >, Ifpack_Krylov, Ifpack_IC, Ifpack_ILU, Ifpack_ICT, Ifpack_ILUT, and Ifpack_IKLU.

pure virtual 
Returns the computed condition number estimate, or 1.0 if not computed.
Implemented in Ifpack_AdditiveSchwarz< T >, Ifpack_PointRelaxation, Ifpack_BlockRelaxation< T >, Ifpack_Chebyshev, Ifpack_Polynomial, Ifpack_Amesos, Ifpack_SupportGraph< T >, Ifpack_Krylov, Ifpack_IC, Ifpack_ILU, Ifpack_ICT, Ifpack_ILUT, and Ifpack_IKLU.

pure virtual 
Applies the preconditioner to vector X, returns the result in Y.
Implements Epetra_Operator.
Implemented in Ifpack_AdditiveSchwarz< T >, Ifpack_PointRelaxation, Ifpack_BlockRelaxation< T >, Ifpack_IC, Ifpack_ILU, Ifpack_Chebyshev, Ifpack_Polynomial, Ifpack_ICT, Ifpack_ILUT, Ifpack_Amesos, Ifpack_IKLU, Ifpack_Krylov, and Ifpack_SupportGraph< T >.

pure virtual 
Returns a pointer to the matrix to be preconditioned.
Implemented in Ifpack_AdditiveSchwarz< T >, Ifpack_PointRelaxation, Ifpack_BlockRelaxation< T >, Ifpack_Chebyshev, Ifpack_SupportGraph< T >, Ifpack_ILU, Ifpack_Polynomial, Ifpack_Amesos, Ifpack_Krylov, Ifpack_ILUT, Ifpack_IKLU, Ifpack_IC, and Ifpack_ICT.

pure virtual 
Returns the number of calls to Initialize().
Implemented in Ifpack_AdditiveSchwarz< T >, Ifpack_PointRelaxation, Ifpack_BlockRelaxation< T >, Ifpack_IC, Ifpack_Chebyshev, Ifpack_Polynomial, Ifpack_ICT, Ifpack_SupportGraph< T >, Ifpack_ILU, Ifpack_Amesos, Ifpack_Krylov, Ifpack_ILUT, and Ifpack_IKLU.

pure virtual 
Returns the number of calls to Compute().
Implemented in Ifpack_AdditiveSchwarz< T >, Ifpack_PointRelaxation, Ifpack_BlockRelaxation< T >, Ifpack_IC, Ifpack_Chebyshev, Ifpack_Polynomial, Ifpack_ICT, Ifpack_SupportGraph< T >, Ifpack_ILU, Ifpack_Amesos, Ifpack_Krylov, Ifpack_ILUT, and Ifpack_IKLU.

pure virtual 
Returns the number of calls to ApplyInverse().
Implemented in Ifpack_AdditiveSchwarz< T >, Ifpack_PointRelaxation, Ifpack_BlockRelaxation< T >, Ifpack_IC, Ifpack_Chebyshev, Ifpack_Polynomial, Ifpack_ICT, Ifpack_SupportGraph< T >, Ifpack_ILU, Ifpack_Amesos, Ifpack_Krylov, Ifpack_ILUT, and Ifpack_IKLU.

pure virtual 
Returns the time spent in Initialize().
Implemented in Ifpack_AdditiveSchwarz< T >, Ifpack_PointRelaxation, Ifpack_BlockRelaxation< T >, Ifpack_IC, Ifpack_Chebyshev, Ifpack_Polynomial, Ifpack_ICT, Ifpack_SupportGraph< T >, Ifpack_ILU, Ifpack_Amesos, Ifpack_Krylov, Ifpack_ILUT, and Ifpack_IKLU.

pure virtual 
Returns the time spent in Compute().
Implemented in Ifpack_AdditiveSchwarz< T >, Ifpack_PointRelaxation, Ifpack_BlockRelaxation< T >, Ifpack_IC, Ifpack_Chebyshev, Ifpack_Polynomial, Ifpack_ICT, Ifpack_SupportGraph< T >, Ifpack_ILU, Ifpack_Amesos, Ifpack_Krylov, Ifpack_ILUT, and Ifpack_IKLU.

pure virtual 
Returns the time spent in ApplyInverse().
Implemented in Ifpack_AdditiveSchwarz< T >, Ifpack_PointRelaxation, Ifpack_BlockRelaxation< T >, Ifpack_IC, Ifpack_Chebyshev, Ifpack_Polynomial, Ifpack_ICT, Ifpack_SupportGraph< T >, Ifpack_ILU, Ifpack_Amesos, Ifpack_Krylov, Ifpack_ILUT, and Ifpack_IKLU.

pure virtual 
Returns the number of flops in the initialization phase.
Implemented in Ifpack_AdditiveSchwarz< T >, Ifpack_PointRelaxation, Ifpack_BlockRelaxation< T >, Ifpack_IC, Ifpack_Chebyshev, Ifpack_Polynomial, Ifpack_ICT, Ifpack_SupportGraph< T >, Ifpack_ILU, Ifpack_Amesos, Ifpack_Krylov, Ifpack_ILUT, and Ifpack_IKLU.

pure virtual 
Returns the number of flops in the computation phase.
Implemented in Ifpack_AdditiveSchwarz< T >, Ifpack_BlockRelaxation< T >, Ifpack_PointRelaxation, Ifpack_IC, Ifpack_Chebyshev, Ifpack_Polynomial, Ifpack_ICT, Ifpack_SupportGraph< T >, Ifpack_ILU, Ifpack_Amesos, Ifpack_Krylov, Ifpack_ILUT, and Ifpack_IKLU.

pure virtual 
Returns the number of flops in the application of the preconditioner.
Implemented in Ifpack_AdditiveSchwarz< T >, Ifpack_BlockRelaxation< T >, Ifpack_PointRelaxation, Ifpack_IC, Ifpack_Chebyshev, Ifpack_Polynomial, Ifpack_ICT, Ifpack_SupportGraph< T >, Ifpack_ILU, Ifpack_Amesos, Ifpack_Krylov, Ifpack_ILUT, and Ifpack_IKLU.

pure virtual 
Prints basic information on iostream. This function is used by operator<<.
Implemented in Ifpack_AdditiveSchwarz< T >, Ifpack_Amesos, Ifpack_PointRelaxation, Ifpack_BlockRelaxation< T >, Ifpack_IC, Ifpack_Chebyshev, Ifpack_ICT, Ifpack_Polynomial, Ifpack_SupportGraph< T >, Ifpack_ILU, Ifpack_ILUT, Ifpack_IKLU, and Ifpack_Krylov.