PyTrilinos  Development
 All Classes Functions
Public Member Functions
PyTrilinos.IFPACK.Preconditioner Class Reference
Inheritance diagram for PyTrilinos.IFPACK.Preconditioner:
Inheritance graph
[legend]
Collaboration diagram for PyTrilinos.IFPACK.Preconditioner:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def SetParameters
def Initialize
def IsInitialized
def Compute
def IsComputed
def Condest
def ApplyInverse
def Matrix
def NumInitialize
def NumCompute
def NumApplyInverse
def InitializeTime
def ComputeTime
def ApplyInverseTime
def InitializeFlops
def ComputeFlops
def ApplyInverseFlops
def __str__

Detailed Description

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:  Initialize() performs all operations
based on the graph of the matrix (without considering the numerical
values);

IsInitialized() returns true if the preconditioner has been
successfully initialized;

Compute() computes all is required to apply the preconditioner, using
matrix values (and assuming that the sparsity of the matrix has not
been changed);

IsComputed() should return true if the preconditioner has been
successfully computed, false otherwise.

Condest() returns an estimation of the condition number, or -1.0 if
not available

Matrix() returns a reference to the matrix to be preconditioned.

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 re-initialize the preconditioner. Every time Compute() is called,
the object re-computed the actual values of the preconditioner.

Estimating Preconditioner Condition Numbers

The condition of a matrix $B$, called $cond_p(B)$, is defined as
$cond_p(B) = \\|B\\|_p\\|B^{-1}\\|_p$ in some appropriate norm
$p$. $cond_p(B)$ 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 $B$ or $B^{-1}$ 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 $\\|(P)^{-1}e\\|_\\infty$, 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: since finding $z$ such that $P z = y$ is a basic kernel
for applying the preconditioner, computing this estimate of
$cond_\\infty(P^{-1})$ is performed by setting $y = e$, calling the
solve kernel to compute $z$ and then computing
$\\|z\\|_\\infty$;

the only cost is one application of the preconditioner.

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 ill-
conditioned 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.

If IFPACK is configured with Teuchos support, method SetParameters()
should be adopted. Otherwise, users can set parameters (one
at-a-time), using methods SetParameter(), for integers and doubles.
Ifpack_Preconditioner objects overload the << operator. Derived
classes should specify a Print() method, that will be used in operator
<<.

C++ includes: Ifpack_Preconditioner.h 

Member Function Documentation

def PyTrilinos.IFPACK.Preconditioner.__str__ (   self,
  args 
)
__str__(Preconditioner self) -> std::string
ApplyInverse(Preconditioner self, Epetra_MultiVector X, Epetra_MultiVector Y) -> int

virtual
int Ifpack_Preconditioner::ApplyInverse(const Epetra_MultiVector &X,
Epetra_MultiVector &Y) const =0

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

Reimplemented from PyTrilinos.Epetra.Operator.

Reimplemented in PyTrilinos.IFPACK.Amesos, PyTrilinos.IFPACK.PointRelaxation, PyTrilinos.IFPACK.ILUT, PyTrilinos.IFPACK.ILU, PyTrilinos.IFPACK.ICT, and PyTrilinos.IFPACK.IC.

ApplyInverseFlops(Preconditioner self) -> double

virtual double Ifpack_Preconditioner::ApplyInverseFlops() const =0

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

Reimplemented in PyTrilinos.IFPACK.Amesos, PyTrilinos.IFPACK.PointRelaxation, PyTrilinos.IFPACK.ILUT, PyTrilinos.IFPACK.ILU, PyTrilinos.IFPACK.ICT, and PyTrilinos.IFPACK.IC.

ApplyInverseTime(Preconditioner self) -> double

virtual double Ifpack_Preconditioner::ApplyInverseTime() const =0

Returns the time spent in ApplyInverse(). 

Reimplemented in PyTrilinos.IFPACK.Amesos, PyTrilinos.IFPACK.PointRelaxation, PyTrilinos.IFPACK.ILUT, PyTrilinos.IFPACK.ILU, PyTrilinos.IFPACK.ICT, and PyTrilinos.IFPACK.IC.

def PyTrilinos.IFPACK.Preconditioner.Compute (   self,
  args 
)
Compute(Preconditioner self) -> int

virtual int
Ifpack_Preconditioner::Compute()=0

Computes all it is necessary to apply the preconditioner. 

Reimplemented in PyTrilinos.IFPACK.Amesos, PyTrilinos.IFPACK.PointRelaxation, PyTrilinos.IFPACK.ILUT, PyTrilinos.IFPACK.ILU, PyTrilinos.IFPACK.ICT, and PyTrilinos.IFPACK.IC.

ComputeFlops(Preconditioner self) -> double

virtual
double Ifpack_Preconditioner::ComputeFlops() const =0

Returns the number of flops in the computation phase. 

Reimplemented in PyTrilinos.IFPACK.Amesos, PyTrilinos.IFPACK.PointRelaxation, PyTrilinos.IFPACK.ILUT, PyTrilinos.IFPACK.ILU, PyTrilinos.IFPACK.ICT, and PyTrilinos.IFPACK.IC.

ComputeTime(Preconditioner self) -> double

virtual
double Ifpack_Preconditioner::ComputeTime() const =0

Returns the time spent in Compute(). 

Reimplemented in PyTrilinos.IFPACK.Amesos, PyTrilinos.IFPACK.PointRelaxation, PyTrilinos.IFPACK.ILUT, PyTrilinos.IFPACK.ILU, PyTrilinos.IFPACK.ICT, and PyTrilinos.IFPACK.IC.

