• 沒有找到結果。

GCG-type Methods for Nonsymmetric Linear Systems

N/A
N/A
Protected

Academic year: 2022

Share "GCG-type Methods for Nonsymmetric Linear Systems"

Copied!
45
0
0

加載中.... (立即查看全文)

全文

(1)

師大

GCG-type Methods for Nonsymmetric Linear Systems

Tsung-Ming Huang

Department of Mathematics National Taiwan Normal University

December 6, 2011

(2)

師大

Outline

1 GCG method(Generalized Conjugate Gradient)

2 BCG method (A: unsymmetric)

3 The polynomial equivalent method of the CG method

4 Squaring the CG algorithm

5 Bi-CGSTAB: A Fast and Smoothly Converging Variant of Bi-CG for the Solution of Nonsymmetric Linear Systems

T.M. Huang (NTNU) GCG-type Methods for Nonsymmetric LS December 6, 2011 2 / 45

(3)

師大

Recall: A is s.p.d. Consider the quadratic functional

F (x) = 1

2xTAx − xTb Ax= b ⇐⇒ min

x∈RnF (x) = F (x) Consider

ϕ(x) = 1

2(b − Ax)TA−1(b − Ax) = F (x) + 1

2bTA−1b, (1) where 12bTA−1b is a constant. Then

Ax= b ⇐⇒ ϕ(x) = min

x∈Rnϕ(x) = [ min

x∈RnF (x)] +1

2bTA−1b

(4)

師大

Algorithm: Conjugate Gradient method (CG-method)

Input: Given s.p.d. A, b ∈ Rn and x0 ∈ Rn and r0= b − Ax0 = p0.

1: Set k = 0.

2: repeat

3: Compute αk= p

T krk pTkApk;

4: Compute xk+1 = xk+ αkpk;

5: Compute rk+1 = rk− αkApk= b − Axk+1;

6: Compute βk= −r

T k+1Apk

pTkApk ;

7: Compute pk+1= rk+1+ βkpk;

8: Set k = k + 1;

9: until rk = 0

Numerator: rTk+1((rk− rk+1)/αk) = (−rTk+1rk+1)/αk

Denominator: pTkApk= (rkT + βk−1pTk−1)((rk− rk+1)/αk) = (rTkrk)/αk.

T.M. Huang (NTNU) GCG-type Methods for Nonsymmetric LS December 6, 2011 4 / 45

(5)

師大

Remark 1

CG method does not need to compute any parameters. It only needs matrix vector and inner product of vectors. Hence it can not destroy the sparse structure of the matrix A.

The vectors rk and pk generated by CG-method satisfy:

pTi rk = (pi, rk) = 0, i < k riTrj = (ri, rj) = 0, i 6= j pTi Apj = (pi, Apj) = 0, i 6= j xk+1= x0+Pk

i=0αipi minimizes F (x) over x = x0+ < p0, · · · , pk>.

(6)

師大

GCG method(Generalized Conjugate Gradient)

GCG method is developed to minimize the residual of the linear equation under some special functional. In conjugate gradient method we take

ϕ(x) = 1

2(b − Ax)TA−1(b − Ax) = 1

2rTA−1r = 1

2krk2A−1, where kxkA−1 =√

xTA−1x.

Let A be a unsymmetric matrix. Consider the functional f (x) = 1

2(b − Ax)TP (b − Ax),

where P is s.p.d. Thus f (x) > 0, unless x= A−1b ⇒ f (x) = 0, so x minimizes the functional f (x).

T.M. Huang (NTNU) GCG-type Methods for Nonsymmetric LS December 6, 2011 6 / 45

(7)

師大

Different choices of P:

(i) P = A−1 (A is s.p.d.) ⇒ CG method (classical)

(ii) P = I ⇒ GCR method (Generalized Conjugate Residual).

f (x) = 1

2(b − Ax)T(b − Ax) = 1 2krk22 Here {ri} forms A-conjugate.

(iii) Consider M−1Ax = M−1b. Take P = MTM > 0 ⇒ GCGLS method (Generalized Conjugate Gradient Least Square).

(iv) Similar to (iii), take P = (A + AT)/2 (note: P is not positive definite) and M = (A + AT)/2 we get GCG method (by Concus, Golub and Widlund). In general, P is not necessary to be taken positive definite, but it must be symmetric (PT = P ). Therefore, the minimality property does not hold.

