| Description |
CPCG -CIRCULANT PRECONDITIONED CONJUGATE GRADIENT METHOD.
[x, error, iter, flag] = cpcg(a, b, tol, max_it, c, x0)
[x, error, iter, flag] = cpcg(a, b, c)
[x, error, iter, flag] = cpcg(a, b)
tol, max_it, c, x0 can be replaced by [] and default vaules will be used.
cpcg.m solves the symmetric positive definite Toeplitz linear system Ax=b using the Conjugate Gradient method with a circulant preconditioner C.
Both matrices A and C have to be SYMMETRIC POSITIVE DEFINITE.
input:
a ------ REAL FIRST COLUMN of symmetric positive definite matrix
b ------ REAL right hand side vecto
tol ---- REAL error tolerance
max_it - INTEGER maximum number of iteration
c ------ REAL FIRST COLUMN of CIRCULANT preconditioner matrix
x0 ----- REAL initial guess vector
output:
x ------ REAL solution vector
error -- REAL error norm
iter --- INTEGER number of iterations performed
flag --- INTEGER: 0 = solution found to tolerance
1 = no convergence given max_it
Tested under MATLAB 5.1 and 5.3. |