Fast Auxiliary Space Preconditioning  1.8.4 Feb/15/2016
pminres_mf.c File Reference

Krylov subspace methods – Preconditioned minimal residual (matrix free) More...

#include <math.h>
#include "fasp.h"
#include "fasp_functs.h"
#include "itsolver_util.inl"

Go to the source code of this file.

Functions

INT fasp_solver_pminres (mxv_matfree *mf, dvector *b, dvector *u, precond *pc, const REAL tol, const INT MaxIt, const SHORT stop_type, const SHORT prtlvl)
 A preconditioned minimal residual (Minres) method for solving Au=b. More...
 

Detailed Description

Krylov subspace methods – Preconditioned minimal residual (matrix free)

Abstract algorithm of Krylov method

Krylov method to solve A*x=b is to generate {x_k} to approximate x, where x_k is the optimal solution in Krylov space

V_k=span{r_0,A*r_0,A^2*r_0,...,A^{k-1}*r_0},

under some inner product.

For the implementation, we generate a series of {p_k} such that V_k=span{p_1,...,p_k}. Details:

Step 0. Given A, b, x_0, M

Step 1. Compute residual r_0 = b-A*x_0 and convergence check;

Step 2. Initialization z_0 = M^{-1}*r_0, p_0=z_0;

Step 3. Main loop ...

FOR k = 0:MaxIt

  • get step size alpha = f(r_k,z_k,p_k);
  • update solution: x_{k+1} = x_k + alpha*p_k;
  • perform stagnation check;
  • update residual: r_{k+1} = r_k - alpha*(A*p_k);
  • perform residual check;
  • obtain p_{k+1} using {p_0, p_1, ... , p_k};
  • prepare for next iteration;
  • print the result of k-th iteration; END FOR

Convergence check is: norm(r)/norm(b) < tol

Stagnation check is like following:

  • IF norm(alpha*p_k)/norm(x_{k+1}) < tol_stag
    1. compute r=b-A*x_{k+1};
    2. convergence check;
    3. IF ( not converged & restart_number < Max_Stag_Check ) restart;
  • END IF

Residual check is like following:

  • IF norm(r_{k+1})/norm(b) < tol
    1. compute the real residual r = b-A*x_{k+1};
    2. convergence check;
    3. IF ( not converged & restart_number < Max_Res_Check ) restart;
  • END IF
Note
Refer to Y. Saad 2003 Iterative methods for sparse linear systems (2nd Edition), SIAM

Definition in file pminres_mf.c.

Function Documentation

INT fasp_solver_pminres ( mxv_matfree mf,
dvector b,
dvector u,
precond pc,
const REAL  tol,
const INT  MaxIt,
const SHORT  stop_type,
const SHORT  prtlvl 
)

A preconditioned minimal residual (Minres) method for solving Au=b.

Parameters
mfPointer to mxv_matfree: the spmv operation
bPointer to dvector: the right hand side
uPointer to dvector: the unknowns
pcPointer to precond: the structure of precondition
tolTolerance for stopping
MaxItMaximal number of iterations
stop_typeStopping criteria type
prtlvlHow much information to print out
Returns
Iteration number if converges; ERROR otherwise.
Author
Shiquan Zhang
Date
10/24/2010

Rewritten by Chensong Zhang on 05/01/2012 Modified by Feiteng Huang on 09/26/2012: matrix free

Definition at line 89 of file pminres_mf.c.