¨£ ¤

!

¢ ©£ ¥ q

¢

®s„D¬BB% H H

%¬ ¬

1. For Do:

¨™„¬D¬BB%

%¬

2. For Do:

G £ S £ G S £

3.

s®%„D¬BB% G w m¥

¬¬

4. For Do:

§ S £ ¨ S £ S £

5. £

6. EndDo

7. EndDo

8. EndDo

The above algorithm is in place meaning that the -th row of can be overwritten by

¦

the -th rows of the and matrices of the factorization (since is unit lower triangular,

its diagonal entries need not be stored). Each step of the algorithm generates the -th row

p¥¶

¶¤ 8˜ H ˜ ¤ ¨°¡ $ H&’ ”8 ” &’ ¤ ©¦§

©8 $ $

¡¨ ¨¦ ¤

© §¥ c#&) $

©1

¢

¡

¦ ¦

ª% BDB% H % G

¨ ¬¬¬

of and the -th row of at the same time. The previous rows of and

G

are accessed at step but they are not modi¬ed. This is illustrated in Figure 10.1.

Accessed but not

modified

Accessed and

modified

Not accessed

§5)0d ¥ ¤¥£ ¢

¢§ ¡

IKJvariant of the LU factorization.

¦

Adapting this version for sparse matrices is easy because the rows of and are

generated in succession. These rows can be computed one at a time and accumulated in a

row-oriented data structure such as the CSR format. This constitutes an important advan-

tage. Based on this, the general ILU factorization takes the following form.

¦! 0

“™x• § ¢ v£ © £ ¨ % £ " ¨ £ %

•

¤ D0 © 0 ¢ "0§ wE¤©n¦§¥£¢

¢ ¡ ¨¦ ¤¢

%! ! © £

®„¬BD¬B% H ª

%¬

1. For Do:

¦ ¡ % 7` ¨i „¬BD¬B%

%¬

2. For and if Do:

a

G £ S £ GS £

3. w ¦

®%„¬BD¬B% ©m¥

¬

4. For and for , Do:

a ¥ 0 `

%

£ S £ ¨ G S £ S £

5. .

6. EndDo

7. EndDo

8. EndDo

It is not dif¬cult to see that this more practical IKJvariant of ILU is equivalent to the

KIJversion which can be de¬ned from Algorithm 10.1.

‚£

¦ ¦¦ ¨£h¤¨ £¤¦ n¦

£

¥ 5"0§

§ ¢

Let be a zero pattern satisfying the condition (10.11). Then

the ILU factors produced by the KIJ-based Algorithm 10.1 and the IKJ-based Algorithm

10.3 are identical if they can both be computed.

§©¨¥¦£

§

Algorithm (10.3) is obtained from Algorithm 10.1 by switching the order of the

loops and . To see that this gives indeed the same result, reformulate the ¬rst two loops

of Algorithm 10.1 as

¶

’ ”8 ” &’ ¤ ¦§ ’ ”p¡ &ª8 ¤ ¥ c

$ © $ 8¥ ’ ¡¥

¤

1 ¡¡© &

$

¢

¡

s®% G

For Do:

®s% G ª

For Do:

¦

u

²

if and for Do:

£aY 0 `

%

ope(row(i),row(k))

B¬BDBD¬

¬ ¬¬¬

in which ope(row(i),row(k)) is the operation represented by lines 3 through 6 of both

Algorithm 10.1 and Algorithm 10.3. In this form, it is clear that the and loops can be

safely permuted. Then the resulting algorithm can be reformulated to yield exactly Algo-

rithm 10.3.

Note that this is only true for a static pattern ILU. If the pattern is dynamically determined