Iterative solution methods and their rate of convergence

Similar documents
Assignment on iterative solution methods and preconditioning

The Conjugate Gradient Method

Math 504 (Fall 2011) 1. (*) Consider the matrices

Notes on PCG for Sparse Linear Systems

Multilevel Preconditioning of Graph-Laplacians: Polynomial Approximation of the Pivot Blocks Inverses

ITERATIVE METHODS BASED ON KRYLOV SUBSPACES

A Chebyshev-based two-stage iterative method as an alternative to the direct solution of linear systems

AMS526: Numerical Analysis I (Numerical Linear Algebra) Lecture 23: GMRES and Other Krylov Subspace Methods; Preconditioning

9.1 Preconditioned Krylov Subspace Methods

Topics. The CG Algorithm Algorithmic Options CG s Two Main Convergence Theorems

Introduction. Chapter One

Conjugate gradient method. Descent method. Conjugate search direction. Conjugate Gradient Algorithm (294)

Incomplete Cholesky preconditioners that exploit the low-rank property

Lecture Note 7: Iterative methods for solving linear systems. Xiaoqun Zhang Shanghai Jiao Tong University

Comparative Analysis of Mesh Generators and MIC(0) Preconditioning of FEM Elasticity Systems

Jae Heon Yun and Yu Du Han

AMS526: Numerical Analysis I (Numerical Linear Algebra for Computational and Data Sciences)

Solution of Matrix Eigenvalue Problem

AMS526: Numerical Analysis I (Numerical Linear Algebra)

M.A. Botchev. September 5, 2014

Lecture 11: CMSC 878R/AMSC698R. Iterative Methods An introduction. Outline. Inverse, LU decomposition, Cholesky, SVD, etc.

Lecture # 20 The Preconditioned Conjugate Gradient Method

Preconditioning Techniques Analysis for CG Method

FEM and sparse linear system solving

Master Thesis Literature Study Presentation

Applied Mathematics 205. Unit V: Eigenvalue Problems. Lecturer: Dr. David Knezevic

Lab 1: Iterative Methods for Solving Linear Systems

Numerical Methods I Non-Square and Sparse Linear Systems

Preliminary/Qualifying Exam in Numerical Analysis (Math 502a) Spring 2012

Chapter 7 Iterative Techniques in Matrix Algebra

6.4 Krylov Subspaces and Conjugate Gradients

Non-stationary extremal eigenvalue approximations in iterative solutions of linear systems and estimators for relative error

Iterative Methods for Solving A x = b

1. Fast Iterative Solvers of SLE

Key words. conjugate gradients, normwise backward error, incremental norm estimation.

Direct and Incomplete Cholesky Factorizations with Static Supernodes

Linear Solvers. Andrew Hazel

Linear algebra issues in Interior Point methods for bound-constrained least-squares problems

Course Notes: Week 1

Scientific Computing with Case Studies SIAM Press, Lecture Notes for Unit VII Sparse Matrix

Chapter 2. Solving Systems of Equations. 2.1 Gaussian elimination

On the interplay between discretization and preconditioning of Krylov subspace methods

PART I Lecture Notes on Numerical Solution of Root Finding Problems MATH 435

CS137 Introduction to Scientific Computing Winter Quarter 2004 Solutions to Homework #3

Lecture 11. Fast Linear Solvers: Iterative Methods. J. Chaudhry. Department of Mathematics and Statistics University of New Mexico

Robust Preconditioned Conjugate Gradient for the GPU and Parallel Implementations

1 Conjugate gradients

1 Extrapolation: A Hint of Things to Come

New Multigrid Solver Advances in TOPS

Finite-choice algorithm optimization in Conjugate Gradients

Iterative Methods for Sparse Linear Systems

FEM and Sparse Linear System Solving

2.29 Numerical Fluid Mechanics Spring 2015 Lecture 9

Lecture 10: October 27, 2016

Practical Information

7.2 Steepest Descent and Preconditioning

Notes on Some Methods for Solving Linear Systems

4.8 Arnoldi Iteration, Krylov Subspaces and GMRES

OUTLINE ffl CFD: elliptic pde's! Ax = b ffl Basic iterative methods ffl Krylov subspace methods ffl Preconditioning techniques: Iterative methods ILU