(8)

師大

Let

(x, y)o= xTP y =⇒ (x, y)o = (y, x)o. Algorithm: GCG method

Input: Given A, b ∈ Rn and x0 ∈ Rn and r0= b − Ax0 = p0.

1: Set k = 0.

2: repeat

3: Compute αk= (rk, Apk)o/(Apk, Apk)o;

4: Compute xk+1 = xk+ αkpk;

5: Compute rk+1 = rk− αkApk= b − Axk+1;

6: Compute βk= −(Ark+1, Api)o/(Api, Api)o, for i = 0, 1, . . . , k;

7: Compute pk+1= rk+1+Pk

i=0β(k)i pi;

8: Set k = k + 1;

9: until rk = 0

T.M. Huang (NTNU) GCG-type Methods for Nonsymmetric LS December 6, 2011 8 / 45

(9)

師大

In GCG method, the choice of {βi(k)}ki=1 satisfy:

(rk+1, Api)o = 0, i ≤ k (2a) (rk+1, Ari)o = 0, i ≤ k (2b) (Api, Apj)o = 0, i 6= j (2c) Theorem 1

xk+1= x0+Pk

i=0αkpi minimizes f (x) = 12(b − Ax)TP (b − Ax) over x = x0+ < p0, · · · , pk>, where P is s.p.d.

(The proof is the same as that of classical CG method).

If P is indefinite, which is allowed in GCG method, then the minimality property does not hold. xk+1 is the critical point of f (x) over

x = x0+ < p0, · · · , pk>.

(10)

師大

Question

Can the GCG method break down? i.e., Can αk in GCG method be zero?

Consider the numerator of αk:

(rk, Apk)o= (rk, Ark)o [by Line 7 in GCG Algorithm and (2a) ]

= rTkP Ark

= rTkATP rk [Take transpose]

= rTk(P A + ATP )

2 rk. (3)

From (3), if (P A + ATP ) is positive definite, then αk6= 0 unless rk= 0.

Hence if the matrix A satisfies (P A + ATP ) positive definite, then GCG method can not break down.

T.M. Huang (NTNU) GCG-type Methods for Nonsymmetric LS December 6, 2011 10 / 45

(11)

師大

From Lines 5 and 7 in GCG Algorithm, rk and pk can be rewritten by

rk= ψk(A)r0, (4a)

pk= ϕk(A)r0, (4b)

where ψk and ϕk are polynomials of degree ≤ k with ψk(0) = 1. From (4a) and (2b) follows that

(rk+1, Ai+1r0)o= 0, i = 0, 1, . . . , k. (5) From (4b) and Line 6 in GCG Algorithm, the numerator of β(k)i can be expressed by

(Ark+1, Api)o = rk+1T ATP Api= rk+1T ATP Aϕi(A)r0. (6)

(12)

師大

If ATP can be expressed by

ATP = P θs(A), (7)

where θs is some polynomial of degree s. Then (6) can be written by (Ark+1, Api)o = rk+1T ATP Aϕi(A)r0

= rk+1T P θs(A)Aϕi(A)r0

= (rk+1, Aθs(A)ϕi(A)r0)o.

(8)

From (5) we know that if s + i ≤ k, then (8) is zero, i.e.,(Ark+1, Api)o = 0. Hence

βi(k)= 0, i = 0, 1, . . . , k − s.

But only in the special case s will be small.

T.M. Huang (NTNU) GCG-type Methods for Nonsymmetric LS December 6, 2011 12 / 45

(13)

師大

For instance :

(i) In classical CG method, A is s.p.d, P is taking by A−1. Then ATP = AA−1 = I = A−1A = A−1θ1(A), where θ1(x) = x, s = 1.

So, β(k)i = 0, for all i + 1 ≤ k, it is only βk(k)6= 0.

(ii) Concus, Golub and Widlund proposed GCG method, it solves M−1Ax = M−1b. (A: unsymmetric), where M = (A + AT)/2 and P = (A + AT)/2 (P may be indefinite).

Check condition (7):

(M−1A)TP = ATM−1M = AT = M (2I−M−1A) = P (2I−M−1A).

Then

θs(M−1A) = 2I − M−1A,

