• No results found

Complex Absorbing Potential Method: theory and implementation

N/A
N/A
Protected

Academic year: 2022

Share "Complex Absorbing Potential Method: theory and implementation"

Copied!
41
0
0

Loading.... (view fulltext now)

Full text

(1)

U.U.D.M. Project Report 2011:32

Examensarbete i matematik, 15 hp

Handledare och examinator: Michael Melgaard November 2011

Department of Mathematics

Complex Absorbing Potential Method:

theory and implementation

Samuel Edwards

(2)
(3)

Contents

1 Introduction 2

2 The Basic Model 2

2.1 The Riemann surface . . . 8

3 The Complex Absorbing Potential 9

4 The Complex Symmetric Eigenvalue Problem 16

4.1 Preliminaries . . . 16 4.2 The QR Algorithm . . . 19 4.3 The Jacobi-Davidson method . . . 22

A Matlab code 29

A.1 An implementation of Newton’s method to calculate the res- onance energies . . . 29 A.2 A program that calculates the eigenvalues of ˆH using the Com-

plex Symmetric QR algorithm. . . 30 A.3 A program that calculates the trajectory of the resonance en-

ergy near 13.8 − 1.27i for N = 504, L = 12, using the Complex Symmetric Jacobi-Davidson algorithm . . . 31 A.4 A program that uses Householder reflections to transform a

complex symmetric matrix to symmetric tridiagonal form. . . 32 A.5 The complex symmetric Gram-Schmidt algorithm . . . 32 A.6 A program that uses Givens Rotations to calculate the QR

factorization of a symmetric tridiagonal matrix. . . 33 A.7 The complex symmetric QR algorithm . . . 34 A.8 The complex symmetric Jacobi-Davidson algorithm . . . 35

B Computation of elements of ˆH 36

Bibliography 39

(4)

1 Introduction

This report presents an example of how the complex symmetric eigenvalue problem arises when numerically calculating the resonance energies to the Schr¨odinger equation using the Complex Absorbing Potential method. This was done by studying the material in sections 3.1 and 4.1-4.3 of [1] and sec- tions 1-4 of [5]. Firstly the model studied in section 3.1 of [1] is presented, the resonance energies of which are calculated semi-analytically. Then the Com- plex Absorbing Potential method is introduced, and a demonstration of how it can be used to find the resonance energies is given. Finally, two algorithms to compute the eigenvalues of the Complex Symmetric matrices that arise in the CAP-method are discussed. The first of these is the Complex-Symmetric QR algorithm, which is presented in sections 4.1-4.3 of [1]. The second is a Jacobi-Davidson method for Complex Symmetric matrices, as found in [5].

2 The Basic Model

The time-independent Schr¨odinger equation

Hψ = Eψˆ (1)

is considered in three dimensions, with spherical coordinates ψ = ψ(r, ϑ, ϕ)

and ˆH being the Hamiltonian operator H = −ˆ 1

2∇2+ V (r). (2)

(5)

The potential, V (r), is defined to be spherically symmetric

V =





−V0 if 0 ≤ r < a V0 if a ≤ r < 2a 0 if 2a ≤ r

(3)

Expanding the Laplacian operator in spherical coordinates gives the PDE

− 1 2r2

 ∂

∂r

 r2

∂r



+ 1

sin ϑ

∂ϑ



sin ϑ ∂

∂ϑ



+ 1

sin2ϑ

2

∂ϕ2



ψ + V ψ = Eψ (4) Now, to simplify the solution, the separation of variables

ψ = R(r)Y (ϑ, ϕ) (5)

is used. The operator Lˆ2 =

 1 sin ϑ

∂ϑ



sin ϑ ∂

∂ϑ



+ 1

sin2ϑ

2

∂ϕ2



is an angular momentum operator, the eigenfunctions of which are known as the spherical harmonics. For the sake of simplicity, so-called S-wave scatter- ing is studied, i.e. the special case ˆL2Y (ϑ, ϕ) = 0. In this case Y will be a non-zero constant which, in combination with ˆL2R(r) = 0, gives

− 1 2r2

d dr

 r2 d

dr



R(r) + V (r)R(r) = E R(r) (6) This ordinary differential equation is solved with the help of the substitution R(r) = u(r)r . This yields

− 1 2r

 2r d

dr + r2 d2 dr2

 u(r)

r + V (r)u(r) = Eu(r)

−1 2

 2



−u r2 + u0

r

 + r



−u0 r2 + 2u

r3 +u00 r − u0

r2



+ V u = Eu Which simplifies to

u00+ 2(E − V )u = 0 (7)

This differential equation is then solved in the regions where V (r) assumes different values. Continuity of u and u0 at the boundary between regions

(6)

is required. Furthermore, to avoid singularities in R(r), it is required that u(0) = 0, as

r→0limR(r) = lim

r→0

u(r) r The solution of the equation is

u(r) = A1(ei

2(E+V0)r− e−i

2(E+V0)r) 0 ≤ r < a u(r) = A2ei

2(E−V0)r+ A3e−i

2(E−V0)r a ≤ r < 2a u(r) = A4ei

2Er+ A5e−i

2Er 2a ≤ r (8)

The continuity requirements at r = a give the following relations

2A1i sin(k1a) = A2eik2a+ A3e−ik2a (9) 2A1ik1cos(k1a) = A2ik2eik2a− A3ik2e−ik2a (10) (k1 =p

2(E + V0), k2 =p

2(E − V0), k3 =√ 2E) Solving this system for A2 and A3 gives

A2 = A1e−ik2a



i sin(k1a) + k1

k2 cos(k1a)



(11) A3 = A1eik2a



i sin(k1a) − k1

k2 cos(k1a)



(12) Likewise, at r = 2a, the system to be solved is

