Beruflich Dokumente
Kultur Dokumente
Diego Mendoza
Master in Mechanical Engineering Program
Universidad Autónoma del Caribe
March 4, 2016
Introduction
Linear equations systems examples
Figure: Structure
Introduction
x (k +1) = Bx (k ) + C (1)
Iterative methods for linear equation systems (LES), can be
broadly classified as:
1. Stationary: In these methods B and C in Eq. 1 do not
depend on k.
2. Nonstationary: Are methods were B and C (Eq. 1) do
change during the iterative process.
Some stationary methods
(k +1) (k +1) (k )
xi = ω x̄i + ( 1 − ω ) xi (0 < ω < 2) (4)
min f (x ) = x T Ax − bx
x
is
∇f (x ∗ ) = 0 ⇔ Ax ∗ − b = 0
Therefore the minimizer of the quadratic function
f (x ) = x T Ax − bx is also a solution to the linear system
Ax = b.
The minimizer of f (x ) can be found using a line search
strategy
x (k +1) = x (k ) + α k p (k )
where x (k +1) is the new value of x, α is the steplength and
p (k ) is a descent direction of f (x ).
The general procedure for the line searc consist of:
1. Fiding a (local) descent direction p such that
∇ f ( x (k ) ) T p ( x (k ) ) < 0
dφ d (f (x (k ) + αp (k ) ))
= =0
dα dα
where
φ(α) = (x (k ) + αp (k ) )T A(x (k ) + αp (k ) ) − (x (k ) + αp (k ) )T b
where T
p (k −1) Ar (k −1)
sk − 1 = (k −1)T (k −1)
p Ap
The basic algortihm is as follows
Algorithm 4 pseudocode for Conjugate Gradient method
1: Compute r (0) = b − Ax (0) and p (1) = r (0) .
2: for k = 1, 2, . . . do
T T
3: αk = r (k −1) r (k −1) /(p (k ) Ap (k ) )
4: x (k ) = x (k −1) + α k p (k )
5: r (k ) = r (k −1) − αk Ap (k )
T T
6: sk = r ( k ) r ( k ) / ( r ( k − 1 ) r ( k − 1 ) )
7: p ( k + 1 ) = r ( k ) + sk p ( k )
8: Check for convergence; continue if necessary.
9: end for
Figure: Performance of iterative methods for linear equations
system
Exercise 1
Exercise 2
Exercise 3
Exercise 4
Algorithm 5 pseudocode for Conjugate Gradient method
1: Compute r (0) = b − Ax (0) for some initial guess.
2: for k = 1, 2, . . . do
3: solve Mz (i −1) = r (i −1)
T
4: ρ i −1 = r (i −1) z (i −1)
5: if i = 1 then
6: p (1) = z (0)
7: else
8: β i −1 = ρi −1 /ρi −2
9: p (i ) = z (i −1) + β i −1 p (i −1)
10: end if
11: q (i ) = Ap (i )
12: αi = ρi −1 /p ( i )T q (i )
13: x (i ) = x (i −1) + α i p (i )
14: r (i ) = r (i −1) − α i q (i )
15: Check for convergence; continue if necessary.
16: end for