where θ1(x) = 2 − x, s = 1. Thus βi(k)= 0, i = 0, 1, . . . , k − 1.

Therefore we only use rk+1 and pk to construct pk+1.

(14)

師大

Check condition ATP + P A:

(M−1A)TM + M M−1A = AT + A indefinite The method can possibly break down.

(iii) The other case s = 1 is BCG (BiCG) (See next paragraph).

Remark 2

Except the above three cases, the degree s is usually very large. That is, we need to save all directions pi (i = 0, 1, . . . , k) in order to construct pk+1 satisfying the conjugate orthogonalization condition (2c). In GCG method, each iteration step needs to save 2k + 5 vectors (xk+1, rk+1, pk+1, {Api}ki=0, {pi}ki=0), k + 3 inner products (Here k is the iteration number). Hence, if k is large, then the space of storage and the

computation cost can become very large and can not be acceptable. So, GCG method, in general, has some practical difficulty. Such as GCR, GMRES (by SAAD) methods, they preserve the optimality (P > 0), but it is too expensive (s is very large).

T.M. Huang (NTNU) GCG-type Methods for Nonsymmetric LS December 6, 2011 14 / 45

(15)

師大

Modification:

(i) Restarted: If GCG method does not converge after m + 1 iterations, then we take xk+1 as x0 and restart GCG method. There are at most 2m + 5 saving vectors.

(ii) Truncated: The most expensive step of GCG method is to compute βi(k), i = 0, 1, . . . , k so that pk+1 satisfies (2c). We now release the condition (2c) to require that pk+1 and the nearest m direction {pi}ki=k−m+1 satisfy the conjugate orthogonalization condition.

(16)

師大

BCG method (A: unsymmetric)

BCG is similar to the CG, it does not need to save the search direction.

But the norm of the residual by BCG does not preserve the minimal property.

Solve Ax = b by considering ATy = c (phantom). Let A =˜

 A 0 0 AT



, x =˜

 x y

 , ˜b =

 b c

 . Consider

A˜˜x = ˜b.

Take P =

 0 A−T A−1 0



(P = PT). This implies A˜TP = P ˜A.

From (7) we know that s = 1 for ˜A˜x = ˜b. Hence it only needs to save one direction pk as in the classical CG method.

T.M. Huang (NTNU) GCG-type Methods for Nonsymmetric LS December 6, 2011 16 / 45

(17)

師大

Apply GCG method to ˜A˜x = ˜b

1: Given ˜x0 =

 x0

ˆ x0



, compute ˜p0 = ˜r0 = ˜b − ˜A˜x0=

 r0

ˆ r0

 .

2: Set k = 0.

3: repeat

4: Compute αk= (˜rk, ˜A˜pk)o/( ˜A˜pk, ˜A˜pk)o;

5: Compute ˜xk+1 = ˜xk+ αkk;

6: Compute ˜rk+1 = ˜rk− αkA˜˜pk;

7: Compute βk= −( ˜A˜rk+1, ˜A˜pk)o/( ˜A˜pk, ˜A˜pk)o;

8: Compute ˜pk+1= ˜rk+1+ βkk;

9: Set k = k + 1;

10: until ˜rk = 0

(18)

師大

Simplification (BCG method)

1: Given x0, compute p0 = r0= b − Ax0.

2: Choose ˆr0, ˆp0 = ˆr0.

3: Set k = 0.

4: repeat

5: Compute αk= (ˆrk, rk)/(ˆpk, Apk);

6: Compute xk+1 = xk+ αkpk;

7: Compute rk+1 = rk− αkApk, rˆk+1 = ˆrk− αkATk;

8: Compute βk= (ˆrk+1, rk+1)/(ˆrk, rk);

9: Compute pk+1= rk+1+ βkpk, pˆk+1= ˆrk+1+ βkk;

10: Set k = k + 1;

11: until rk = 0 From above we have

( ˜A˜pk, ˜A˜pk)o=pTkAT, ˆpTkA

 0 A−T A−1 0

  Apk ATk



= 2(ˆpk, Apk).

T.M. Huang (NTNU) GCG-type Methods for Nonsymmetric LS December 6, 2011 18 / 45

(19)

師大

BCG method satisfies the following relations:

rkTi= ˆrTkpi= 0, i < k (9a) pTkATi = ˆpTkApi= 0, i < k (9b) rTki= ˆrTkri= 0, i < k (9c)