A2e2ik2a+ A3e−2ik2a = A4e2ik3a+ A5e−2ik3a (13) A2ik2e2ik2a− A3ik2e−2ik2a = A4ik3e2ik3a− A5ik3e−2ik3a (14) Solving for A4 and A5 in terms of A2 and A3 gives

A4 = e−2ik3a1 2



A2e2ik2a

 1 + k2

k3



+ A3e−2ik2a

 1 −k2

k3



(15) A5 = e2ik3a1

2



A2e2ik2a

 1 − k2

k3



+ A3e−2ik2a

 1 + k2

k3



(16) The energies that are desired are the Siegert resonance energies (see [2]).

These are the energies that correspond to poles of the so-called S-matrix, S(E), in the fourth quadrant of the complex plane

S(E) := A4

A (17)

(7)

with the wave function being an outgoing wave. This can be formulated equivalently as the energies were A5 = 0 and the wave function for r ≥ 2a is

u(r) = A4eik3, <(k3) ≥ 0

To locate these energies, A5 is expressed as a function of E by inserting (11) and (12) into (16);

A5 =e2ik3a1 2



A2e2ik2a

 1 − k2

k3



+ A3e−2ik2a

 1 + k2

k3



A5 =eik2a 2



i sin(k1a) +k1

k2cos(k1a)

  1 − k2

k3



+e−ik2a 2



i sin(k1a) − k1

k2 cos(k1a)

  1 + k2

k3



= 0 Euler’s formula then gives

A5 = eia(k1+k2) 4

 1 + k1

k2 − k2

k3 − k1

k3

 + eia(k2−k1)

4



−1 + k1 k2

+k2 k3

− k1 k3

 + e−ia(k1+k2)

4



−1 − k1 k2 −k2

k3 −k1 k3

 + e−ia(k2−k1)

4

 1 −k1

k2 + k2 k3 −k1

k3



= 0 (18) and again, with the addition formulae for sinus and cosinus

i sin k1a cos k2a+ik1

k2 sin k2a cos k1a+k2

k3 sin k1a sin k2a−k1

k3 cos k1a cos k2a = 0 Which simplifies to

k2k3sin k1a cos k2a+k1k3sin k2a cos k1a+ik1k2cos k1a cos k2a−ik22sin k1sin k2 = 0 (19) After expanding k1, k2, k3 in terms of E and V0, and letting the sum of the terms define the function P (E), the problem of finding the relevant poles of

(8)

S(E) is reduced to finding the zeroes of P (E).

P (E) :=p

(E2− EV0) sin(p

2(E + V0)a) cos(p

2(E − V0)a)+

p(E2+ EV0) sin(p

2(E − V0)a) cos(p

2(E + V0)a)+

i q

(E2− V02) cos(p

2(E + V0)a) cos(p

(2E − V0)a)−

i(E − V0) sin(p

2(E + V0)a) sin(p

2(E − V0)a)

Locating the zeroes of P (E) is somewhat difficult to solve analytically, so, as in [1], the zeros are computed numerically, using Newton’s method

Ej+1 = Ej − P (Ej) P0(Ej)

in the specific case a = 1, V0 = 10. The results are collected in Table 1. See Appendix A for the Matlab program used for this. The energy at −6.3538 is a bound state, that is

Z 0

|u(r)|2dr < ∞

as, for energies in R, the function A4eik3 is exponentially decaying. Also of note is the imaginary part of E, known as the width of the resonance. The width describes the decay of the resonance state with respect to time, as seen by studying the time dependant Schr¨odinger equation

i∂

∂tψ = ˆHψ

This is solved using the solution from the time dependant equation, R(r), together with an exponential term

ψ(r, t) = R(r)e−iEt

In the case E is a resonance energy, E = ER− iΓ/2 (ER, Γ ∈ R+), giving ψ(r, t) = R(r)e−i(ER−iΓ/2)t = R(r)e−iERt−tΓ/2

Using the values from Table 1,we see that the width of the resonance increases as E increases. This is explained thus, when <(E) < V0, the potential barrier traps the particle (described by the wave function) more effectively than for the higher energy levels, giving a more stable state. From Figure 1, it would appear that the resonance energies could have radial density functions, |u(r)|2, that might be in L2. This, however, is not the case, as is demonstrated in the next section.

(9)

−6.353800491353072 + 0.000000476966992i 4.001414397251380 − 0.003616371422452i 13.804342496156762 − 1.269152015401677i 20.677306105302716 − 2.065452505760665i 30.560595076771026 − 5.020902968718982i 45.230930043696411 − 6.030018368838527i 59.163906855958253 − 8.627586505485850i 79.476677197973032 − 10.610235576861449i 98.273816336887705 − 12.612523040649435i

Table 1: Calculated values of E, |<(E)| < 100. The initial values were integers between −100 and 100, with the exceptions of −10, 0, and 10.

0 1 2 3 4 5

0 0.5 1

E=3

0 1 2 3 4 5

0 0.5 1

E=4.0014−0.0036i

0 1 2 3 4 5

0 0.5 1

E=5

Figure 1: |u(r)|2 for various values of E

(10)

2.1 The Riemann surface

A study of u(r) for large values of r, (r ≥ 2a), where E is a resonance energy, E = ER− iΓ/2 (ER, Γ ∈ R+), leads to a discussion of the nature of the root function in the complex plane. In the situation described above, the wave function has the form

u(r) = A4ei

2(ER−iΓ/2)r

(20) The square root is multivalued, and therefore its definition is somewhat am- biguous. Using the principal branch

E :=p|E|eiθ/2 E = |E|e, θ ∈ [0, 2π)

gives rise to standard problems, continuity at the positive real numbers, for example;

limθ→0p|E|eiθ/2 =p|E| 6= lim