Iterative Solution methods

Chebyshev semi-iteration in Preconditioning

Numerical Linear Algebra Primer. Ryan Tibshirani Convex Optimization

Lecture 9: Krylov Subspace Methods. 2 Derivation of the Conjugate Gradient Algorithm

Numerical methods part 2

Contents. Preface... xi. Introduction...

FALL 2018 MATH 4211/6211 Optimization Homework 4

A Method for Constructing Diagonally Dominant Preconditioners based on Jacobi Rotations

Sensitivity of Gauss-Christoffel quadrature and sensitivity of Jacobi matrices to small changes of spectral data

Math 1080: Numerical Linear Algebra Chapter 4, Iterative Methods

Solving Ax = b, an overview. Program

MATH2071: LAB #5: Norms, Errors and Condition Numbers

Conjugate Gradient (CG) Method

PDE Solvers for Fluid Flow

Matrix Derivatives and Descent Optimization Methods

CLASSICAL ITERATIVE METHODS

Iterative Methods for Linear Systems of Equations

Chapter 3. Rings. The basic commutative rings in mathematics are the integers Z, the. Examples

Motivation: Sparse matrices and numerical PDE's

MATH 450 / 550 Homework 1: Due Wednesday February 18, 2015

Mathematics: Year 12 Transition Work

Iterative methods for Linear System of Equations. Joint Advanced Student School (JASS-2009)

Chapter 7. Iterative methods for large sparse linear systems. 7.1 Sparse matrix algebra. Large sparse matrices

Various ways to use a second level preconditioner

Lecture 10: Powers of Matrices, Difference Equations

Solving Linear Systems

Lecture 9 Approximations of Laplace s Equation, Finite Element Method. Mathématiques appliquées (MATH0504-1) B. Dewals, C.

Multigrid absolute value preconditioning

LINEAR SYSTEMS (11) Intensive Computation

MATHEMATICS 23a/E-23a, Fall 2015 Linear Algebra and Real Analysis I Module #1, Week 4 (Eigenvectors and Eigenvalues)

ON ORTHOGONAL REDUCTION TO HESSENBERG FORM WITH SMALL BANDWIDTH

arxiv: v1 [math.na] 11 Jul 2011

Performance Evaluation of GPBiCGSafe Method without Reverse-Ordered Recurrence for Realistic Problems

Final Year M.Sc., Degree Examinations

Bindel, Fall 2016 Matrix Computations (CS 6210) Notes for

AMS Mathematics Subject Classification : 65F10,65F50. Key words and phrases: ILUS factorization, preconditioning, Schur complement, 1.

Lecture 9: Numerical Linear Algebra Primer (February 11st)

DELFT UNIVERSITY OF TECHNOLOGY

ORIE 6334 Spectral Graph Theory October 13, Lecture 15

Introduction. Math 1080: Numerical Linear Algebra Chapter 4, Iterative Methods. Example: First Order Richardson. Strategy

The amount of work to construct each new guess from the previous one should be a small multiple of the number of nonzeros in A.

Transcription:

Uppsala University Graduate School in Mathematics and Computing Institute for Information Technology Numerical Linear Algebra FMB and MN Fall 2007 Mandatory Assignment 3a: Iterative solution methods and their rate of convergence Exercise (Implementation tasks) Implement in Matlab the following iterative schemes: M: the (pointwise) Jacobi method; M2: the second order Chebyshev iteration, described in Appendix A; M3: the unpreconditioned conjugate gradient (CG) method (see the lecture notes); M4: the Jacobi (diagonally) preconditioned CG method (see the lecture notes). For methods M3 and M4, you have to write your own Matlab code. For the numerical experiments you should use your implementation and not the available Matlab function pcg. The latter can be used to check the correctness of your implementation. Exercise 2 (Generation of test data) Generate four test matrices which have different properties: A: A=matgen disco(s,); B: B=matgen disco(s,0.00); C: C=matgen anisot(s,,); D: D=matgen anisot(s,,0.00); Here s determines the size of the problem, namely, the matrix size is n = 2 s. Check the sparsity of the above matrices (spy). Compute the complete spectra of A, B, C, D (say, for s = 3) by using the Matlab function eig. Plot those and compare. Compute the condition numbers of these matrices. You are advised to repeat the experiment for a larger s to see how the condition number grows with the matrix size n. Exercise 3 (Numerical experiments and method comparisons) Test the four methods M, M2, M3, M4 on the matrices A, B, C, D. Choose a right-side vector as b=rand(n,); and compute the corresponding exact solution as sol A=A\b. Recall, that n = 2 s is the size of A. For methods M, M3 and M4 use as a stopping criterion r k / r 0 / < 0 6. For methods M3 and M4 r k should be the iteratively computed (not the true residual, computed as r k = b Ax k ) residual. For method M2, first predict the number of iterations in advance using formula (7), do that many iterations and compare the obtained error and residual reduction with the expected ones.