Definition 2

(9c) and (9b) are called biorthogonality and biconjugacy condition, respectively.

(20)

師大

Property:

(i) In BCG method, the residual of the linear equation does not satisfy the minimal property, because P is taken by

P =

 0 A−T A−1 0



and P is symmetric, but not positive definite. The minimal value of the functional f (x) may not exist.

(ii) BCG method can break down, because Z = ( ˜ATP + P ˜A)/2 is not positive definite. From above discussion, αk can be zero. But this case occurs very few.

T.M. Huang (NTNU) GCG-type Methods for Nonsymmetric LS December 6, 2011 20 / 45

(21)

師大

GCG

GCR, GCR(k) BCG

Orthomin(k) CGS

Orthodir BiCGSTAB

Orthores QMR

GMRES(m) TFQMR

FOM Axelsson LS

(22)

師大

The polynomial equivalent method of the CG method

Consider first A is s.p.d.

CG-method

1: r0= b − Ax0 = p0.

2: Set k = 0.

3: repeat

4: αk= (p(rk,pk)

k,Apk) = (p(rk,rk)

k,Apk);

5: xk+1 = xk+ αkpk;

6: rk+1 = rk− αkApk;

7: βk =−(r(pk+1,Apk)

k,Apk) = −(rk+1(r ,rk+1)

k,rk) ; 8: pk+1= rk+1+ βkpk;

9: k = k + 1;

10: until rk= 0

Equivalent CG-method

1: r0 = b − Ax0 = p0, p−1 = 1, ρ−1= −1.

2: Set k = 0.

3: repeat

4: ρk= rTkrk, βk= ρρk

k−1;

5: pk= rk+ βkpk−1;

6: σk= pTkApk, αk= ρσk

k;

7: xk+1= xk+ αkpk;

8: rk+1= rk− αkApk;

9: k = k + 1;

10: until rk= 0

T.M. Huang (NTNU) GCG-type Methods for Nonsymmetric LS December 6, 2011 22 / 45

(23)

師大

Remark 3

1. Ek= rTkA−1rk= minx∈x0+Kkkb − Axk2A−1

2. rTi rj = 0, pTi Apj = 0, i 6= j.

From the structure of the new form of the CG method, we write rk = ϕk(A)r0, pk= ψk(A)r0

where ϕk and ψk are polynomial of degree ≤ k. Define ϕ0(τ ) ≡ 1 and ϕ−1(τ ) ≡ 0. Then we find

pk= ϕk(A)r0+ βkψk−1(A)r0 ≡ ψk(A)r0 (10a) with

ψk(τ ) ≡ ϕk(τ ) + βkψk−1(τ ), (10b) and

rk+1= ϕk(A)r0− αkk(A)r0≡ ϕk+1(A)r0 (11a) with

(24)

師大

The polynomial equivalent method of the CG method :

1: ϕ0 ≡ 1, ϕ−1 ≡ 0, ρ−1= 1.

2: for k = 0, 1, 2, . . . do

3: ρk= (ϕk, ϕk), βk= ρρk

k−1;

4: ψk= ϕk+ βkψk−1;

5: σk= (ψk, θψk), αk= ρσk

k;

6: ϕk+1 = ϕk− αkθψk;

7: end for where θ(τ ) = τ .

T.M. Huang (NTNU) GCG-type Methods for Nonsymmetric LS December 6, 2011 24 / 45

(25)

師大

The minimization property reads

Ek = (ϕk, θ−1ϕk) = min

ϕ∈PN

(ϕ, θ−1ϕ) ϕ(0)2 . We also have

i, ϕj) = 0, i 6= j from (ri, rj) = 0, i 6= j.

i, θψj) = 0, i 6= j from (pi, Apj) = 0, i 6= j.

Theorem 3

Let [·, ·] be any symmetric bilinear form satisfying [ϕχ, ψ] = [ϕ, χψ] ∀ϕ, ψ, χ ∈ PN.

Let the sequence of ϕi and ψi be constructed according to PE algorithm, but using [·, ·] instead (·, ·). Then as long as the algorithm does not break down by zero division, then ϕi and ψi satisfy

i, ϕj] = ρiδij, [ψi, θψj] = σiδij with θ(τ ) ≡ τ .