θ→2πp|E|eiθ/2 = −p|E|

The issues that arise when dealing with multivalued functions are resolved by introducing the notion of a Riemann surface, namely by allowing values of θ outside the interval [0, 2π) . In this way, √

E := p|E|eiθ/2 now defines a continuous, single-valued function on the Riemann surface consisting of 2 sheets, which are known as the “physical” sheet; θ ∈ [4πn, 2π + 4πn), n ∈ Z and the “non-physical” sheet; θ ∈ [−2π + 4πn, 4πn), n ∈ Z. Returning to the wave function in (20), this being an outgoing wave gives the requirement that <(√

2E) > 0, allowing the determination of which of the two sheets of the Riemann surface E resides on. If E lies on the physical sheet, then

θ = 2π − arctan(Γ/(2ER)) Which gives

<(ei12(2π−arctan(Γ/(2ER)))

) = cos(π −1

2arctan(Γ/(2ER))) < cos(π −1 2×π

2) < 0 Hence, E must lie on the non-physical sheet, and θ = − arctan(Γ/(2ER)). k3 is then calculated

k3 =√

2E = √ 24

q

ER2 + Γ2/4



cos 1

2arctan(Γ/(2ER))



− i sin 1

2arctan(Γ/(2ER))



(11)

It is now noted that <(k3) is positive and =(k3) is negative. Returning to u(r), r >= 2a

