Civil Engineering Reference
In-Depth Information
Table 3.7 Summary of assembly subroutines
Subroutine
Banding/symmetry/
Storage
Diagonals
triangle?
Yes/yes/lower
kdiag “skyline”
fsparv
kv(1:kdiag(neq))
1 st col.
Yes/yes/upper
formku
ku(neq,nband+1))
nband+1 th col.
Yes/yes/lower
formkb
kb(neq,nband+1))
pb(neq,2(nband+1)-1) nband+1 th col.
Yes/no/both
formtb
nband+1
=
nband+1
=
4
4
0 0 0 x x x x 0 0
x x x x 0 0
0 0 x x x 0 0 0
x x x 0 0 0
0 x x x 0 x 0
x x x 0 x 0
neq=6
x 0 0 x x x
x 0 0 x x x 0
0 0 x x x x
0 0 x x x x 0 0
0 0 0 x x x
0 0 0 x x x 0 0 0
Symmetric matrix. Lower triangle
stored as a rectangle.
Assembly routine: formkb
Diagonals in nband+1th column.
Symmetric matrix. Upper triangle
stored as a rectangle.
Assembly routine: formku
Diagonals in 1st column.
2*(nband+1)-1
= 7
x x x x 0 0
0 0 0 x x x x 0 0
x x x 0 0 0
0 0 x x x 0 0 0
x x x 0 x 0
=
neq
6
0 x x x 0 x 0
x 0 0 x x x
x 0 0 x x x 0
0 0 x x x x
0 0 x x x x 0 0
0 0 0 x x x
0 0 0 x x x 0 0 0
Symmetric matrix. Lower triangle
stored as a skyline vector.
Assembly routine: fsparv
Diagonal locations stored in
kdiag=[1 3 6 10 13 16] T
Non-symmetric matrix. Full band
stored as a rectangle.
Assembly routine: formtb
Diagonals in nband+1th column.
Figure 3.18 Examples of storage strategies and assembly subroutines for symmetric and
non-symmetric banded arrays ( neq=6 , nband=3 )
 
Search WWH ::




Custom Search