(26)

師大

Bi-Conjugate Gradient algorithm

1: Given r0 = b − Ax0, p−1 = ˆp−1 and ˆr0 arbitrary.

2: for k = 0, 1, 2, . . . do

3: ρk= ˆrTkrk, βk= ρkk−1;

4: pk= rk+ βkpk−1, ˆpk= ˆrk+ βkk−1;

5: σk= ˆpTkApk, αk= ρkk;

6: rk+1= rk− αkApk, ˆrk+1 = ˆrk− αkATk;

7: xk+1= xk+ αkpk;

8: end for Property:

rk= b − Axk, rTij = 0, i 6= j and pTi ATj = 0, i 6= j.

T.M. Huang (NTNU) GCG-type Methods for Nonsymmetric LS December 6, 2011 26 / 45

(27)

師大

Consider

Ax = b, A : nonsymmetric.

Given x0, r0 = b − Ax0, let ˆr0 be a suitably chosen vector. Define [·, ·] by [ϕ, ψ] = ˆrT0ϕ(A)ψ(A)r0= (ϕ(AT)ˆr0)Tψ(A)r0

and define p−1= ˆp−1= 0. (If A symmetric : (ϕ, ψ) = rT0ϕ(A)ψ(A)r0).

Then we have

rk = ϕk(A)r0, rˆk= ϕk(AT)ˆr0, pk = ψk(A)r0, pˆk = ψk(AT)ˆr0

with ϕk and ψk according to (10b) and (11b). Indeed, these vectors can be produced by the Bi-Conjugate Gradient algorithm:

(28)

師大

Squaring the CG algorithm: CGS Algorithm (SISC, 1989, Sonneveld)

Assume that Bi-CG is converging well. Then rk→ 0 as k → ∞. Because rk= ϕk(A)r0, ϕk(A) behaves like contracting operators.

Expect: ϕk(AT) behaves like contracting operators (i.e., ˆrk→ 0).

But ”quasi-residuals” ˆrk is not exploited, they need to be computed for the ρk and σk.

Disadvantage: Work of Bi-CG is twice the work of CG and in general ATv is not easy to compute. Especially if A is stored with a general data structure.

T.M. Huang (NTNU) GCG-type Methods for Nonsymmetric LS December 6, 2011 28 / 45

(29)

師大

• Improvement: Using Polynomial equivalent algorithm to CG.

Since ρk = [ϕk, ϕk] and σk= [ψk, θψk], [·, ·] has the property [ϕχ, ψ] = [ϕ, χψ]. Let ϕ0 = 1. Then

ρk = [ϕ0, ϕ2k], σk= [ϕ0, θψk2].

 ϕk+1 = ϕk− αkθψk, ψk= ϕk+ βkψk−1. Remark 4

ρk = ˆrkTrk= (ϕk(AT)ˆr0)Tk(A)r0) = ˆrT0ϕ2k(A)r0, σk = ˆpTkApk = (ψk(AT)ˆr0)TA(ψk(A)r0) = ˆr0T2k(A)r0.

(30)

師大

• Purpose:

1 Find an algorithm that generates the polynomial ϕ2k and ψ2k rather than ϕk and ψk.

2 Compute approximated solution xk with rk= ϕ2k(A)r0 as residuals (try to interpret). Because ρk= ˆrT0rk with rk= ϕ2k(A)r0, ˆrk and ˆpk need not to be computed.

How to compute ϕ2k and ψ2k?

ψk2 = [ϕk+ βkψk−1]2 = ϕ2k+ 2βkϕkψk−1+ β2kψk−12 , ϕ2k+1 = [ϕk− αkθψk]2 = ϕ2k− 2αkθϕkψk+ α2kθ2ψ2k.

T.M. Huang (NTNU) GCG-type Methods for Nonsymmetric LS December 6, 2011 30 / 45

(31)

師大

Since

ϕkψk = ϕkk+ βkψk−1] = ϕ2k+ βkϕkψk−1,

we only need to compute ϕkψk−1, ϕ2k and ψ2k. Now define for k ≥ 0 : Φk = ϕ2k, Θk= ϕkψk−1, Ψk−1= ψk−12 .

From

