Sei sulla pagina 1di 14

Computers & Swuctures, Vol. I, pp. 651-664. Fe3gamon Rem 1971.

Printedin GreatBritain

THE EIGENVALUE PROBLEM FOR BANDED MATRICES

WILLIAM WEAVER, JR.

Department of Civil Engineering, Stanford University, Stanford, California, U.S.A.


and
DAVID M. YOSHIDA
Accident Analysis Associates, Palo Alto, California, U.S.A.

Abstract-The generalized Lancws method is used for the purpose of calculatingfrequenciesand mode
shapesfor linearly elastic discretizedstructures where the energy-consistentstiffnessand mass matrices are
equally banded. This approach involves reduction of the problem to standard tridiagonal form without
expandingthe band width of either of the original arrays. Applicationsof the method to both vibrational
and bucklinganalysesindicateits potential for conserving core storage when solving the eigenvalue problem
on a digital computer.

INTRODUCTION
DYNAMIC analysis of discretized continua by digital computer frequently involves the use
of energy-consistent stiffness and mass matrices that are identically banded. If a structure
is linearly elastic and the displacements are small, it may be analyzed by the normal-mode
method, which requires the solution of the associated eigenvalue problem. In such a case
the generalized Lanczos method is useful for solving the eigenvalue problem in nonstandard
form with two coefficient matrices that are real, symmetric, and equally banded. This
approach takes advantage of the band widths of both matrices and thereby saves computer
storage, whereas conversion to standard form would fill one or the other of the two matrices.
Matrix operations are developed for transforming one of the matrices to a symmetric,
tridiagonal form, while the other is transformed to the identity matrix. For this purpose,
at least one of the original arrays must be positive-definite. From the tridiagonal form,
the eigenvalues and eigenvectors of the system are evaluated by the well-known Q-R
algorithm. Subroutines in FORTRAN IV(H) are presented for the reduction to tridiagonal
form.
Sample applications include vibrational analyses of beams and rectangular plates
composed of finite elements with energy-consistent stiffness and mass matrices. In addition,
the method is applied to plate buckling, where the eigenvalue problem involves a banded
initial-stress matrix together with a banded stiffness matrix.

GENERALIZED LANCZOS METHOD


In the generalized Lanczos method [l] the form of the eigenvalue problem is assumed
to be:
Ax=ABx (1)
651
652 WILLIAM
WEAVER,
JR. and DAVIDM. YOSHIDA

in which A and B are real, symmetric matrices, and B is positive-definite. The column
vector x represents an eigenvector, and I is the corresponding eigenvalue.
The method is based upon the assumption that a transformation matrix R, by no
means unique, can be found such that the following congruence transformations on A and
B yield:
R’AR = T (2)
and
R’BR=I (3)

where T is a symmetric tridiagonal matrix, I is the identity matrix, and the prime denotes
transposition. Equation (3) states that the matrix R is orthogonal with respect to B.
The relations in equations (2) and (3) are used to transform equation (1) into the
following form :
Ty=Ay (4)

where the vectors x and y are related through the transformation matrix by:

x=Ry (5)

Premultiplication of equations (2) and (3) by (R’)-’ and combining gives:

AR=BRT (6)

Let the vectors of R be defined as:

R=[r, rz . . . r,] (7)

and the elements of the tridiagonal matrix T as:


-

T= (8)

Substitution of equations (7) and (8) into equation (6) gives an expression, from which A
times the i-th vector of R is .recogniied to be :

(9)

An expression for the diagonal element ai is obtained by premultiplication of equation


(9) with r:. The result is:
ai = r;Ari (10)
The Eigenvalue Problem for Banded Matn’ces 653

because the vectors of R are orthogonal with respect to B. At this stage dlfcan be computed
if ri is known. The process is initiated by taking the first vector rr as:

Expressions for pi and the vector ri+r are needed to complete the algorithm. Re-
arrangement of terms in equation (9) gives:

#%J%+,=vi (12)
where,
Vi=AIi-B*_1BrI-i-atBri, 03)

If /IO is taken to be zero, then vi becomes a known vector for every step, because all of
the terms in equation (13) are defined. Since B is positive-definite, it can be factored into
the product of lower- and up~r-t~angul~ matrices as follows:

B=U’U (14)

Substitution of equation (14) into equation (12) gives :

