![]() |
Preconditioners are used to accelerate the iterative solution of linear systems. Typical preconditioners are Jacobi, Gauss-Seidel, or SSOR, but the library also supports more complex ones such as Vanka or incomplete LU decompositions (ILU). In addition, sparse direct solvers can be used as preconditioners when available.
When talking of preconditioners, we usually expect them to be used in Krylov-space methods. In that case, the act as operators: given a vector , produce the result
of the multiplication with the preconditioning operator
.
However, some preconditioners can also be used in the standard linear defect correction iteration,
where P-1 is again the preconditioner. Thus, preconditioning amounts to applying a linear operator to the residual.
In this section, we discuss the interface preconditioners usually have to provide to work inside the deal.II library.
In order to be able to be stored in containers, all preconditioners have a constructor with no arguments. Since this will typically produce a useless object, all preconditioners have a function
void initialize (...)
This function receives the matrix to be preconditioned as well as additional required parameters and sets up the internal structures of the preconditioner.
Preconditioners in deal.II are just considered linear operators. Therefore, in order to be used by deal.II solvers, preconditioners must conform to the standard matrix interface, namely the functions
void vmult (VECTOR& dst, const VECTOR& src) const; void Tvmult (VECTOR& dst, const VECTOR& src) const;
These functions apply the preconditioning operator to the source vector and return the result in
as
or
. Preconditioned iterative dolvers use these
vmult()
functions of the preconditioner. Some solvers may also use Tvmult()
.
Additional to the interface described above, some preconditioners like SOR and Jacobi have been known as iterative methods themselves. For them, an additional interface exists, consisting of the functions
void step (VECTOR& dst, const VECTOR& rhs) const; void Tstep (VECTOR& dst, const VECTOR& rhs) const;
Here, is a residual vector and
is the iterate that is supposed to be updated. In other words, the operation performed by these functions is
and
. The functions are called this way because they perform one step of a fixed point (Richardson) iteration. Note that preconditioners store a reference to the original matrix
during initialization.