ψ2k= ϕ2k+ 2βkϕkψk−1+ βk2ψk−12 , ϕk+1ψk= (ϕk− αkθψkk = ϕkψk− αkθψk2,

ϕ2k+1= ϕ2k− 2αkθϕkψk+ α2kθ2ψ2k

= ϕ2k− αkθ(ϕkψk− αkθψk2) − αkθϕkψk= ϕ2k− αkθ(ϕk+1ψk+ ϕkψk),

we have

Yk = ϕkψk = Φk+ βkΘk,

Ψk = Φk+ 2βkΘk+ βk2Ψk−1= Yk+ βkk+ βkΨk−1) , Θk+1= Yk− αkθΨk,

Φk+1= Φk− αkθ(Yk+ Θk+1).

(32)

師大

Bi-Conjugate Gradient

1: Given r0 = b − Ax0, p−1= ˆp−1 and arbitrary ˆ

r0.

2: for k = 0, 1, 2, . . . do

3: ρk= ˆrTkrk, βk= ρkk−1;

4: pk= rk+ βkpk−1, ˆ

pk= ˆrk+ βkk−1;

5: σk= ˆpTkApk, αk= ρkk;

6: rk+1 = rk− αkApk, ˆ

rk+1 = ˆrk− αkATk;

7: xk+1 = xk+ αkpk;

8: end for

CGS

1: Φ0 ≡ 1, Θ0 ≡ Ψ−1≡ 0, ρ−1= 1.

2: for k = 0, 1, 2, . . . do

3: ρk= [1, Φk], βk= ρkk−1;

4: Yk = Φk+ βkΘk;

5: Ψk= Yk+ βkk+ βkΨk−1);

6: σk= [1, θΨk], αk= ρkk;

7: Θk+1= Yk− αkθΨk;

8: Φk+1= Φk− αkθ(Yk+ Θk+1);

9: end for

T.M. Huang (NTNU) GCG-type Methods for Nonsymmetric LS December 6, 2011 32 / 45

(33)

師大

CGS

1: Φ0 ≡ 1, Θ0 ≡ Ψ−1≡ 0, ρ−1= 1.

2: for k = 0, 1, 2, . . . do

3: ρk= [1, Φk], βk= ρkk−1;

4: Yk= Φk+ βkΘk;

5: Ψk = Yk+ βkk+ βkΨk−1);

6: σk= [1, θΨk], αk= ρkk;

7: Θk+1 = Yk− αkθΨk;

8: Φk+1 = Φk− αkθ(Yk+ Θk+1);

9: end for

CGS Variant

1: Given r0= b − Ax0, q0 = p−1 = 0, ρ−1= 1.

2: for k = 0, 1, 2, . . . do

3: ρk= ˆr0Trk, βk= ρkk−1;

4: uk= rk+ βkqk;

5: pk = uk+ βk(qk+ βkpk−1);

6: vk= Apk;

7: σk= ˆr0Tvk, αk= ρkk;

8: qk+1 = uk− αkvk;

9: rk+1= rk−αkA(uk+qk+1);

10: xk+1= xk+ αk(uk+ qk+1);

11: end for

Define rk= Φk(A)r0, qk= Θk(A)r0, pk= Ψk(A)r0 and uk= Yk(A)r0.

(34)

師大

Since r0 = b − Ax0, rk+1− rk= A(xk− xk+1), we have that

rk= b − Axk. So this algorithm produces xk of which the residual satisfy rk= ϕ2k(A)r0.

T.M. Huang (NTNU) GCG-type Methods for Nonsymmetric LS December 6, 2011 34 / 45

(35)

師大

Bi-CGSTAB: A Fast and Smoothly Converging Variant of Bi-CG for the Solution of Nonsymmetric Linear Systems (SISC, 1992, Van der Vorst)

Bi-CG method

1: Given r0 = b − Ax0, (ˆr0, r0) 6= 0, ρ0 = 1, ˆp0= p0= 0.

2: for k = 1, 2, . . . do

3: ρk= (ˆrk−1, rk−1);

4: βk= ρkk−1;

5: pk= rk−1+ βkpk−1, ˆpk= ˆrk−1+ βkk−1;

6: vk = Apk;

7: αk= ρk/(ˆpk, vk);

8: xk= xk−1+ αkpk;

9: Stop here, if xk is accurate enough.

10: rk= rk−1− αkvk= rk−1− αkApk;