u(r) = A4eir(<(k3)−i|=(k3)| = A4er|=(k3)|+ir<(k3)

The radial density function, |u(r)|2, is then

|u(r)|2 = A4er|=(k3)|+ir<(k3)

A4er|=(k3)|−ir<(k3)

= A24e2r|=(k3)|

As |=(k3)| is positive, this is exponentially divergent, and hence u definitely does not belong to L2.

3 The Complex Absorbing Potential

In an attempt to make the radial density functions L2, the Hamiltonian, ˆH, is now modified somewhat. The new operator is defined by

H(η) := ˆˆ H − iη ˆW (21)

The term −iη ˆW is the Complex Absorbing Potential, (CAP). A demonstra- tion of how the CAP can be used to calculate the resonance energies is now given. We start with a complex vector space of continuous functions whose support is a subset of the interval (0, L). The standard inner product on such a space is used, namely

hu, vi = Z

0

u(r)v(r)dr

To numerically compute the eigenvalues of the operator ˆH(η), a finite or- thonormal basis, {φn}n=1,2,3...N is used. In this finite dimensional vector space, ˆH(η) is represented by a matrix, ˆH(η). The orthonormality of the basis gives the elements of ˆH(η);

H(η)ˆ j,k = h ˆH(η)φk, φji (22) The elements of the chosen basis are defined thus

φn(r) =

(p2/L sin(nπr/L) if 0 ≤ r < L

0 if 2a ≤ r (23)

(12)

Orthonormality follows from various trigonometric identities hφj, φji = 2

L Z L

0

sin2(jπr/L)dr = 1 L

Z L 0

1−cos(2jπr/L)dr = 1− 1

2πj (sin(2πj) − sin(0)) = 1

j, φki = 2 L

Z L 0

sin(jπr/L)sin(kπr/L)dr = 1 L

Z L 0

cos((j − k)πr/L) − cos((j + k)πr/L)dr

=

 1

π(j − k)sin((j − k)πr/L) − 1

(j + k)πsin((j + k)πr/L)

L r=0

= 0 The CAP to be used in this case is defined

W (r) =ˆ

(0 if 0 ≤ r < 2a

(r − 2a)2 if 2a ≤ r (24)

The elements of ˆH(η) are now calculated. (See Appendix B for full details of these calculations)

H(η)ˆ j,k = Z

0

φj(r)



−1 2

d2

dr2 + V (r) − iη ˆW (r)



φk(r)dr (25) The values for the non-diagonal elements are

H(η)ˆ j,k = 2V0

π(k + j)sin π(k + j)a L



− 2V0

π(k − j)sin π(k − j)a L

 + V0

π(k − j)sin 2π(k − j)a L



− V0

π(k + j)sin 2π(k + j)a L

 +

−iη 2L(L − 2a)

π2(k − j)2 (−1)k−j −2L(L − 2a)

π2(k + j)2 (−1)k+j

 +

−iη

 2L2

π3(k − j)3 sin 2π(k − j)a L



− 2L2

π3(k + j)3 sin 2π(k + j)a L



And the diagonal elements H(η)ˆ k,k = π2k2

2L2 + V0

πksin 2πka L



− V0

2πksin 4πka L

 +

−iη (L − 2a)3

3L − L(L − 2a)

2k2 − L2

3k3 sin 4πka L



(13)

−10 0 10 20 30

−6

−4

−2 0

eta = 0

−10 0 10 20 30

−6

−4

−2 0

eta = 0.019

−10 0 10 20 30

−6

−4

−2 0

eta = 0.067

−10 0 10 20 30

−6

−4

−2 0

eta =0.089

Figure 2: Eigenvalues of ˆH(η) for a few values of η with N = 800, L = 16 From these calculations, it is seen that ˆH(η) is symmetric, i.e. ˆH(η)j,k = H(η)ˆ k,j, or to be more precise, a complex symmetric matrix. Section 4 presents some algorithms and the theoretical aspects for calculating the eigen- values. The spectrum of ˆH(η) is computed numerically. Fig. 2 shows the eigenvalues for four different values of η near 0. It appears that as η increases, the eigenvalues that do not correspond to resonance states get shifted, and allows a determination of the resonance energies, which appear to stabilize after η reaches a certain level. The effect of the CAP on the radial density function is clearly seen in Fig. 3; the distortion of the function appears to be small outside the region where the CAP acts, and the CAP “tames” the function where it is active. Table 2 demonstrates that, as might be expected, the eigenvalues of ˆH(η) are not exactly the resonance energies calculated in Table. 1. This leads to the question of how changes in η effect the eigenvalue of ˆH(η) that corresponds to a resonance energy.

(14)

0 1 2 3 4 5 6 7 8 0

0.1 0.2 0.3 0.4 0.5

eta=0

0 1 2 3 4 5 6 7 8

0 0.1 0.2 0.3 0.4 0.5

eta=0.68

Figure 3: |u(r)|2 for E = 13.8 − 1.27i with the CAP “off” and “on”

Resonance eigenvalue of ˆH(η) |EHˆ − ERes| 4.001304829110570 − 0.002992360081990i 6.33557677332 × 10−4 13.803438894696464 − 1.265716781056169i 3.552088203805 × 10−3 20.678765157594302 − 2.064682172871625i 1.649923134428 × 10−3 Table 2: Calculated Eigenvalues of ˆH(η), with N = 800, L = 16, η = 0.089.

These are then compared with the resonance energies ERes calculated in Table 1.

(15)

13.5 14 14.5

−1.6

−1.4

−1.2

−1

−0.8

−0.6

−0.4

−0.2 0

Figure 4: η−Trajectory of EHˆ near the resonance at 13.8 − 1.27i for N = 504, L = 12

The eigenvalues for the third resonance energy (roughly 13.8 − 1.27i), with N = 504, L = 12 are computed for values of η that are increased according to the formula

η = 0.005 ×

1.1n−13 

n = 1, 2, 3....301

The trajectory is plotted in Fig. 4. It appears that the eigenvalue approaches, and stabilizes near, the resonance and then moves away again. Considering E as a differentiable function of η, the resonance energy can be considered as E(0). A series expansion of E(η) can be used to find the value of η that minimizes the distortion to the resonance by the CAP

E(0) = E(η) − ηE0(η) + O(η2) (26)

|ηE0(η)| achieves its minimum near 0.12374 , (see Fig. 6), with the values E(0.12374) ≈ 13.80341 − 1.26484i

0.12374 × E0(0.12374) ≈ −0.00203 + 0.00356i

(16)

10−3 10−2 10−1 100 101 102 13.5

14 14.5

Real part of eigenvalue

10−3 10−2 10−1 100 101 102

−2

−1.5

−1

−0.5 0

Imaginary part of eigenvalue

Figure 5: Real and imaginary parts of E(η) plotted using a logarithmic scale

Applying the first-order correction gives

E(0) ≈ E(0.12374) − 0.12374 × E0(0.12374)

≈ 13.805433610829905 − 1.268404442123181i

The absolute error in this value, compared with the value in Table 1, is 1.32 × 10−3, which is better than the value achieved in Table 2, where a greater basis set is used. This minimization and first-order correction process is completed for a few other resonance energies and collected in Table 3.

This concludes the discussion of the Complex Absorbing Potential method, the full mathematical justification of which is beyond the scope of this report, and is therefore omitted. We now proceed with a presentation and discus- sion of algorithms related to the calculation of eigenvalues for a complex symmetric matrix.

(17)

10−3 10−2 10−1 100 101 102 0

0.2 0.4 0.6 0.8 1 1.2 1.4

Figure 6: |ηE0(η)|

First-order corrected eigenvalue of ˆH(η) η Absolute error 4.001535183266297 − 0.003593251541476i 0.027796 1.22 × 10−4 13.805433610829905 − 1.268404442123181i 0.12374 1.32 × 10−3 20.678182659325380 − 2.065950520961411i 0.18117 1.00 × 10−3 Table 3: First-order corrected Eigenvalues of ˆH(η), with N = 504, L = 12,, and the corresponding optimized value for η.

(18)

4 The Complex Symmetric Eigenvalue Prob- lem

The matrices that arise in the CAP computations are complex symmetric, i.e.

A ∈ Cn×n, A = AT

Unfortunately, in general, complex symmetric matrices are not Hermitian, and are not necessarily non-defective. In the following section it is generally assumed that the CS-matrices that are being studied are fully diagonaliz- able. Since calculating the eigenvalues of a matrix by solving the character- istic equation is numerically unstable and inaccurate for large matrices, other methods are required. Two algorithms are presented; the Complex Symmet- ric QR Algorithm, from section 4 of [1], for calculating the full spectrum and eigenvectors of a CS-matrix, and the Complex Symmetric Jacobi-Davidson Algorithm, for approximating the eigenvalue closest to a given value (as shown in [5]).

4.1 Preliminaries

In light of the the fact that

(Ax)T = xTAT = xTA a change to the standard inner product on Cn, from

hx, yi = yx to the symmetric form

hx, yiT := yTx

permits the use of the structure of complex symmetric matrices in the fol- lowing way;

hAx, yiT = yTAx = (yTA)x = (Ay)Tx = hx, AyiT This, however, occurs at a cost, namely the loss of the norm;

hx, xiT = 0 ; x = 0

(19)

and hx, xiT need not even be real. Despite these deficiencies, the following definitions can still be used; Two vectors, x, and y are said to be orthogonal if

hx, yiT = 0

and a set of vectors {ei} is said to be orthonormal if hej, ekiT = δjk

A simple theorem can now be stated

Theorem 1. The eigenvectors of a complex symmetric matrix that corre- spond to different eigenvalues are orthogonal.

Proof. Let Ax = λ1x and Ay = λ2y, with λ1 6= λ2. Then λ1hx, yiT = hAx, yiT = hx, AyiT = λ2hx, yiT

⇒ (λ1− λ2)hx, yiT = 0 ⇒ hx, yiT = 0

Another definition is useful; a matrix Q ∈ Cn×n is called complex orthog- onal if

QTQ = I

The column vectors, {qi}, of Q form an orthonormal basis of Cn×n, as hqk, qjiT = qTjqk = (QTQ)j,k = δj,k

A similarity transformation of a complex symmetric matrix, A, by a complex orthogonal matrix Q, is defined as

QTAQ

Similarity transformations by complex orthogonal matrices preserve eigen- values as

det(QTAQ−λI) = det(QTAQ−QTλIQ) = det(QT(A−λI)Q) = det(A−λI) and preserve the complex symmetry

(QTAQ)T = QTAT(QT)T = QTAQ

In the QR algorithm, two special types of orthogonal transformations are used, Householder reflections and Givens rotations.

(20)

Householder Reflections

The Householder reflection is defined as

Hx = (I − 2vvT)x

for a given unit vector, v, (hv, viT = 1). The transformation matrix is complex symmetric and orthogonal as

(I − 2vvT)T = I − (2vvT)T = I − 2vvT and

(I − 2vvT)2 = I − 4vvT + 4v(vTv)vT = I

The implementation of the QR algorithm in section 4.2 uses Householder reflections in the following way; given a vector x, find v so that

Hx = ke1

where e1 is the first basis vector in the standard basis (e1 = (1, 0, 0, 0, ...)T).

This gives

k2 = (Hx)THx = xTHTHx = xTx Which allows a choice of k, (k = ±√

xTx), provided xTx 6= 0. Denoting the first element of x as x1 (x1 = xTe1), a solution for v can be found after noting that

(x−ke1)(x−ke1)Tx = (xxT−kxeT1−ke1xT+k2e1eT1)x = (k2−kx1)x+(k2x1−k3)e1 This means that



I − 2(x − ke1)(x − ke1)T 2(k2− kx1)



x = ke1 and v is found

v = x − ke1

p2(k2− kx1) (27)

To make sure that this expression is always defined, if x21 = xTx = k2, then the sign of k is chosen so that k = −x1.

(21)

Givens Rotations

Another type of complex orthogonal matrices are the Givens Rotations, which have the structure of the identity map, apart from four elements.

G(s, c, j, k) =

1 0 . . . 0

0 1 .

. . .

. c s .

. .

. −s c .

. . .

. . .

0 . . . 1

G(s, c, j, k)m,n =













c, if (m, n) = (j, j) c, if (m, n) = (k, k) s, if (m, n) = (j, k)

−s, if (m, n) = (k, j) δmn, otherwise

To make the matrix orthogonal it is required that c2+ s2 = 1. Calculating the product GA is fairly straightforward, all elements of GA are equal to the corresponding elements of A apart from in rows j and k. The elements in these rows are calculated

GAj,i= caj,i+ sak,i, GAk,i= −saj,i+ cak,i (28)

4.2 The QR Algorithm

The implementation of the QR algorithm for a complex symmetric matrix, A, that is presented in appendix A.7 consists of these steps;

Algorithm 1, the QR algorithm.

1. Use similarity transformations to reduce A to tridiagonal form, B1 2. for k = 1, 2, 3...

QR decompose Bk, QR = Bk Bk+1 = RQ

4. Repeat from 2.

(22)

Hessenberg reduction

The first step is known as Hessenberg reduction. An upper Hessenberg matrix is a matrix with only zeroes below the subdiagonal. Likewise, a matrix with only zeroes above the superdiagonal is lower Hessenberg. A tridiagonal matrix is both upper and lower Hessenberg. The reduction to Hessenberg form is done iteratively with Householder reflections. Assuming the rows and columns of A are tridiagonal up to row j, Uj is then chosen to be the matrix

Uj =

 I 0T 0 Hj



(29) with I as the j × j identity matrix, 0 is a j × (n − j) block of zeroes, and Hj is a Householder matrix with x = (aj+1,j, aj+2,j...an,j)T. Equation (27) then gives the required v. The matrix Uj preserves the tridiagonal structure of the top of the matrix, and transforms the jth column vector to (a1,j, a,j...aj+1,j, 0, 0..., 0)T. Due to the symmetry of A and Uj (Uj, be- ing complex symmetric and orthogonal, has the following nice properties;

Uj = UjT, Uj2 = I), the right-multiplication of A with Uj will zero all ele- ments of the jth row that are above the superdiagonal. Uj+1 is then defined from the matrix UjAUj (the vector x used to generate Uj+1 consists of the elements below the diagonal of the j + 1th column vector of UjAUj). A is reduced to symmetric tridiagonal form after n − 2 iterations of this similarity transformation.

B1 = Un−2...U3U2U1AU1U2U3...Un−2 = U−1AU, U = U1U2U3...Un−2 (30) QR decomposition of Bk

We now wish to find a complex orthogonal matrix Q and an upper triangular matrix R so that Bk = QR. For a tridiagonal matrix, this process is done by Givens rotations, iterating along the subdiagonal, finding c and s for G(s, c, j, j + 1) so that the element on the subdiagonal is deleted and then repeating the procedure on the next element on the subdiagonal in the new matrix G(s, c, j, j + 1)Bk. Using (28), the following system has to be solved

(−sbj,j+ cbj+1,j = 0

c2+ s2 = 1 (31)

(23)

This yields

c = bj,j

q

b2j,j + b2j+1,j

, s = bj+1,j

q

b2j,j+ b2j+1,j

The algorithm for QR decomposition via Givens rotations for a tridiagonal matrix can now be stated;

R = Bk, Q = I for j = 1, 2, ...n − 1

R = G(bj+1,j/q

b2j,j+ b2j+1,j, bj,j/q

b2j,j+ b2j+1,j, j, j + 1)R Q = QG(bj+1,j/q

b2j,j+ b2j+1,j, bj,j/q

b2j,j + b2j+1,j, j, j + 1)T end

Which gives

R = Gn−1...G3G2G1Bk and

Q = (Gn−1...G3G2G1)T = GT1GT2GT3...GTn−1

This algorithm is based on the assumption that Bkis tridiagonal. For the algorithm to work repeatedly, it is required that the QR algorithm preserves the tridiagonal structure.

Theorem 2. If Bk is a symmetric tridiagonal matrix, then Bk+1 is as well.

Proof. By calculating the transpose of the decomposition of Bk+1 in terms of Q and Bk, we conclude that Bk+1 is symmetric.

Bk+1T = (RQ)T = (QTBkQ)T = QTBkTQ = QTBkQ = RQ = Bk+1

Now, using symmetry, the structure of Bk+1 is studied in terms of the prod- ucts of the Givens rotation matrices.

Bk+1 = RQ = (RQ)T = QTRT = Gn−1...G3G2G1RT

Since R is upper triangular, RT is lower triangular. Assume now that S = Gk...G3G2G1RT only has zeroes above the superdiagonal in columns 1 to k + 1, and only has zeroes above the diagonal in columns k + 2 to n.

The elements of Gk+1S that are different from those of S are located in rows k + 1 and k + 2. These are calculated from (28)

(Gk+1S)k+1,i = cak+1,i+ sak+2,i, (Gk+1S)k+2,i= −sak+1,i+ cak+2,i

(24)

The elements in rows k+1 and k+2 of Gk+1S that are above the superdiagonal are then zero as, by assumption, ak+1,i = 0 and ak+2,i = 0 for i ≥ k + 3. This means that iteratively multiplying RT with the Gks transforms it into a lower Hessenburg matrix. As this matrix is also symmetric, it must have zeroes below the subdiagonal, and is therefore tridiagonal.

The final theorem required for the use of the QR algorithm is stated without proof,

Theorem 3. If A ∈ Cn×n is complex symmetric, with n eigenvalues with distinct moduli, then as k → ∞, Bk converges to a diagonal matrix, with the eigenvalues of A on the diagonal.

For proof of the formulation of Theorem 3 with regards to unitary decom- position instead of complex orthogonal , see [3] or [4]. It is worth reiterating that this algorithm is not guaranteed to work for all complex symmetric ma- trices, as the the complex symmetric structure does not necessarily imply that the eigenvalues of A have the properties required for Theorem 3 to hold.

Also of note is that breakdowns may occur in this particular implementa- tion, in particular, the fact that hx, xiT = 0 ; x = 0, can be pathological in, for example, the calculations of Hessenberg matrices. This version of the algorithm is, in general, not used for calculating the eigenvalues of matrices with n ≥ 25 as, while accurate, it is not competitive with respect to time.

It is common to use so-called “shifts” to accelerate the convergence of Bk, i.e. compute the QR decomposition of Bk− µI instead of Bk, for some well -chosen µ. This is not used here as there is a desire to preserve approxima- tions of the eigenvectors of A (which are provided by the column vectors of the matrix U Q1Q2....Qk). The column vectors of the Qs generated by the QR decomposition of the shifted matrix do not provide the eigenvectors in the same way. Despite its shortcomings, it is not without justification that this version was used, as is seen in the next section.

4.3 The Jacobi-Davidson method

When calculating the resonance energies, most of the spectrum of ˆH(η) is not of interest. The QR algorithm produces approximations for all eigenvalues of ˆH(η), at great computational cost. Here a method to approximate a single eigenvalue that is closest to a given value , τ , is presented. The idea is to approximate the eigenvalue in a subspace U ⊂ Cn (U is called the

(25)

search space), dim(U )  n, and iteratively add suitable vectors to U to extend the search space until the approximation is good enough, i.e. it fulfils some convergence criterion. These two steps are known as extraction and expansion.

Extraction

Let dim(U ) = k, and U be an n × k matrix whose column vectors form an orthonormal basis (with respect to h·, ·iT). The desire is to, for a complex symmetric matrix A, calculate an approximate eigenpair to τ , (u, φ), u ∈ U , such that the error, or residual, r,

r := Au − φu (32)

is orthogonal to U . Equation (32) is known as the Galerkin, or Ritz-Galerkin, condition. The convergence criterion is based on the norm of r with regard to the standard inner product (krk = √

rr), i.e. the process terminates when krk < . The orthogonality condition can be written as

UTr = 0 ⇔ UT(A − φI)u = 0

Letting u = U c, c ∈ Ck, this is reduced to the k-dimensional eigenproblem

UTAU c = φc (33)

and the pair (c, φ) with φ selected from the spectrum of UTAU so that |τ −φ|

is minimized. Here it is worth noting that UTAU is a complex symmetric matrix. The approximate eigenpair (U c, φ) is known as a “Ritz pair”. To be able to check the convergence criterion, this is normalized, u = U c/cTc.

Now the so-called Rayleigh quotient for a complex symmetric matrix A, and a vector v, is introduced. It is defined as

R(A, v) := vTAv

vTv (34)

For an eigenvector, ai of A, the Rayleigh quotient returns the eigenvalue λi corresponding to A. Using r ⊥ U ⇒ hu, riT = 0, it is now seen that φ = R(A, u).

R(A, u) = uTAu

uTu = uT(φu + r)

uTu = φ (35)

This shall be used later on when discussing convergence of the algorithm.

(26)

Expansion

Let λ be the eigenvalue of A that is closest to τ . Now, given an approximate eigenpair (u, φ), hu, uiT = 1, and assuming the convergence criterion is not met, a suitable vector is to be chosen to expand the search space. The Jacobi-Davidson method is to find a vector s, so that

A(u + s) = λ(u + s) (36)

and also hs, uiT = 0. Equation (36) is rewritten as

(A − λI)s = (λI − A)u (37)

As λ is unknown at this stage, this cannot be solved completely. Instead, λ is approximated with R(A, u), and solved in the subspace uT. The projector I −uuT is used. Applying the projector to the right hand side of the equation gives

(I − uuT)(λI − A)u = −Au + u(uTAu) = −(Au − φu) = −r (38) The condition hs, ui = 0 can be formulated as

(I − uuT)s = s (39)

Equation 37 now reads

(I − uuT)(A − R(A, u)I)(I − uuT)s = −r (40) Equation 40 is called the Jacobi-Davidson correction equation. The system is solved for s, which is then added to the search space, and the process is repeated. The algorithm can now be formulated

Algorithm 2, the Jacobi Davidson algorithm.

1. Given τ and , choose an initial vector, b. Let s = b 2. for k=1,2,....

3. Use the complex orthogonal Gram-Schmidt method on {e1, e2, ..., ek−1, s}, with {ei} being the column vectors of Uk−1

4. Let the columns of Uk consist of the vectors produced in step 3.

5. Find the eigenpair (c, φ) of UkTAU that minimizes |τ − φ|

6. Calculate u = Ukc/(Ukc)T(Ukc)

7. r is calculated with regard to the standard norm of u , r = (A−φI)ukuk 8. if krk < , stop.

9. Solve (I − uuT)(A − φI)(I − uuT)s = −r for s.

10. Repeat from 2.

(27)

The complex symmetric QR algorithm is used in step 5 to provide the Ritz pair, (c, φ). In the implementation of the algorithm in the appendix (section A.8), a variation of the algorithm is used that prevents the dimension of U growing too large. This is done by inserting a new step, 8b. This is a restart, replacing U with u, and resetting k. In this way the use of the implementation of the QR algorithm presented in section 4.2 is justifiable, as the combination of the fact that accurate approximations of both the eigenvalue and eigenvector are required, and that the algorithm works well for matrices of the size that it deals with in the JD algorithm.

8b. if k > 25, then Uk = u, k = 1

Convergence of the Jacobi-Davidson method

Motivation of the convergence of Jacobi-Davidson algorithm is based on the convergence of another algorithm, the Rayleigh Quotient Iteration. This method requires an initial guess of an eigenpair (u1, φ1), and new approxi- mations are created iteratively

φk+1 = R(A, uk), uˆk+1 = (A − φkI)−1uk, uk+1 = uˆk+1

phˆuk+1, ˆuk+1iT

(41) The method breaks down if (A − φkI) becomes singular, in which case the eigenvalue has been found, or if hˆuk+1, ˆuk+1iT = 0, in which case the RQI must be restarted with a different initial vector. The following theorem concerns the local convergence of the RQI

Theorem 4. Assume uk→ x, as k → ∞, Ax = λx. Then

i) uk can be written as uk = αk(x + δkdk), hx, dkiT = 0, hdk, dkiT = 1.

ii) φk → λ.

iii) The local convergence of uk to x is cubic, that is

δk+1 = O(δ3k) (42)

Sketch of Proof, as presented in [5]

i) To start with, it is noted that