def PyTrilinos.IFPACK.Preconditioner.Condest (   self,
  args 
)
Condest(Preconditioner self, Ifpack_CondestType const CT=Ifpack_Cheap, int const MaxIters=1550, double const Tol=1e-9, 
    RowMatrix Matrix=None) -> double

virtual double
Ifpack_Preconditioner::Condest() const =0

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

Reimplemented in PyTrilinos.IFPACK.Amesos, PyTrilinos.IFPACK.PointRelaxation, PyTrilinos.IFPACK.ILUT, PyTrilinos.IFPACK.ILU, PyTrilinos.IFPACK.ICT, and PyTrilinos.IFPACK.IC.

def PyTrilinos.IFPACK.Preconditioner.Initialize (   self,
  args 
)
Initialize(Preconditioner self) -> int

virtual int
Ifpack_Preconditioner::Initialize()=0

Computes all it is necessary to initialize the preconditioner. 

Reimplemented in PyTrilinos.IFPACK.Amesos, PyTrilinos.IFPACK.PointRelaxation, PyTrilinos.IFPACK.ILUT, PyTrilinos.IFPACK.ILU, PyTrilinos.IFPACK.ICT, and PyTrilinos.IFPACK.IC.

InitializeFlops(Preconditioner self) -> double

virtual double Ifpack_Preconditioner::InitializeFlops() const =0

Returns the number of flops in the initialization phase. 

Reimplemented in PyTrilinos.IFPACK.Amesos, PyTrilinos.IFPACK.PointRelaxation, PyTrilinos.IFPACK.ILUT, PyTrilinos.IFPACK.ILU, PyTrilinos.IFPACK.ICT, and PyTrilinos.IFPACK.IC.

InitializeTime(Preconditioner self) -> double

virtual
double Ifpack_Preconditioner::InitializeTime() const =0

Returns the time spent in Initialize(). 

Reimplemented in PyTrilinos.IFPACK.Amesos, PyTrilinos.IFPACK.PointRelaxation, PyTrilinos.IFPACK.ILUT, PyTrilinos.IFPACK.ILU, PyTrilinos.IFPACK.ICT, and PyTrilinos.IFPACK.IC.

def PyTrilinos.IFPACK.Preconditioner.IsComputed (   self,
  args 
)
IsComputed(Preconditioner self) -> bool

virtual
bool Ifpack_Preconditioner::IsComputed() const =0

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

Reimplemented in PyTrilinos.IFPACK.Amesos, PyTrilinos.IFPACK.PointRelaxation, PyTrilinos.IFPACK.ILUT, PyTrilinos.IFPACK.ILU, PyTrilinos.IFPACK.ICT, and PyTrilinos.IFPACK.IC.

IsInitialized(Preconditioner self) -> bool

virtual
bool Ifpack_Preconditioner::IsInitialized() const =0

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

Reimplemented in PyTrilinos.IFPACK.Amesos, PyTrilinos.IFPACK.PointRelaxation, PyTrilinos.IFPACK.ILUT, PyTrilinos.IFPACK.ILU, PyTrilinos.IFPACK.ICT, and PyTrilinos.IFPACK.IC.

def PyTrilinos.IFPACK.Preconditioner.Matrix (   self,
  args 
)
Matrix(Preconditioner self) -> RowMatrix

virtual const
Epetra_RowMatrix& Ifpack_Preconditioner::Matrix() const =0

Returns a pointer to the matrix to be preconditioned. 

Reimplemented in PyTrilinos.IFPACK.Amesos, PyTrilinos.IFPACK.PointRelaxation, PyTrilinos.IFPACK.ILUT, PyTrilinos.IFPACK.ILU, PyTrilinos.IFPACK.ICT, and PyTrilinos.IFPACK.IC.

NumApplyInverse(Preconditioner self) -> int

virtual int Ifpack_Preconditioner::NumApplyInverse() const =0

Returns the number of calls to ApplyInverse(). 

Reimplemented in PyTrilinos.IFPACK.Amesos, PyTrilinos.IFPACK.PointRelaxation, PyTrilinos.IFPACK.ILUT, PyTrilinos.IFPACK.ILU, PyTrilinos.IFPACK.ICT, and PyTrilinos.IFPACK.IC.

def PyTrilinos.IFPACK.Preconditioner.NumCompute (   self,
  args 
)
NumCompute(Preconditioner self) -> int

virtual int
Ifpack_Preconditioner::NumCompute() const =0

Returns the number of calls to Compute(). 

Reimplemented in PyTrilinos.IFPACK.Amesos, PyTrilinos.IFPACK.PointRelaxation, PyTrilinos.IFPACK.ILUT, PyTrilinos.IFPACK.ILU, PyTrilinos.IFPACK.ICT, and PyTrilinos.IFPACK.IC.

NumInitialize(Preconditioner self) -> int

virtual
int Ifpack_Preconditioner::NumInitialize() const =0

Returns the number of calls to Initialize(). 

Reimplemented in PyTrilinos.IFPACK.Amesos, PyTrilinos.IFPACK.PointRelaxation, PyTrilinos.IFPACK.ILUT, PyTrilinos.IFPACK.ILU, PyTrilinos.IFPACK.ICT, and PyTrilinos.IFPACK.IC.

SetParameters(Preconditioner self, ParameterList List) -> int

virtual
int Ifpack_Preconditioner::SetParameters(Teuchos::ParameterList
&List)=0

Sets all parameters for the preconditioner. 

Reimplemented in PyTrilinos.IFPACK.Amesos, PyTrilinos.IFPACK.PointRelaxation, PyTrilinos.IFPACK.ILUT, PyTrilinos.IFPACK.ILU, PyTrilinos.IFPACK.ICT, and PyTrilinos.IFPACK.IC.


The documentation for this class was generated from the following file:
 All Classes Functions