11: ˆrk= ˆrk−1− αkATk;

12: end for

(36)

師大

Property:

(i) rk ⊥ ˆr0, . . . , ˆrk−1 and ˆrk⊥ r0, . . . , rk−1.

(ii) three-term recurrence relations between {rk} and {ˆrk}.

(iii) It terminates within n steps, but no minimal property.

Since

rBi−CGk = ϕk(A)r0, ˆrkBi−CG= ϕk(AT)ˆr0, it implies that

(rk, ˆri) = ϕk(A)r0, ϕi(AT)ˆr0 = (ϕi(A)ϕk(A)r0, ˆr0) = 0, i < k.

T.M. Huang (NTNU) GCG-type Methods for Nonsymmetric LS December 6, 2011 36 / 45

(37)

師大

CGS Method

1: Given x0, r0= b − Ax0, (r0, ˆr0) 6= 0, ˆr0= r0, ρ0 = 1, p0= q0 = 0.

2: for k = 1, 2, . . . do

3: ρk= (ˆr0, rk−1), βk= ρkk−1;

4: uk= rk−1+ βkqk−1;

5: pk= uk+ βk(qk−1+ βkpk−1);

6: vk = Apk;

7: αk= ρk/(ˆr0, vk);

8: qk= uk− αkvk;

9: wk= uk+ qk;

10: xk= xk−1+ αkwk;

11: Stop here, if xk is accurate enough.

12: rk= rk−1− αkAwk;

13: end for

We have rkCGS= ϕk(A)2r0.

(38)

師大

From Bi-CG method we have rkBi−CG= ϕk(A)r0 and pk+1 = ψk(A)r0. Thus we get

ψk(A)r0= (ϕk(A) + βkψk−1(A)) r0, and

ϕk(A)r0 = (ϕk−1(A) − αkk−1(A)) r0, where ψk= ϕk+ βkψk−1 and ϕk= ϕk−1− αkθψk−1. Since

ϕk(A)r0, ϕj(AT)ˆr0 = 0, j < k, it holds that

ϕk(A)r0 ⊥ ˆr0, AT0, . . . , (AT)k−1ˆr0 if and only if

( ˜ϕj(A)ϕk(A)r0, ˆr0, ) = 0

for some polynomial ˜ϕj of degree j < k for j = 0, 1, . . . , k − 1.

T.M. Huang (NTNU) GCG-type Methods for Nonsymmetric LS December 6, 2011 38 / 45

(39)

師大

In Bi-CG method, we take ˜ϕj = ϕj, ˆrk= ϕk(AT)ˆr0 and exploit it in CGS to get rkCGS= ϕ2k(A)r0. Now rk = ˜ϕk(A)ϕk(A)r0. How to choose ˜ϕk polynomial of degree k so that krkk satisfies the minimum. Like

polynomial, we can determine the optimal parameters of ˜ϕk so that krkk satisfies the minimum. But the optimal parameters for the Chebychev polynomial are in general not easily obtainable. Now we take

˜

ϕk≡ ηk(x), where

ηk(x) = (1 − ω1x)(1 − ω2x) · · · (1 − ωkx).

Here ωj are suitable constants to be selected.

(40)

師大

Define

rk = ηk(A)ϕk(A)r0. Then

rk = ηk(A)ϕk(A)r0

= (1 − ωkA)ηk−1(A) (ϕk−1(A) − αkk−1(A)) r0

= {(ηk−1(A)ϕk−1(A) − αkk−1(A)ψk−1(A))} r0

−ωkA {(ηk−1(A)ϕk−1(A) − αkk−1(A)ψk−1(A))} r0

= rk−1− αkApk− ωkA(rk−1− αkApk)

T.M. Huang (NTNU) GCG-type Methods for Nonsymmetric LS December 6, 2011 40 / 45

(41)

師大

and

pk+1 = ηk(A)ψk(A)r0

= ηk(A) (ϕk(A) + βkψk−1(A)) r0

= ηk(A)ϕk(A)r0+ βk(1 − ωkA)ηk−1(A)ψk−1(A)r0

= ηk(A)ϕk(A)r0+ βkηk−1(A)ψk−1(A)r0

−βkωkk−1(A)ψk−1(A)r0

= rk+ βk(pk− ωkApk).

Recover the constants ρk, βk, and αk in Bi-CG method.