(19

If zi is defined as:

(16)

then equations (15) and (16) give a solution for zI trough a foxed-emanation process
represented by :
U’Zi= Vi (17)

For the purpose of computing &, consider the result of the inner product of Zi with its
transpose

Division of equation (16) by pi yields an expression from which ri+I may be obtained
through a backward-substitution process. That is,

Ub+, =fq
1
cm
The process is repeated until all of the elements of T and the vectors of R are computed.
Then the eigenvalues and eigenvectors of the problem are evaluated by the well-known
Q-R algorithm.
654 WILLIAMWEAVER,JR. and DAVIDM. YOSHIDA

It should be noted that the algorithm described above fails whenever /J=O (see
equation 20). In such a case the vector ri+ 1 is arbitrarily set equal to:

riil=(O,O,. .., IIJBi,, ~.. ,0)


Furthermore, the orthogonality of the vectors in R tends to deteriorate with each step [2];
so these vectors should be reorthogonalized with respect to I3 after each new evaluation.

For the purpose of implementing the generalized Lanczos method, five computer sub-
programs are presented, the first of which utilizes the other four for subsidiary tasks. Line
prints of these subprograms appear in the Appendix as subroutines in FORTRAN IV(H).
(1) DBSOL-This subprogram reduces the nonstandard form of the eigenvalue
problem, as given by equation (I), to the tridiagonal form of equation (4). The
upper-band portions of the coefficient matrices A and B are stored in the computer
as if they were rectangular arrays, as indicated in Figs. la and lb (where UBW
denotes the upper band width and N is the size of the matrix). The main- and
sub-diagonal elements of the tridiagonal matrix T are stored as singly-subscripted
variables ALPH{ ) and BETA( ).

(4)

FIG. la. Upper band of symmetric matrix.


FIO. lb. Storage as a rectangular array.

(2) BDCOMP-This subprogram decomposes a banded, positive-definite, symmetric


matrix by the Cholesky square-root method [3]. The upper-band portion of the
matrix must be stored as a rectangular array. Its purpose is to factor the matrix
B, as indicated by equation (14).
(3) BSOLZ-This subprogram solves a set of linear algebraic equations for which the
coefficient matrix is a lower-triangular banded array. The purpose of this sub-
routine is to solve the simultaneous equations represented by equation (17). How-
ever, the elements of U obtained from Subprogram BDCOMP are utilized in place
of those for the transposed matrix U’.
The EigenvalueProblem for Banded Matrices 655

(4) BSOL2-This subprogram solves a set of linear algebraic equations for which the
coefficient matrix is an upper-triangular banded array stored in rectangular form.
In this case the simultaneous equations represented by equation (20)are solved,
after the elements of zI have been divided by pi.
(5) BMULT-This subprogram multiplies a banded, symmetric matrix by a vector.
As in the other routines, the upper-band portion of the matrix must be stored as
a rectangular array. Subprogram DBSOL utilizes this multiplication routine
repeatedly for the operations in equation (13) and for the process or reortho-
gonalization of the vectors of R with respect to B.

SAMPLE APPLICATIONS
Beam vibrations
Figure 2 shows a prismatic beam element of length I and the four types of nodal dis-
placements DI, . . . . D, pertaining to the element. Shape functions assumed for these
four types of nodal displacements are the following cubic polynomials:

G,(x)=] -3x2
-jr+‘$
2x2 x3
G2(x)=x--+-
1 I2
(21)

Fm. 2. Beam element.

The generic displacement O(X)of the beam element may be expressed in terms of the shape
functions G(X) and the nodal displacements D by use of the principle of superposition,
which results in:

D2

V(d=G’(x)D=i?%(~), G,(x), G3W, G&)] (22)


D3
656 WILLIAMWEAVER,JR. and DAVD M. YOSHIDA

The element stiffness matrix for the beam, in terms of the second derivatives of the
beam shape functions, is given by:

S = EI ’ G,,(x)G:,(x)dx
0
(23)
s

in which E is Young’s modulus and I is the moment of inertia of the cross-section.


The energy-consistent mass matrix of the beam element has been shown by Archer [4]
to be:

M=,uA ’ G(x)G’(x)dx (24)


I 0