uk = xxTuk+ (I − xxT)uk

(28)

and that hx, (I − xxT)uiT = 0. The choices for the variables appear after normalization

αk= xTuk, dk = (I − xxT)uk

puTk(I − xxT)uk, δk = puTk(I − xxT)uk xTuk

ii) Using the Rayleigh Quotient, and noting that as uk → x, δk → 0, the convergence of φk can now be proved

φk= ukAuk = α2k(xT + δkdTk)(λx + δkAdk)

= α2k(λ + δk2dTkAdk) = 1

1 + δk2(λ + δk2dTkAdk) (43) For the third equality of (43) to hold it is essential that A is complex sym- metric, so as to guarantee that xTAd = 0. Equation (43) is now rewritten

λ − φk = 1

1 + δ2k((1 + δk2)λ − (λ + δk2dTkAdk)) = δk2

1 + δ2kdTk(λI − A)dk (44) Using series expansion of 1+δδ2k2

k

, and assuming an upper bound for

|dTk(λI − A)dk| gives

|λ − φk| = |δk2dTk(λI − A)dk| + O(δ4k) = O(δk2) (45) This proves the convergence of φk. The final part of the proof requires the calculation of uk+1 in terms of uk. To start with

(λ − φk)uk = αk((A − φkI)x + δk(λ − φk)dk) (46) Then