Plot the corresponding residual convergence curve for the four methods. For the CG methods plot both the iteratively computed residual and the true residual obtained as r true=b-a*x k. Perform a series of experiments for s = 3, 4, 5, 6 to see the the dependence of the methods behaviour when n is increased. Exercise 4 (A theoretical task) Derive that the convergence of M4 is better than that of M3. Here the intention is to try to show it yourself or to do a literature search to find a proper result to cite. A good source to check could be Anne Greenbaum, Iterative methods for solving linear systems, SIAM, 997. Instructions for performing the numerical tests Download all the files from the course web-page. The main files to call are the following: matgen disco.m The routine matgen disco.m generates a finite element stiffness matrix for the Laplace equation ( a u ) ( a u ) = f () x x y y in Ω (0, ) 2 where a is a constant and a = ε in a subset Ω Ω and a = elsewhere with Ω {/4 x 3/4, /4 y 3/4}. The problem is then discretized using regular isosceles triangles and piece-wise linear basis functions. The mesh-size parameter h is equal to 2 s for some integer s and is chosen always such that there will be mesh-lines along the edges of Ω The routine is called as A=matgen disco(s,a);. When a is one, the generated matrix corresponds to u = f. The above routine needs auxiliary files disco stiff.m, disco rule.m, Xdir.m and Ydir.m. matgen anisot.m The routine matgen anisot.m generates a finite difference (5-point) discretization of the anisotropic Laplacian ε x u xx ε y u yy. The routine is called as A=matgen anisot(s,epsx,epsy);, where again mesh-size parameter h is equal to 2 s. If both epsx and epsy are equal to one, the generated matrix corresponds to u = f discretized with central differences. Lanczos.m In order to use the Chebyshev iterative method one needs to estimate the extremal eigenvalues of A. The routine Lanczos computes such approximations. Note, however that there is no guarantee that we will obtain a lower bound for λ min and an upper bound for λ max! 2

The routine is called as [lanmin,lanmax]=lanczos(a); It performs internally a number of Lanczos steps until the following criteria are met: with a default value of ɛ = 0.0. λ (k) λ (k ) ɛ and λ (k) n λ (k ) n ɛ Remark: You can estimate the extreme eigenvalues using some other technique, for example, using Gershgorin s theorem. In this case, you should include in the report a description how the bounds are found. It is possible to use some other program (or program implementation of the Lanczos method) to compute approximations of the extreme eigenvalues of A. Writing a report on the results The report has to have the following structure: (i) Brief problem description, namely, the solution of linear systems of equations with symmetric positive definite matrices, using iterative solution methods. (ii) Theory Describe briefly the theory regarding the convergence of any of the methods M-to M4, including derivation of Task 4. (iii) Numerical experiments (a) Describe the experiments. Include table(s) with iteration counts for various problem sizes. Present some typical plots of the the relative residual ( r k / r 0 ) convergence and the error convergence x x k. It is important to describe what is plotted on the different coordinate axes. Another suggestion for the residual plots is to use semilogy in order to better see the convergence history. OBS! The numerical tests possible to performed are numerous. Do not include everything (or rather too much) in the report. Choose a representative information to show the typical behaviour and comment on the rest of the tests run, if necessary. For instance, do not run inefficient (slowly converging) methods on very large problems. The behaviour can be seen on small-to-medium sized problems. Still, one needs, say, three consecutive problem sizes to see how does the iteration count grow with the problem size. (b) Analyse the numerical results in comparison with the theoretical. Do you see iteraion counts for the CG as predicted from the theoretical estimates? If the condition number of the matrices is proportional to h 2, how does the iteration count change when h is decreased? Does the convergence of the Chebyshev method improve significantly if you use the exact eigenvalues instead of their approximations obtained by the Lanczos method? For which problems? 3