in which p is the mass density of the beam and A denotes its cross-sectional area.
When the element stiffness and mass matrices are assembled into the over-all stiffness
and mass matrices for the structure, the resulting arrays have equal band widths. The
eigenvalue problem for vibration analysis takes the nonstandard form of equation (I),
and one of the arrays must be positive-definite in order to apply the method of this paper.
If the mass matrix is chosen to correspond to matrix A in equation (1) and the stiffness
matrix corresponds to matrix B, the eigenvalues of the problem will correspond to the
reciprocals of the squares of the angular frequencies. Thus, the form of the vibration
problem becomes :

MNDNi=‘S,D,i (25)
wf

in which Oi and DNi represent the i-th angular frequency and the corresponding mode
shape, while MN and SN denote the mass and stiffness matrices for all nodal degrees of
freedom.
Figure 3 shows a simply-supported prismatic beam modeled by four finite elements.
In this example the upper band width UBW of the stiffness and mass matrices is 4, while
the possible number of degrees of freedom N is 10 (although two are actually restrained).
Natural frequencies and mode shapes for this analytical model were obtained by the method
described herein, using the following physical properties :
A =0*0625 in.’ (cross-section l/4 in. x l/4 in.)
I= 3.255 x 10m4 in.4 I=1 in.
E = 30 x lo6 psi. p = O@Ol lb-sec2/in.4
Several of the angular frequencies calculated in this manner are listed in Table 1. Also
shown in the Table are frequencies given by Archer [4] as well as exact values [5].

FIG. 3. Beam example.


The Eigenvalue Problem for Banded Matrices 651

TABLE1. Angular frequencies (rad/sec) for beam example

Mode 4-Element model Archer [4] Exact [5]

1 7.712 x 103 7.713 x 103 7.711 x 103

2 3.096 x 104 3*096x104 3.084 x 104

3 7.066 x 104 7.067 x 104 6.940 x 104

4 1 a369x 10s 1.369 x 10s 1.234 x 10s

Plate vibrations
The plate-bending element applied in this study is shown in Fig. 4, together with the
nodal displacements D,, . . . , D,, and a local coordinate system. The displacements D,,
D,, D12, and D,, are ‘twists’ at the nodes and cannot be represented by the usual vectors.
Compatible shape functions for this rectangular plate element were derived by Bogner,
et al. [6]. They are closely related to the beam shape functions and can be represented by
products of such functions as follows:

G&G y)=fiW~Q Gk ~)=fi(&i(~)


G&G y)= --s&WAY) G&G Y>= -~i(x>~k9
G&, Y)=_WVI(Y) G&G y)=fiWM9
GA Y>= -&MY) G&G Y)= -&181(Y)
G,(x, Y)=.MMXY~ G&J Y>=.M&zO (26)
G I& Y>= -gzWXy) ‘%A~, Y)= -gz(xlBzO
G& Y)=.MG.MY) G Ax, Y)=.IW&~
GI & Y)= -~MLO GI Ax, Y)= -gi(xMyI

FK3.4. Plate element.


658 WILLIAMWEAVER,JR. and DAVID M. YOSHIDA

The first terms in the product functions in equations (26) are the beam shape functions
shown in equations (21) related by : fi(x) = G,(x), fi(x) = G3(x), g,(x) = G,(x), and g2(x)
=G4(x), in which the length I is replaced by a, the x-dimension of the plate. The second
terms in the product functions are obtained from the beam shape functions in a similar
manner, using h in place of 1. The minus sign appearing in half of the expressions is due
to the difference in the sign conventions for the slope term ~1~and the associated nodal
displacements D3, D,, Dll, and D,,. Furthermore, the twist curvature ~3,~ and its
associated nodal displacements D4, D,, Dll, and D,, also differ in sign. The generic
displacement w(x, y) of the plate element in terms of these displacement functions is:

+, Y)= G(x, Y)D (27)

The stiffness matrix for the plate-bending element involves second partial derivatives
of the shape functions as follows:
b a
S=R (G,,G:,+G,,G~,+~vG,,G~,+~(~-~)G,,G:,)~~ dy (28)
ss0 0
where v is Poisson’s ratio, and the plate rigidity R is

and t is the plate thickness.


Analogous to equation (24), the consistent-mass matrix for the plate element may be
deduced to be:
b a

M=pf W, y)W, yW dy. (30)


ss0 0

As an example of plate vibrations, consider a square plate composed of four finite


