&54$D6)E C&$i16xCg' a&& yU8$6 3PqFC6Xw`“R r6164 T"%$v)&Cg4 1RW xg166)WF vV68%tx5410C"x&4 T&6`' „$C854SE X67C&16T"E zA8qFx6R C&V638TgT41'rg8Ca4& 705430v61pPf63DaF4
EI 0 4£¨„`V6A8aFa4x%6f)4iFq``616x&r541Ej16 )WcFs)8`6m61C"S4i10T"˜`036 $ W6 4 4
F16s)8"C`6#@T"m4 )R4 #gIF$ #)8%6HEA$XC9f %63x˜16Egf3 &T e69g s—%8%$0 3EW˜)"16'`T"r6d)R… i$(i4FT8 e6Si90 j5407 673E&s%810%B10C2)#67C6T&3“1670”4" ˜§ Fr`tb‘E&4 i `F `6$Pm54$ HW`0$PA'54F}H8%6i$T"6f 1 3Ej`04 1jAE' T&™160 r&54g — )E%$S)"E6 3 )`'6 1Wr664
4S 0& ( gz
FW3s0 )8$i`6`'im%6‘EC2FijE& )816PITBi616R#)EH16)8v“wi&IB"16 1067&sj%8" 101"C2' %$q`@S…6I „$wC8185467S}40 6%y1&AEi0`0e`h16)W' … gYT8„$i9i410SB0 pq10i4 d`eTI4P6S)'Y„0 5&rFR HEe„#C$ eC6154pdPfgE ¥ 36yC t r&& $v)E54… $„SC86 54)S1W0 6 6
S 0f
"& "0 v
¢£
W3760 &sP$%8H4%810C2Y!¥1RbC&F`t i&`6Y'E i$FT8•$4i4iSmC00 $PT4¨V6)8¦ H©r'@P& ‘$!1V%8AE300 1%63E9s70%8a40dW& wwe)8rFx544 6r 1A2`0106 1"G'W W 3Wi&`0‘g' F %$%$32TBrV6%8dq‘Ei&24 61F C"$P‚10454 l¡`©‘—$gHE 3W%60HfP$„$54)81E7'T&q68163p6 wo @hn&$ ¥
0 &$ ¦
¡
§ §¡ ¥
¡ ¥ ¥
¦¥¤£¢¡
u¥ ”n
u ¡
£ ¤ ¥ £ §¢£¡§
13 43 15
41 40 42 45
9 18 10 23 11 27 12 31 14 44 16
19 17 21 22 25 26 29 30 33
1 20 2 24 3 28 4 32 6 39 8
34 35 37 38
5 36 7
„
T © ¥ ¢ D
¡ A ¬nite element grid model.
Essentially, there are two broad types of sparse matrices: structured and unstructured.
A structured matrix is one whose nonzero entries form a regular pattern, often along a
small number of diagonals. Alternatively, the nonzero elements may lie in blocks (dense
submatrices) of the same size, which form a regular pattern, typically along a small num
ber of (block) diagonals. A matrix with irregularly located entries is said to be irregularly
structured. The best example of a regularly structured matrix is a matrix that consists of
only a few diagonals. Finite difference matrices on rectangular grids, such as the ones seen
in the previous chapter, are typical examples of matrices with regular structure. Most ¬
nite element or ¬nite volume techniques applied to complex geometries lead to irregularly
structured matrices. Figure 3.2 shows a small irregularly structured sparse matrix associ
ated with the ¬nite element grid problem shown in Figure 3.1.
The distinction between the two types of matrices may not noticeably affect direct
solution techniques, and it has not received much attention in the past. However, this dis
tinction can be important for iterative solution methods. In these methods, one of the es
sential operations is matrixbyvector products. The performance of these operations can
differ signi¬cantly on high performance computers, depending on whether they are regu
larly structured or not. For example, on vector computers, storing the matrix by diagonals
is ideal, but the more general schemes may suffer because they require indirect addressing.
The next section discusses graph representations of sparse matrices. This is followed
by an overview of some of the storage schemes used for sparse matrices and an explanation
of how some of the simplest operations with sparse matrices can be performed. Then sparse
linear system solution methods will be covered. Finally, Section 3.7 discusses test matrices.
ud
¡ ¤§ ¥ §¢
¡
¡© © ¢ ¡ ¥ ¥ © ¡ ¥
§
¥ ¡¢ T ©
D
Sparse matrix associated with the ¬nite element
grid of Figure 3.1.
$§ ©$§§# ) ¤( ""') §
£ §(
U&

Graph theory is an ideal tool for representing the structure of sparse matrices and for this
reason it plays a major role in sparse matrix techniques. For example, graph theory is the
key ingredient used in unraveling parallelism in sparse Gaussian elimination or in precon
ditioning techniques. In the following section, graphs are discussed in general terms and
then their applications to ¬nite element or ¬nite difference matrices are discussed.
¤ ¦ ¦
¦¥¤¥
¡ A¡ %¥' #(
§ #$ I¨ ' G' #G'
C© ©
§( ' %
Remember that a graph is de¬ned by two sets, a set of vertices
‘ )11) 6 0 ¨
!
… C … B ¨
and a set of edges which consists of pairs , where are elements of , i.e.,
¢
¨ ¨¡¢
¨B
This graph is often represented by a set of points in the plane linked by
¢
$
C
a directed line between the points that are connected by an edge. A graph is a way of
¨ ¨
representing a binary relation between objects of a set . For example, can represent
the major cities of the world. A line is drawn between any two cities that are linked by
a nonstop airline connection. Such a graph will represent the relation “there is a nonstop
¬‚ight from city (A) to city (B).” In this particular example, the binary relation is likely to
¡
”
u
¢ ¤ ¥ £ ¤§ ¥ © ¨¢¤¨¡ ¡ ¥ ¡ ¨
©¡ ©
§¥
be symmetric, i.e., when there is a nonstop ¬‚ight from (A) to (B) there is also a nonstop
¬‚ight from (B) to (A). In such situations, the graph is said to be undirected, as opposed to
a general graph which is directed.