(42)

師大

We now compute βk: Let ˆ

ρk+1= (ˆr0, ηk(A)ϕk(A)r0) = ηk(AT)ˆr0, ϕk(A)r0 .

From Bi-CG we have ϕk(A)r0 ⊥ all vectors µk−1(AT)ˆr0, where µk−1 is an arbitrary polynomial of degree k − 1. Consider the highest order term of ηk(AT) (when computing ˆρk+1) is (−1)kω1ω2· · · ωk(AT)k. From Bi-CG method, we also have

ρk+1= ϕk(AT)ˆr0, ϕk(A)r0 .

The highest order term of ϕk(AT) is (−1)kα1· · · αk(AT)k. Thus βk= ( ˆρk/ ˆρk−1) (αk−1k−1) ,

T.M. Huang (NTNU) GCG-type Methods for Nonsymmetric LS December 6, 2011 42 / 45

(43)

師大

because

βk = ρk

ρk−1 = α1· · · αk−1(AT)k−10, ϕk−1(A)r0

 (α1· · · αk−2(AT)k−20, ϕk−2(A)r0)

=

1· · · αk−1

ω1· · · ωk−1ω1· · · ωk−1(AT)k−10, ϕk−1(A)r0



1· · · αk−2

ω1· · · ωk−2ω1· · · ωk−2(AT)k−20, ϕk−2(A)r0



= ( ˆρk/ ˆρk−1) (αk−1k−1) . Similarly, we can compute ρk and αk. Let

rk= rk−1− γAy, xk= xk−1+ γy (side product).

Compute ωk so that rk= ηk(A)ϕk(A)r0 is minimized in 2-norm as a function of ωk.

(44)

師大

Bi-CGSTAB Method

1: Given x0, r0= b − Ax0, ˆr0 arbitrary, such that (r0, ˆr0) 6= 0, e.g.

ˆ

r0= r0, ρ0 = α = ω0 = 1, v0 = p0 = 0.

2: for k = 1, 2, . . . do

3: ρk= (ˆr0, rk−1), β = (ρkk−1)(α/ωk−1);

4: pk= rk−1+ β(pk−1− ωk−1vk−1);

5: vk = Apk;

6: α = ρk/(ˆr0, vk);

7: s = rk−1− αvk;

8: t = As;

9: ωk= (t, s)/(t, t);

10: xk= xk−1+ αpk+ ωks (= xk−1+ αpk+ ωk(rk−1− αApk));

11: Stop here, if xk is accurate enough.

12: rk= s − ωkt (= rk−1− αApk− ωkA(rk−1− αApk) = rk−1− A(αpk+ ωk(rk−1− αApk));

13: end for

T.M. Huang (NTNU) GCG-type Methods for Nonsymmetric LS December 6, 2011 44 / 45

(45)

師大

Preconditioned Bi-CGSTAB-P:

Rewrite Ax = b as

A˜˜x = ˜b with A = K˜ 1−1AK2−1, where x = K2−1x and ˜˜ b = K1−1b. Then

˜

pk:= K1−1pk,

˜

vk:= K1−1vk,

˜

rk:= K1−1rk,

˜

s := K1−1s, t := K˜ 1−1t,

˜

xk:= K2xk,

˜

r0:= K1T0.

參考文獻

相關文件

GMRES: Generalized Minimal Residual Algorithm for Solving Nonsymmetric Linear Systems..

Now, nearly all of the current flows through wire S since it has a much lower resistance than the light bulb. The light bulb does not glow because the current flowing through it

where L is lower triangular and U is upper triangular, then the operation counts can be reduced to O(2n 2 )!.. The results are shown in the following table... 113) in

In the following we prove some important inequalities of vector norms and matrix norms... We define backward and forward errors in

Since the subsequent steps of Gaussian elimination mimic the first, except for being applied to submatrices of smaller size, it suffices to conclude that Gaussian elimination

Since the subsequent steps of Gaussian elimination mimic the first, except for being applied to submatrices of smaller size, it suffices to conclude that Gaussian elimination

For R-K methods, the relationship between the number of (function) evaluations per step and the order of LTE is shown in the following

Now we assume that the partial pivotings in Gaussian Elimination are already ar- ranged such that pivot element a (k) kk has the maximal absolute value... The growth factor measures