(c) (Not compulsory) Upon your time, experience and interests, you could try another preconditioner, for example, the incomplete Cholesky preconditioner, produced by Matlab s command U = cholinc(a,tol);, where tol can be chosen for instance as 0., 0.05, 0.0. How much does the preconditioner you have chosen improve the convergence of the CG method? How does the number of iterations depend on the size of the matrix, compared to the unpreconditioned CG? (iv) Give your conclusions. Which is you method of choice? Motivate your answer. Printouts of the program codes should be attached to the report. Working in pairs is recommended. However, all topics in the assignment should be covered by each participant. For your convenience, the Latex source of this assignment is at your disposal and you can use it for the report if you wish. Deadline: The solutions should be delivered to me no later than December 0, 2007. Success! Maya (Maya.Neytcheva@it.uu.se, room 2307) Any comments on the assignment will be highly appreciated and will be considered for further improvements. Thank you! 4

Apendix: The Second Order Chebyshev iterative solution method Description Let A be a real symmetric positive definite (s.p.d.) matrix of order n. Consider the solution of the linear system Ax = b using the following iterative scheme, known as the Second Order Chebyshev iterative solution method: x 0 given, x = x 0 + 2 β 0r 0 For k = 0,, until convergence x k+ = α k x k + ( α k )x k + β k r k. r k = b Ax k. Let x be the exact solution of the above linear system. Denote by e k = x x k the iterative error at step k. Clearly, r k = b Ax k = A(x x k ) = Ae k. It is seen from the recursive formula (2) that for each k, the errors satisfy a relation of the form e k+ = α k e k + ( α k )e k + β k Ae k = Q k (A)e 0, where Q k ( ) is some polynomial of degree k. Furthermore, the polynomials Q k (A) are related among themselves as follows: Q k+ (A) α k Q k (A) β k AQ k (A) + ( α k )Q k (A) = 0, k =, 2, (3) We compare the recurrence (3) with the recursive formula for the Chebyshev polynomials, namely, T 0 (z) =, T (z) = z, T k+ (z) 2T k (z) + T k (z) = 0. (4) One can easily see that for the following special choice of the method parameters and we get β k = 4 b a T k(z)/t k+ (z), α k = 2c T k(z) T k+ (z) = + T k (z) T k+ (z) where z = b + a b a, 0 < a λ min(a), λ max (A) b, Q k (A) = T k(z) T k (z), Z = [(b + a)i 2A]. b a We now recall that the Chebyshev polynomials possess the following optimal approximation property - among all normalized polynomials of degree n defined in an interval [a, b], the nth degree Chebyshev polynomial is the one which differs from zero least (measured in local min and max in [a, b]). Therefore, for this particular polynomial Q k (A) we have (due the above approximation properties of the Chebyshev polynomials) max Q k (A)z min P (A)z, z P Π k (2) i.e., at each step we achieve the best possible error reduction. polynomials of degree k.) (Here Π k is the set of all 5

In order to use the Chebyshev iteration method we need to estimate the extreme eigenvalues of A and to determine an interval [a, b] which contains the spectrum of A. Having done that, one finds the following formulas to compute the method parameters recursively: α k = a + b 2 β k, Note that α k >, k. = a + b β k 2 ( b a 4 ) 2 β k, β 0 = 4 a + b. (5) Theorem The following results hold: lim β k = k 4 ( a + b ) 2, e k A e 0 A It follows then that e k A e 0 A T k ( b+a b a 0 monotonically. σ ) k 2 + σ 2k, σ = a/b + a/b. (For the special choice a = λ min (A), b = λ max (A), we have σ = {(A).) + {(A) From the above convergence rate estimate one can determine a priory the number of Chebyshev iterations needed to be performed in order to achieve an error reduction e k A e 0 A ε. (6) Indeed, to insure (6), it suffices to perform ( ) k ln ε + ε 2 / ln(σ ) or k = 2 b a ln 2 ε iterations. (7) 6