uk+1 = s(A − φkI)−1uk = sαk λ − φk

(x + δk(λ − φk)(A − φI)−1dk) (47) The term s is normalizing, ensuring that huk+1, uk+1iT = 1. The complex symmetry of A is again used, ensuring that (A − φkI)−1 is also symmetric.

This is then used to conclude that

hx, (A − φkI)−1dkiT = hdk, (A − φkI)−1xiT = 1 λ − φk

hx, dkiT = 0 (48)

(29)

Since the requirement hx, dk+1iT = 0 is met for dk+1 = γ(A − φkI)−1dk, γ being a normalizing factor, it can now be concluded that αk+1 = λk

k−φ, and hence

uk+1 = αk+1(x + δk(λ − φk)(A − φkI)−1dk) (49) This gives the relation between δk+1dk+1 and δkdk

δk+1dk+1 = δk(λ − φk)(A − φkI)−1dk

Assuming dTk(A − φkI)−2dk is bounded, (45) provides the required order, δk+1 = 1

γδk(λ − φk) = O(δ3k), γ = 1

pdTk(A − φkI)−2dk

(50)

Returning now to the Jacobi-Davidson method, (40) provides the link between the two methods, supposing k iterations of the JD algorithm have been performed, (40) reads

(I − ukuTk)(A − φkI)(I − ukuTk)s = (A − φkI)uk (51) The explicit solution to this equation is s = −uk+ β(A − φkI)−1uk,