elements, as shown in Fig. 5. The plate is assumed to be simply-supported at all edges
and to have the following physical properties:
a=b=5 in. t=O*l in. v=o*3
E= 30 x lo6 psi ~=0~O01~lb-secz/in.4

FIQ. 5. Plate example.


The Eigewaiue Problem for Banded Matrices 659

In this example the upper band width UBW of the stiffness and mass matrices is 20, while
the possible number of degrees of freedom N is 36 (certain of which are restrained). Natural
frequencies and mode shapes were obtained for this four~lement model by the generalized
Lanczos approach. Several of the angular frequencies calculated by this method appear in
Table 2. (Subscripts on the symbol for angular frequency o in this table indicate the
number of half waves in each principal direction for a particular mode shape.) For com-
parison purposes, the corresponding values given by Bogner et al. [6] are also listed in
the table, together with exact values f5J for this problem.

TABLE 2. Angular frequencies&ad/se+ for plate example

Mode 4-Element model Bogner ef al. [6] Exact [S]

a1 1037 1037 1035

012, @2l 2777 2777 2587

w22 4398 4399 4138

0139 w31 6222 6222 5173

@23, m32 7710 7702 6725

033 10,745 10,745 9311

Plate buckling
The analysis of elastic buckling by the method of finite elements [7] also involves the
nonstandard form of the eigenvafue problem with two equally banded matrices. This
case is mathematically similar to the vibration problem, but the consistent-mass matrix is
replaced by the initial-stress stiffness matrix (sometimes called the geometric stiffness
matrix). The initial-stress stiffness matrix for the plate-bending element involves first
partial derivatives of the shape functions as follows:

(31)

in which rrX,cry, and rXYrepresent membrane stresses in the element caused by loads in the
plane of the plate. Von Riesemann [S] developed the terms in this matrix for the Bogner
rectangular plate-bending element.
When the element stiffness and initial-stress matrices are assembled into the over-all
arrays for the structure, one of these arrays must again be positive-definite. If the initial-
stress matrix is chosen to correspond to matrix A in equation (1) and the stiffness matrix
again corresponds to matrix B, the form of the buckling problem becomes:

(32)

in which si represents the scale factor on the in-plane loads for the i-th mode of buckling.
660 WILLIAMWEAVER,JR. and DAVID M. YOSW~DA

When the plate example in Fig. 5 is subjected to uniformly-distributed compressive


edge loading N, on edges x=0 and x=2u, the critical load for the first mode of buckling
is found to be:
(RX),,= 1089 lb/in.

The exact solution [9] for this type of loading is:

(N,),*, = 1084 lbjin.

Thus, the error in the numerical solution obtained by the present method is approximately
0.5 per cent.
When the same plate example is subjected to additional uniformly-distributed com-
pressive edge loading NY on edges y=O and y=2b, the critical load for the first mode of
buckling is determined as:
(N,),, = (N,),, = 544 lb/in.

The exact solution [9] for this case is:

(NX)zr = (IV,,),*,= 542 lb/in.

which shows that the numerical solution is in error by about 0.4 per cent.

CONCLUSIONS
The generalized Lanczos method is well suited for solving the eigenvalue problems
that arise in dynamic and buckling analyses of linearly-elastic structures. Energy-consistent
formulations for discretized systems produce the nonstandard form of the eigenvalue
problem with two coefficient matrices that are rea1, symmetric, and equally banded. The
approach described herein avoids expansion of either matrix outside of the original band
and thereby conserves computer storage. Of course, the amount of computer storage and
the number of calculations required for a given problem depend upon the width of the
band as well as the number of degrees of freedom. For problems with narrowly-banded
matrices this technique is highly advantageous, and the accuracy of the results compares
favorably with other methods.

