Ifpack_Jacobi Class Reference

Ifpack_Jacobi: Jacobi preconditioner of a given Epetra_RowMatrix. More...

#include <Ifpack_Jacobi.h>

Inheritance diagram for Ifpack_Jacobi:

[legend]
Collaboration diagram for Ifpack_Jacobi:
[legend]
List of all members.

Public Member Functions

Constructors/Destructor
 Ifpack_Jacobi (const Ifpack_OverlapGraph *OverlapGraph, bool UseReciprocal=true, int NumSteps=1)
 Constructor using Ifpack_OverlapGraph.
 Ifpack_Jacobi (const Epetra_RowMatrix *UserMatrix, bool UseReciprocal=true, int NumSteps=1)
 Constructor using Epetra_RowMatrix.
 Ifpack_Jacobi (const Ifpack_Jacobi &Source)
 Copy constructor.
virtual ~Ifpack_Jacobi ()
 Ifpack_Jacobi Destructor.
Attribute access methods.
bool UseReciprocal () const
 Returns current value of UseReciprocal.
int NumSteps () const
 Returns current value of NumSteps.
const Epetra_VectorDiagValues () const
 Returns current vector of diagonal values.

Protected Member Functions

Methods needed to implement OverlapFactorObject.
int ProcessOverlapMatrix (const Epetra_RowMatrix &A)
 Processes the overlapped user matrix for computing the ILUT preconditioner: WARNING: THIS ROUTINE IS NOT USER CALLABLE, CALL InitValues().
int DerivedFactor ()
 Compute ILUT factors L and U: WARNING: THIS ROUTINE IS NOT USER CALLABLE, CALL Factor().

Detailed Description

Ifpack_Jacobi: Jacobi preconditioner of a given Epetra_RowMatrix.

This class supports the construction and use of Jacobi's basic iterative method as a preconditioner for a Krylov iterative method. It is also possible to use this class to solve a problem using Jacobi's method only. Formally Jacobi's method is an iteration of the form:

\[ x_{k+1} = D^{-1}(E+F)x_k + D^{-1}b \]

where $E$, $D$ and $F$ are the strictly lower triangle, diagonal, and upper triangular parts, resp. of the user matrix $A$. (See Saad {Iterative Methods for Sparse Linear Systems}, Ch. 4). To start the Jacobi iteration, we use an initial guess of $ x_0 = 0$, so a single step is equivalent to scaling the input vector by the inverse of the diagonal of $A$.

Use of more than one step is often not beneficial.

There are two parameters for this class:

  1. UseReciprocal - Specifies whether or not the explicit reciprocal of the diagonal elements should computed and used. Jacobi's method requires division using the diagonal of the user matrix. On many processors, multiplication by the reciprocal is much faster than division. Thus, it is advantageous to explicitly compute the inverse of the diagonal terms of the user matrix and multiply by the reciprocal on each iteration. At the same time, multiplying by the reciprocal is numerically less accurate than division, so in some situations it may be advantageous to set this parameter to false.
  2. NumSteps - Jacobi's method is an iterative method in its own right. Typically, when used to precondition a Krylov method, only a single step (iteration) of Jacobi is appropriate. More than one iteration can significantly increase cost and even cause the Krylov method to fail.


Constructor & Destructor Documentation

Ifpack_Jacobi::Ifpack_Jacobi const Ifpack_OverlapGraph OverlapGraph,
bool  UseReciprocal = true,
int  NumSteps = 1
 

Constructor using Ifpack_OverlapGraph.

Creates an object from the overlap graph.

Parameters:
OverlapGraph (In) - Graph describing the graph that should be used for the factors.
UseReciprocal (In/Default) - Explicitly compute and use the reciprocal of diagonal elements if set to true.
NumSteps (In/Default) - Specify the number of Jacobi steps to perform on each call to the Solve() method.

Ifpack_Jacobi::Ifpack_Jacobi const Epetra_RowMatrix UserMatrix,
bool  UseReciprocal = true,
int  NumSteps = 1
 

Constructor using Epetra_RowMatrix.

Creates an Ifpack_Graph object from the user graph implicitly defined by the Epetra_RowMatrix interface.

Parameters:
RowMatrix (In) - An object that has implemented the Epetra_RowMatrix interface.
UseReciprocal (In/Default) - Explicitly compute and use the reciprocal of diagonal elements if set to true.
NumSteps (In/Default) - Specify the number of Jacobi steps to perform on each call to the Solve() method.


The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:43:07 2008 for IFPACK by doxygen 1.3.9.1