β = u 1

k(A−φkI)−1uk, as

(I − ukuTk)(−uk+ β(A − φkI)−1uk)

= β(A − φkI)−1uk− ukuTk(β(A − φkI)−1uk)

= β(A − φkI)−1uk− uk And

(A − φkI)(β(A − φkI)−1uk− uk) = βuk− (A − φkI)uk Finally

(I − ukuTk)(βuk− (A − φkI)uk)

= β(uk− ukuTkuk) − ((A − φkI)uk− ukuTk(A − φkI)uk)

= −r + ukuTkr = −r + huk, riTuk = −r

When s is added to U , the vector −uk+ β(A − φkI)−1uk extends the search space. Since uk ∈ U , this is equivalent to extending the space with just

(30)

the vector (A − φkI)−1uk. This is the next vector in the Rayleigh Quo- tient Iteration, so the Jacobi-Davidson algorithm can be seen as a version of the RQI, where the previous iterations are stored. Since RQI converges, JD will also converge. By creating the search space, the algorithm can cre- ate a next estimate that is more accurate than just (A − φkI)−1uk. This is called subspace acceleration. Another advantage the JD method has over RQI, is that as φk approaches λ, (A − λI) gets closer to being singular. This causes problems when solving the RQI equation, (A − λI)uk+1 = uk, nu- merically as the matrix becomes ill-conditioned, which can give inaccurate results. This can cause convergence problems with RQI, but is not neces- sarily a critical problem to JD, as the previous iterations have been saved, and can preserve the accuracy of the estimate. It is also worth noting that there are variations of the algorithm to improve convergence when calculat- ing interior eigenvalues, two alternatives are presented in [5]; Harmonic Ritz vectors and Refined Ritz vectors. The algorithm in appendix A.8, while still not competitive compared with Matlab’s inbuilt function eigs, still appears to function as desired, it succeeded at calculating the first resonance energies for the CAP in the rather extreme case n = 2000, L = 32, η = 0.011. Other methods of improving the performance of the algorithm include finding an approximate solution to (40), as solving this system exactly is one of the more computationally demanding aspects of the algorithm This is called the inexact Jacobi-Davidson algorithm. A full discussion of the Jacobi-Davidson algorithm, its adaptation to the complex symmetric case, and its variants is presented in [5] and [6].