[iI C. LANCZOS,An iteration method for the sotution of the eigenvaiue proHetn of linear ~~ere~ti~ and
integral operators. J, Res. Nat. Bur. Stand. 45,255-282 (1950).
[2] J. H. WILKINSON, The Algebraic Eigenvuhae Problem. Oxford University Press, London, 391 (1965).
[3] W. WEAVER, JR., Computer Programs for Structural Ana[ysis. Il. Van Nos?rand, Princeton, New
Jersey, 56-68 (1967).
[4] J. S. ARCHER, Consistent mass matrix for distributed mass systems. J. Strut. Div., ASCE 89, ST4,
161-178 (August, 1963).
[5] S. ~MOS~NKO, Vibration Problems in Engi~eri~, 3rd Ed. D. Van Nostrand, Princeton, New Jersey,
332, 443 (1955).
161 F. K. BOGNER,R. L. Fox and L. A. SCHMIS’,JR., The generation of inter-element-compatible stiffness
and mass matrices by the use of interpolation formulas, AFFDL-TR-66-80. Conference on Matrix
Methods in Structural Mechanics, Wright-Patterson Air Force Base, Ohio, 39743 (October 1965).
[7] 0. C. ZENKIEWICZand Y. K. COXING, The Finite Element Method in Structura! and Continuum
Mechanics. McGraw-Hill, New York, 183-186 (1967).
[S] W. A. vow RIESMANN,Large deflections of beams and plates. Ph. D. Dissertation, Department Of
CivilEngineering, Stanford University, Stanford, Cabfornia (1968).
[9] S. Tr~osrnnnco and S. W~~NOWSKY-KRIEGER, Theory of Pfares and Shells, 2nd Ed. McG~w-Hill,
New York, 389-390 (1959).
[lo] D. M. YOSHIDA, Dynamic response of beams and plates due to moving loads. Ph.D. Dissertation,
Department of Civil Engineering, Stanford University, Stanford, California (1970).
(Received 15 April 1971)
The Eigenvalue Problem for Banded Matrices 661

kpPENLnX:-FORTRAN WBROWINES (Ref. 10)

1. SUBROUTINE DBSOL (F!, !?A, MB, A, B, F, ALPH, BETA, R, *, w, U)


2. C THIS SUBPROGRAM REDlJCES THE EICENVALIJE PRDRL~! IN t!D6TflPDbRD
3. C FORM (A’X = LAMBDA*B*X) TO T”F FORtA (T*Y = LAt*~RDt’*Y), IN
4. C T IS TRIDIPCO~IAL, USING THE FENERALIZEC L2NCZOS METHOD.
5. C
G. C FLORAL PI\Rfif,lETFRS
7. C N s ORDFR OF BAND VATRICFS
8. C MA = UPPER BAND WlDTIj OF t+ITRIX A
9. C MB = UPPER BAND WIDTY OF MJ’TRIX R
C A = UPPER BAND OF MATRIX A
:;: C R = t!PPER BhF!D OF MATRIX B
12. C F = DFCDfflPDSED MATRIX P
C ALPH = &Ill! DIAGONAL OF T
:;: C BETA = SUBDIAGONAL OF T
15.. C R = TRANSFORMATION MATRIX
C * = NONSTANDARD EXIT
:67: C W, U = TEMPORARY STORAGE VECTORS
18. C
19. C SUBPROGRAMS REQUIRED
20. BDCOMP, BSOLI, DSOLZ, BWIJLT
21. :
22. CDfAF!ON ID I I.!/ NZ
RCA,_+,, /\(112,1), B(NZ,l), F(NZ,l), R(NZ,l), w(l), u(l)
Z: REAL*4 PLPP(1). BETA(l)
RFAL*S SIJM, TD, DSQRT
ii: C
27. C C!toDSE THE INITIAL CDLUI’N OF P, DETERMINE ALPHtl), AND
28. C DECOEPDSF I! BY TtiE CPOLFSKY b”CT”DD.
29. C
Nkl = N - 1
::: R(1.1) = l.O/SO,RT(B(l,l))
DO 100 I = 2.E!
::: 100 R(I.1) = 0.0’
34. ALP!<(l) = ~(l,l)/B(l,ll
GETA = 0.0
3365: CAI L BDCDMP (K, t,iO, R, F, PI'1400)
37. CALL BllULT (I:, MA, A, R(l,l 1, V)
CAI.1 BF!lJIT CL!, MB, B,. R(l,l .I, U)
:9"* no 200 I = 1,N
40: 200 11(l) = l!(l) - ALPN(l)*U(I 1
41. uo 1300 I = 2.N
42. ll!l=l-1
43. C9LL BSDLl (II, MB, F, bi)
44 . SUEn = 0.0
45. PO 250 J = I,!.’
TD = !I(J)
:;: 250 SUI: = SUfi + TD*TD
Wm.rm WEAVER,JR. and DAVID M. YOSHIDA

48. SW! = DS0.RT(SUMI


49. BETA(Ib'1) = SW!
50. IF(SUM .CQ. 0.0) T;O TO 400
DO 300 J * 1,N
55:: 300 R(J,I) = W(J1/SVI?
53. 60 TO 600
54. 400 DO 500 J s 1,tt
500 R(J,I) = 0.0
::: Rfi,l) = l.B/S~?RT(B(i,l))
57. GO0 r~1.f P,SOLZ (F', I;:, F, R(l,l))
C
:fl: C TI'F
60.
61. C
G2. CALL BIWLT (N, t:G, 8, R(l,l), WI
Ml BOO J = 1,lI'l
::: SL'V = 0.0
DO 700 k = 1,i:
66;: TO f W(K)
67, 700 suti = SUP; * TD*R(K,J)
68. DO 800 K i- 1,N
59. 800 R(K,I) = l?(K,l> - SW+R(K,J)
70. CALL BWJCT (t!, HS, B, Rfl,lf, N)
SUFl = 0.0
::: DO 900 J = 1,N
73. TD * R(J.1)
74. 900 SW = SW;1 + \ifJ)*TD
75. SW1 = nSnr?T(SUt:?
DO 1000 J = 1,N
:;: 1000 R(J , I) = R(J , I)/Sl!t:
78. C
79. C COt4PUTE TIJF VEXT ELEt?EMT OF ALPI:.
80. c
CALL Gt?UI.T(I', NA, A, R(l,lI, W)
If:: SUM = 0.0
83.
84.
es.
86.
57. c
88. C PfIt!ITIALlZE Cl FOR TQE t!EXT STEP.
89. C
no, IF-(1 Er). F!) RFTURN
Il. CA.11 hf'l!l.T
(I!, I!i?,B, R(l,l), U)
92. PO 1200 0 = l,!'
93. 1200 W(J) = if(J) - ALP!!(t)*t',(J>
94. CALL BNJLT (t:, MB, B, R(l,tt?l), U)
DO 1300 J = l,t!
9";: 1300 M(J) = U(J) - BF.TA(It~l)*U(J)
97. 1400 CrrTUPt!1
98. ENU
The Eigenvalue Problem for Banded Matricea

1. SURROUTINF BDCDf:P (N, ICII, A, U, *I


THIS SUBPROGRAM DfCDYPOSFS A POSITIVE-DEFIfJITE SYE’t:ETl!IC I:ATFlX
:: ItIT TME FORW (A = t!‘+U), W!!ERF U IS AN UFPER-BAM’ MATRIX.
4. IF THE f.!ATRIX IS t!OT POSITIVF-DFFIb’ITF, RETUP%! IS ?:DIaSTAF!Dt PD.
5.
6. GLdBAL PARAMETERS
7. N = DRLIER OF RAND t?ATRIX
a. I RW = UPPER BAN@ HIDTI! OF MATPIX
9. .4 = UPPER BAND OF t:4TPIX
U = DECOl!POSFD IIPPFR-Rtb’T, blATPI
:i:
COMMON /Dl tI/ NZ
::: RFAL*4 A(NZ,l), U(1'2,l)
14. RFAt*8 St!!{, DSnRT, {!I7
It!TEGER*4 P, 0
::: DO 400 I = 1,F:
17. P = v - I l 1
IF(IBW .LT. P) P - ICI1
ii: DO 400 J = 1,P
0 = I w - II
:T: IF(I - 1 .LT. 4) 0 - I - 1
22. SUM = A(I,J)
IF(Q .LT. 1) GO TO 200
22:: DO 100 K = l,Q
25. 110 = U( I-K,J+K)
100 suv = SW - U( I-K,l+K)*l’D
E: 200 IF(J .NE. 1) GO TO 300
28. IF(SUt! .LF. 0.0) RETURI! 1
29. TEMP = l.O/DSCRT(SUI.l)
30. U(I,J) = TE!‘P
GO TO 400
::: 300 U(I,J) = SUCl+TFtIP
33. 400 CONT I NUE
34. RETURN
35. END

1. SURROUTiNF RSOI.1 (F!; I8W, V, R)


THIS SUBPROGRAM SOLVFS A SET OF SItk!LTbE!FOL’S AtcFPDAlr
32:
4.
EQUATIONS OF Tl+E ,FORb: (I:‘+X
LOWER-TRIANGULAR BANDED MATRIX.
= R), IPI WHICI 11’ IS A

:: GLOBAL PARAE?ETERS
7. N = ORDER OF RI\F!D MTRI X
IBll = UPPER RAND \IlDTlc OF I:ATRIX
Ii: U = DECOMPOSED UPPER-BAF!D t”bTRIX
5 = VECTOR OF CONSTANTS
:51:
12. COMMON /DIM/ NZ
13. REAL*4 U(NZ,l), B(l)
14. REAL’8 SUM, ED
DO 200 I = 1,ll
ii: J = I - I BI1 + 1
17. IF(I + 1 .I.E. IRW) J = 1
sub! = Br I 1
::: Kl = I - 1
20. IF(J .GT. Kl) GO TO 200
DO 100 K = J,Kl
::: BD = R(K)
23. 100 SI!E! = slJf: - I!tK, I -K+l)*RD
200 R(I) = SuwU(I,1)
2254: RFTURfI
26. END
664 WILLIAMWEAVER,JR. and DAVID M. YOSHIDA

1. SUBCOUTI"E SSOL2 (N, tnw, u, XI


2. r TI'IS SURPROGR.W SOLVES A SET OF SIWLTANEOUS ALCERRAIC
3. C FO.UATIOf~fS OF TlJF FORI" (U*Y = X), WIICH IfI II IS AN
4. C IJPPFR-TRl.A~'GULAP SAt'OFD t?fiTPIX.
I:
:: 6 GLOBAL PARAMETERS
7. C tl = CRDER OF RAE!D I'ATRIX
R. C IRIJ = UPPFR BAt!fl WIDTII OF I'ATRIX
9. c I' = PFCOIIPOSF~ UPPER-l?AMD !IATRIX
10. c X = VECTOR RFSULTING FllOb! SIIGPRODRAt! BSOLI
11. C
12. COMi?Of! /Oil!/ NZ
13. REAL+4 U(NZ,l), X(1)
14. REAL*8 SUM, XD
15. DO 200 I1 = 1,1!
1c. I=)!-11+1
17. J = I + IRll - 1
18. IF(J .GT. ?!I J = tl
19. SUM = xc I)
20. K2 =I+1
21. lF(K2 .GT. J) GO TO 200
22. DO 100 K = K2,J
23. xn = X(K)
24. 100 SLIP' = SUM - U(I,K-I+l)*XD
25. 200 X(I) = :Uf'*v(I,l)
RFTURI:
;;: CND

1. SUBROUTI'IE P.tWLT (I:, Ifill, A, X, !I)


2. C T'llS StlRQQOCRAf~ t4l'LTIflI'S A FAh'nr!! SYW'FTRIS t1ATRIX \!ITU A
3. C VECTOR. O1II.Y T'iT I'nQF"-?At'P POPTIn t' OF T'JF t',qTRIX IS STORFi?.
4. c
5. C CLOl:!l. PhRAMFTfRS
G. r I! = ORPER OF RAMD IWTRIX
7.
s. A = UFPFR R"t'O nF t'/'TD.IX
X = VECTOR TO R' t"I!ITIPIIFn
1% !: = PROPUCT VFCTCR
11.
12. cOi,'t?nt' /Ott'/ HZ
13. RFbt*4 A(W,l>, X(l), R(l)
14. REAL*8 SW:, xn
15. Nl = t: - ll~bl + 1
lli. DO 300 I = 1,11
17. SI!l! = 0.0
18. $11 = I II!1
19. IF(I .GT. trl) Jl = I! - I +I
20. DC 100 J = 1,Jl
21. XC = X(I+J-1)
22. SUM = SUE.1 + A(I,J)*XD
23. IFf(l .En. 1) .OR. (IRkI .E'.I. 1)) GO TO 300
24. Jl = I - In\4 + 1
25. J2 = Jl + IRlJ - 2
IF(I .CT. IBW) c-0 TO 190
;;: Jl = 1
28. J2 = I - 1
DO 200 J = Jl,J2
%: XD = X(J)
31. SUti = SlJt,l+ /\(,',I-J+ 11*xn
32. l3(I) = 5111'
33. RETURI:
34. FPO

Potrebbero piacerti anche