Acknowledgements

I thank Michael Melgaard for providing the topic of the project, as well as for his supervision and assistance with the realization of it.

(31)

A Matlab code

A.1 An implementation of Newton’s method to calcu- late the resonance energies

1 V=10;

2 a=1;

3 E= %See Table 1 for the used initial values of E.

4 for(n =1:100)

5 k1=sqrt(2*(E+V));

6 k2=sqrt(2*(E−V));

7 k3=sqrt(2*E);

8 T1 = k2*k3*sin(k1*a)*cos(k2*a);

9 T2 = k1*k3*sin(k2*a)*cos(k1*a);

10 T3 = 1i*k1*k2*cos(k1*a)*cos(k2*a);

11 T4 = −1i*(k2ˆ2)*sin(k1*a)*sin(k2*a);

12 dk1= 1/k1;

13 dk2= 1/k2;

14 dk3= 1/k3;

15 dT1 = dk2*k3*sin(k1*a)*cos(k2*a)+...

16 dk3*k2*sin(k1*a)*cos(k2*a)+...

17 k2*k3*cos(k1*a)*cos(k2*a)*a*dk1+...

18 k2*k3*sin(k1*a)*−sin(k2*a)*a*dk2;

19 dT2 = dk1*k3*sin(k2*a)*cos(k1*a)+...

20 dk3*k1*sin(k2*a)*cos(k1*a)+...

21 k1*k3*cos(k2*a)*a*dk2*cos(k1*a)+...

22 k1*k3*sin(k2*a)*−sin(k1*a)*a*dk1;

23 dT3 = 1i*dk1*k2*cos(k1*a)*cos(k2*a)+...

24 1i*k1*dk2*cos(k1*a)*cos(k2*a)+...

25 1i*k1*k2*−sin(k1*a)*a*dk1*cos(k2*a)+...

26 1i*k1*k2*cos(k1*a)*−sin(k2*a)*a*dk2;

27 dT4 = −1i*2*dk2*sin(k1*a)*sin(k2*a)+...

28 −1i*(k2ˆ2)*cos(k1*a)*a*dk1*sin(k2*a)+...

29 −1i*(k2ˆ2)*sin(k1*a)*cos(k2*a)*a*dk2;

30 E = E−(T1+T2+T3+T4)/(dT1+dT2+dT3+dT4)

31 end

32 E

References

Related documents

46 Konkreta exempel skulle kunna vara främjandeinsatser för affärsänglar/affärsängelnätverk, skapa arenor där aktörer från utbuds- och efterfrågesidan kan mötas eller

The increasing availability of data and attention to services has increased the understanding of the contribution of services to innovation and productivity in

Motivated by a problem in climate dynamics, we investigate the solution of a Bessel- like process with a negative constant drift, described by a Fokker-Planck equation with a

In fact for any finite group there is only a finite number of irreducible modules up to isomorphism. For S n , the Specht modules form a complete list of these, however we refer

4 The latter motive is the predominant one in Sweden and other Nordic countries, where high excise taxes on alcohol have been a rather successful tool to keep alcohol consumption,

economic growth. There are some issues with these hypotheses because the effect does not seem to more than the first but it the effect is not particularly

The present study aims to analyze what happens to cultural values such as dialect and degree of politeness in the transition from Japanese to English in manga translation.. For this

Clients.. 72) In order to be able to help the client and provide the correct services the complex service company and its co-workers has to provide the client with knowledge