0% found this document useful (0 votes)
256 views17 pages

(Felippa) Solution of Linear Equations With Skyline-Stored Symmetric Matrix

This document summarizes subroutines for solving linear equations with a sparse, symmetric matrix stored in skyline format. The subroutines (SKYFAC and SKYSOL) use a compact Cholesky-type factorization algorithm to factorize the matrix A into lower triangular L, diagonal D, and upper triangular U matrices. SKYFAC overwrites the input matrix A with the factorization. SKYSOL then uses forward and back substitution on the factorized A to solve for vectors b of the linear system Ax=b. The skyline storage scheme offers a balance between simplicity and efficiency for this solution method.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
256 views17 pages

(Felippa) Solution of Linear Equations With Skyline-Stored Symmetric Matrix

This document summarizes subroutines for solving linear equations with a sparse, symmetric matrix stored in skyline format. The subroutines (SKYFAC and SKYSOL) use a compact Cholesky-type factorization algorithm to factorize the matrix A into lower triangular L, diagonal D, and upper triangular U matrices. SKYFAC overwrites the input matrix A with the factorization. SKYSOL then uses forward and back substitution on the factorized A to solve for vectors b of the linear system Ax=b. The skyline storage scheme offers a balance between simplicity and efficiency for this solution method.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Computers & Srructurrs. Vol. 5. pp. 13-29. Pergamon Press 1975.

Printed in Great Britain

SOLUTION OF LINEAR EQUATIONS


WITH SKYLINE-STORED SYMMETRIC MATRIX
CARLOS A. FELIPPA
Structural Mechanics Laboratory, Lockheed Palo Alto Research Laboratory, 3251 Hanover Street, Palo Alto,
California 94304,U.S.A.

(Received in reoisedfom 26March 1974)

Abstract-Fortran IV subroutines for the in-core solution of linear algebraic systems with a sparse,
symmetric, skyline-stored coefficient matrix are presented. Such systems arise in a variety of applications,
notably the numerical discretization of conservative physical systems by finite differences or finite element
techniques. The routines can be used for processing constrained systems without need for prearranging
equations. The application to ‘superelement’ condensation of large-scale systems is discussed.

NOMENCLATURE finite element methods. In the latter case, direct elimina-


A symmetric coefficient matrix tion techniques have been used to solve the resulting
A,,, A,,, A,< block partitions of A in constrained system linear systems Ax = b since the advent of the finite
A* condensed A upon elimination of xf in superelement element method in the mid-1950’s[ l] (this is in contrast to
condensation process classical finite difference discretization, where iterative
B A,, -A* solution techniques still prevail). Commonly used al-
C(A) Euclidean condition number of A gorithms include Gauss elimination, standard Cholesky
L lower triangular matrix
D diagonal matrix (A = LL’) and modified Cholesky (A = LDLT). The main
U upper triangular matrix implementation differences, however, concern the man-
X see equation (19) ner in which nonzero coefficients of A are arranged in the
b right hand side vector various storage devices (e.g. core, extended core, random
b<,b, prescribed and unknown portions of b, respectively, access mass storage, tapes), utilized during the solution
in constrained linear system process. Excellent surveys on this subject are presently
6 modified b, in constrained system solution available [2-4].
b* condensed b upon elimination of xf in superelement The routines presented here utilize only one storage
condensation process
r residual vector b -Ax
level, namely, high-speed memory. The storage arrange-
x solution vector satisfying Ax = b ment of matrix A is the so-called skyline, profile,
x0 xr prescribed and unknown portions of x, respectively, envelope, or variable bandwidth method[5-61. The
in constrained linear system symmetric matrix A is stored in a linear array as a string of
x* solution iterates produced in iterative refinement ‘active’ columns of the upper triangle (or, equivalently,
process rows of the lower triangle). The active portion of each
A.& solution corrections in iterative refinement process column is bounded by the diagonal and the furthest
Y>= intermediate vectors in solution process, equation (3) nonzero element.
A linear array containing A or factorization thereof
It should be mentioned that more sophisticated sparse
LD array of pointers to diagonal elements of A in A
matrix storage schemes are available [2-4,7-91. However,
o,, uii (i, j)-th element of A, U
b,, xi j-th element of b, x
implementation of most such schemes requires considera-
di j-th diagonal element of D ble programming skill to ensure that the data handling
k number of iterative refinement cycles overhead (addressing, fetching, storing, etc.) is minim-
n order of A ized. The skyline storage scheme offers a reasonable
nf, n, number of free and constrained equations, respec- compromise between organizational simplicity and com-
tively putational efficiency. Moreover, since the associated
In number of random r.h.s. vectors used for estimating solution process consists largely of vector inner products,
C(A) it is a natural choice for implementation on the
ri length of j-th row of A excluding constrained
columns ‘fifth-generation’ parallel and pipeline computers [IO].
ti tolerance for singularity test
floating point machine accuracy
B relative solution error ALGORM'HMDFSCRIPTION
Il.1122-norm of matrix or vector Purpose
ll~llf Euclidean matrix norm Subroutines SKYFAC and SKYSOL are designed to
matrix inverse solve the linear equation system
‘;‘I.T matrix or vector transpose
Ax=b (1)
lNTBODUCTlON where A is an n by n sparse symmetric nonsingular
Large sparse symmetric systems of equations generally matrix entirely core stored in skyline form, and x and b are
arise in practice as a result of numerical discretization of column vectors. The routines can handle the case in which
self-adjoint problems by variational finite difference or some of the components of x are prescribed.
C.A.S..Vol. 5. No. I-B 13
14 C. A. FELIPPA

Method in which entries outside the skyline template are not


The symmetric factorization shown. Matrix (6) is stored as a IS-work string A:

A=LDU (2) A: aI;, a22, alj, 0, a33, a24, aj4, ati, a55, a16,
0, 0,a46,a56, a%. (7)
where L is a unit lower triangular matrix, D a nonsingular
diagonal matrix and U is the transpose of L, is carried out This array is complemented by a (n + 1)-word array LD
by subroutine SKYFAC by a compact Cholesky-type containing diagonal location pointers:
factorization algorithm similar to that described in[ll,
Contrs. I/l and I/4]. The original matrix A is overwritten LD: 0, 1,2,5,8,9,15. (8)
by elements of D-’ and U in the manner discussed in the
‘Organizational Details’ subsection. No pivoting is used For a genera1 matrix, LD(I + 1) points to aii in array A
in the factorization process. for i=l,... n, whereas LD(l) contains zero.
Once A has been factorized, subroutine SKYSOL can During the factorization process, elements of the strict
be repeatedly invoked to solve equation (1) for any right upper triangle of U replace the corresponding super-
hand side b. The solution vector is obtained by the usual diagonal entries of A, and the reciprocals of the diagonal
three-stage process: elements of D overwrite the diagonal elements of A. Thus
the factorization (2) of the example matrix (6) would be
Lz=b (forward substitution) (3a) arranged as follows:
y = D-‘z (scaling) (3b)
I/d, u13 Ul6
ux=y (backsubstitution). (3c) lldz uz ~24 U26
l/d, ~34 U36
Constrained system l/da (9)
SKYFAC-SKYSOL can also be used to solve the lids :::
more general case of a constrained linear system: l/d61 .
I
Constrained equations are flagged by a negative LD
pointer. For instance, if x3 and x5 are to be prescribed in
the linear system with coefficient matrix (6)
where both b, and x, are prescribed (subscripts f and c
stand for free and constrained, respectively). Equations LD:O,1,2,-5,8,-9,15. (10)
associated with xc are called constraint equations or
simply constraints; they result from the discretization of In this case, the decomposition (2) is performed only on
essential boundary conditi0ns.t A constraint equation the unconstrained equations of (4), i.e. A,, is replaced by
corresponding to a prescribed zero (nonzero) component Dff’ and U,. Constrained rows and columns are not
of x is called homogeneous (nonhomogeneous). If all altered.
constraints are homogeneous, i.e. xc = 0, the system (4) is
said to be homogeneously constrained.
System (4) can be solved for xf upon reduction to the Decomposition failure
form The factorization process (1) may be aborted if one of
Arrx, = bf - Af,xc = b, (5) the following conditions is encountered.

where l;f = b, if the system is homogeneously con- 1. Singularity: matrix A (Aff if constrained) appears
strained. I’he subvector b, may then be obtained from the singular to machine accuracy. The singularity test
second matrix equation in (4), if desired. performed at the j-th elimination stage is[ 11,Contr. I/7]:
It is important tb note that it is not necessary to
physically arrange a constrained system (1) to put it into di < tj = 8 El; (11)
the partitioned form (4). Constrained and unconstrained
equations may be freely intermixed.* where d, is the j-th diagonal entry of D, E the smallest
positive floating-point number for which 1+ l > 1 on
Organizational details computer being and is the Euclidean norm
The storage arrangement of the coefficient matrix A is (length) of the row of excluding constrained
best illustrated by a simple example. Consider the (6 X6) columns.
symmetric matrix: 2. Indefiniteness: A if appears
be and check positive is
011 aI3 aI6 by user. j-th test
aZ20 a24 0
A= a33 a34 0 di - (12)
a4 a46 (6)
symm. as5 as6 The stability the factoriza-
[ ah6I (3) not if is positive
However, many situations, as
tb, is often called the constraint reaction vector. finite analysis a symmetric
SIf the number nc of constrained equations is significant (say tion an matrix guaranteed some
n, B 0.3 n), it may be computationally advantageous to preorder restrictions the of equations
(1)into the form (4) before presenting it to SKYFAC-SKYSOL. observed.
Solution of linear equations with skyline-stored symmetric matrix 15

Solution accuracy estimation 2. Problems involving local nonlinearities, if these can


Two optional mechanisms for assessing the accuracy of be confined to the bottom of the discretization operators.
computed solutions are provided: Then the (linear) upper portion of A can be factorized
once and for all during the nonlinear iterative solution
1. Matrix condition evaluation (a priori estimate). A
process (a similar situation occurs in the implicit time
lower bound estimate of the Euclidean condition number
integration of locally nonlinear dynamic systems).
of A[13, Sec. 3.111:
USAGE
C(A) = ]IA~I&‘!E (13) The routines presented here include the equation solver
proper (SKYFAC-SKYSOL) and a test package (SKYT-
where ]]jE denotes the Euclidean matrix norm, is returned
EST). Relationships among the various routines are
by SKYFAC on request. The estimation is based on
illustrated in Fig. 1.
performing one cycle of iterative refinement on a specified
number m of ‘random’ right hand side vectors b, and r---------
applying equation (13.3)of chapter 3 of [ 131.The larger m,
the better the estimate, but in practice m = 2 is often
sufficient. If C(A)E & 1, log10C(A) may be used as a gross
estimate of the number of significant digits expected to be
lost in the solution process.
2. Iterative refinement of solution (a posteriori esti-
mate). Given the initial computed solution x0 of (I), a
k-cycle refinement process is defined by the algorithm [ 11,
Contr. I/2]:

ri = b-Axi_,
LDUAxi = ri i=l,...k (14)
xi = xi-1 t Ax, 1

where only the calculation of the residual ri has to be


carried out in higher precision arithmetic. Given k >O,
subroutine SKYSOL returns xk and the relative error
( TEST PACKAGE
Sk= llhxkllzlllxt11z. (W L____-_____i

Fig. 1. Subroutine flowchart illustrating relationships among


If S, 4 1, 8, provides an estimate of the accuracy of xkml. program modules.
Note: In practice it is pointless to specify k > 1 unless the
entries of A and b are exact within their single precision
Documentation for using subroutines SKYFAC and
representation (as it happens, for instance, in some finite
SKYSOL is embodied in the source listing. Both
difference schemes on regular grids), since the sequence
subroutines utilize an external, user-supplied vector inner
xe will not generally converge to that solution of system
product function whose name is transferred in the formal
(1) associated with infinite precision representation of A
argument list. Fortran samples of such function are
and b.
provided in the listing, but for maximum efficiency the
function should be handcoded in assembly language
Partial factorization
(many computer installations have such a procedure in the
Subroutine SKYFAC allows the user to specify that the
utility library).
decomposition of A is to be performed from equation
The test program SKYTEST is intended to illustrate the
(NBEG t 1) through NEND, where NBEG, NEND are
use of SKYFAC-SKYSOL, and to certify their implemen-
input parameters. The usual complete factorization of A is
tation on specific computers. SKYTEST uses four
achieved by setting NBEG = 0 and NEND = matrix
auxiliary routines: SKYLDU, SKYOPC, SKYMAP and
order. A partial factorization may be requested by
SKYPRT. The last two are likely to be useful on their own
suitably constraining that range. For instance, if matrix (6)
for matrix display purposes. Guidelines for setting up and
is submitted to SKYFAC with NBEG = 0 and NEND =
running the verification program are provided in the
3, the output is
comment block heading SKYTEST. A test example
produced by the test program on the UNIVAC 1108 is
I/d, Ml3 ala
also given.
lldt u23 a24 0
l/d, a34 0
(16) Program modifications
au a46
Only one machine-dependent constant is utilized in this
ass a56 package: the floating-point precision constant E denoted
I aba: . by EPSMAC in subroutine SKYFAC. Appropriate values
of l for various computers are indicated there.
A subsequent call with NBEG = 3 and NEND = 6 would
Conversion of SKYFAC-SKYSOL to operate in full
produce (9).
double precision is straightforward: all REAL declara-
This capability is useful in the following cases:
tions should be changed to DOUBLE PRECISION (or
1. The calling program may wish to examine factoriza- REAL*8 on IBM 360/370 models), or appropriate
tion of principal minors (e.g. in local stability analysis of IMPLICIT statements inserted. If this is done, the
physical systems). optional iterative refinement mechanism loses meaning
16 C. A. FELIPPA

... PRLIGRHM LISTING . . .

SUBRO”,INE SKYFAO 07, NBEG, NEND, Nr LD. VI DOTPRD. SINGABs


. PDCHEK, ICOND, IRFILE, FlCLiND, DETCF. IDETEX, NEGEIG, IFFaIL>
c
C..*.............*..**.*..*.*...**.*......**.....***.*.............*..**
t* _______-__------- .
c* -PU*POSE- .
C. _______________-- *
C. .
C+ TO PERFORN SYNMETRIC IN-CORE FRCTOR1ZRTION OF A SPHRSE, .
C. SKYLINE-STORED, SYMMETRIC NHTR~X .
C* .
C........*..,.*.*.........*..**........*....*........*...*..*.....*.....
C* .
C* PROGRRMNED - CRRLOS A. FELIPPA, MRHCH 1767. l
l
:: LlPDRTE - JClNE 1974. .
C. l

CO LRNGUAGE - FORTRAN IV <ANSI ESCEFT FOR OCCASIONAL .


C. tI+J>-TYPE SUBPCRIPTS) .
CO .
C* EBUIPNENT - “RCHINE INDEPENDENT (EXCEPT FIIH TOLERRNCE l

EPSMAC, SEE DISCUSSION) .


:: .
C*.r....***...*****.*.**.........*....*...........***...*.........*.....
----------------------_ .
- D 1 ; L I, 2 S I 0 N - .
________- .
l

THE UPPER TRIRNGLE OF THE INPUT ZYNNETRIC MHTPIX CR, IS 3TORED l

IN COLUPIN-WISE ‘ShYLINE’ FRSHION ,N THE FIRST NWA WORDS OF .

ARRRY R. THE STORRGE SCHEME IS BEST ILLUSTRRTED BY THE (6 X 64 l

MRTRIX <DOTS DENOTE ZEROS OUTSIDE SKYLINE, : .


l
.
.
.
l
l
.

I Au’ I l
l
.
THIS IS PRESENTED TO SKYFAC AS H I’+WORD PTRING : .
.

IN ARRRY H. THE POSITION OF THE DIRGONRL ELEMENTS IS NARKED BY l


A tN+1,-WORD INTEGER ARRAY LD, SlUCH THAT LDcl> = U HND .
LD<I+I, POINTS TO R<I,I, IN RRPRY R FOR I = IclaN. .
FOR THE EXAMPLE MRTRIX (1) : .
.
LD = Or I, 2, 5, 3, 9, 15 (2R> .
l

THE SYMMETRIC DECOMPOSITION .


.
CH, = [Ll CD1 GUI 13 .
l

WHERE WI 15 THE TFRNZP[I:E OF CL,, WHICH 11 il iUNIT LOWER .


TRIHNGULW NRTR,::, “ND CD, I? F, DIHGOllRL MATRIX, I; PERFORMED. .
THE STRICT UPPEY TRIANGLE OF WI OVEFUFITES THE OFF-DlH6ONHL .
ENTRIES IIF [RI I LIHERE‘,: THE RECIPCOCHL; OF THE ELE”ENTS OF .
OF [D, DEPLACE THE DIHGONHL ELEMENT: OF 0%. THE DUTPClT .
;TORHGE ISHEME FOP THE EXRNPLE MHTPI:: a 11 I I THEN: .
.
.

THE DECONPO;ITION PPOCEIC “H‘i BE ABORTED UNDEF EITHER OF THE .


FOLLOWING CONDITICiM: : l
.
THE NHTPI.‘: [HI. rm~*FlEn B’i THE R~WNDING ERRORS. t3PPmRS +
:ING,,LHF. THE IINGULWITY TE?T WED HT THE J-TH 3TEP IS .
.
ABIID<.,b, LE 3.iP’NHC.PIJ~ 35, .
.
WHEYE P\,’ DENOTE’I THE ELlCLlDEHN NOPM OF THE I-TH POW OF .
[R,, HND EP5NW: II THE :MHLLELT PO‘lITli’E FLDRTING-POINT l

NUABEF %I:,, THRT 1. O+EPt”ili 6, 1.0 OH THE CONPUTEP .

BEING U:ED. THIS 51N61,~HPI,r TE?T li UNL’I’ ENFORCE11 IF .

INPUT FLHG JIW?HB I: . TRUE. c:EE INPUT HPGUMENTT,. l


l

THE NHTRIX CH, I: INDEFINITE. I.E.9 l


l

DC,* LT S*EP?MRC.RIJ’ .
l

THE POSITIVE DEFINITENES? TE:T I: ONL’i ENFORCED IF INPUT l

FLRG PDCHEh 15 . TFIJE. a5EE INPUT RPGUNENT:I. IT ZH‘WLD BE l

ZTRESSED THHT THE NUNEPli iTHBILITY OF THE DECOMPO‘;ITIDN l

(3, 15 NOT GURPRNTEED IF NHTPb [H, IT INDEFINITE. .


l
.

THIS SUBFOLlTlNE MHY RL:O BE UTILI:ED TO HHNDLE THE NORE l

GENEPRL tRCE OF R CONSTWINED LINEAP ‘I’rTTEM, IN WHICH SOME BF l


THE X-ENTRIEC WE PRESCRIBED. H CONITPHINED EYTTE” NW BE .
FOR”kLY WRITTEN IN THE PRRTITIDNED MHTRIX FORM : .
+
Solution of linear equations with skyline-stored symmetric matrix 17

c* WHERE CBFI fiND IXCI HRE GIVEN AND CXFl RND CBC, RRE TO BE .
C. DETERt‘INED <SUFFICES ‘F’ RND ‘C’ STAND FOR ‘FREE’ AND .
C. ‘CONSTRAINED’, RESPECTIVELY. HOWEVER. IT “L&T BE EMFHHSIZED .
C. THRT IA3 NEED NOT BE PHYSICRLLY RPPRNGED TO CONFOPM TO (7,. .
C. l

CO IF X(1> IS TO BE PPESCPIBED. THE I-TH POCl RND COLUMN ilF IA3 l


C. ARE S,3ID TO BE CONSTPRINED. SUCH CONDITION I5 NHPIED BY H .
C. NEGATIVE VALUE OF LDaI+l.I. FOR INTTANCE. IF RObIS 3 RND 6 OF THE .
C. EXHNPLE MHTPIX (1) RRE CONSTRRINED. THE LD HPRRY MUST BE: .
C. .
CO LD = 0, I, 2, -5, 8, ‘3, -15 (7RI l

,: . .
CON?TRHINED PI,@ tiND COLURNJ HFE IGNORE11 IN THE FHCTOPIZHTION .
;: OF R CONITPAINED MHTPIX HND VHLUEr. THEREIN PETUPN LINHLTEYED. .
1:l FOR INCTRNCE, THE OUTPUT F@OM ?kYFAC FOP THE EXHNPLE NHTPIX .
C. (11 lJITH THE L” HF‘YAY ‘7R, r\tOULD BE : .
c* .
C. .
C. I I ‘DI HI3 HI& I l
0:. I I 112 HZ3 ,_I24 0 I
c* I H3’ ,_,1:4 n I IS> :
c. I 1, DJ H46 I .
i. 1 1,D5 Fl5c; I .
c. I “66 I l
cl .
C. .
c* THhT III OHLY THE ,uNRE~PP~~NGED~ FFEE-FREE POPTION IRFFI IS +
c+ EFFECTIVELY FHCTORIZED INTO CLFF, CDFF, CUFF,. l
l
c”: .
C. HDDITIONHL FEHTlJPEl OF THIS KIITINE INCLUDE: .
c. .
C. 1. THE DETEF”INRNT OF CHJ ,OF IHFF, ,F CONSTRHINED1 “AY .
c+ BE CONPUTED ON FEOUEST. .
0. .
C. 2. FbN ESTINHTE OF THE EUCLIDEHN CONDITION NUMBER OF IHI iOR .
c. CHFFI IF CONSTRAINED, MHY BE OBTHINED. l
C. .
c. 3. HCCUFIIJLHTION OF INNER PRODUCT’ i IN DIFFERENT PRECISION
r:* MOIlE5 IT FHCILITHTED BY INCLUDING THE INNERPRODUCT FUNCTION :
C. IN THE FORNHL RPGUNENT LIST. VHRIOLIS ENTRY POINT NRMES t
C. MHY THUS BE UIED WITHOLIT NEED FOR EDITING4ECOMPILING. l
l
2: 4. R CHPABILITY FOR PF1CTIHL FACTORIZRTION IS INCLUDED. T,,E .
C* FHCTORIZHTION ‘3’ I: HCTUALLY CRPRIED OUT FROM EQURTION .
c* *NBEG+Ia THROUGH rlENDr WHERE NBEG, NEND RRE TWO INPUT .
c* PRRHMETERS. NORIIALLI’ NBEG=O RND NEND=N. INATRIX ORDEk. .
C. HOWEVEF. IN CERTHIN CHZES (E.G.. LOCHL STRBILITY ANRLYSIS, .
$1. LOCHL NONLINEHKITIES;~ I H PRPTIAL FRCTOPIZRTION MRY BE .
c* UCEFUL. .
c* .
C...**..+**...*.**....**.....*.**.***.*..**.......**............*....*..

C. __----_____--_ l
c+ - IJ ; R 15 E - .
c* .
C. .
C.... 1. INFUT HPGCIMENTS - .
c. l
C. NBEG, NEND TWO PRRHMETERS SPECIFYING FRCTORIZRTION RRNGE .
c. HI EXTENDING FRON EQUHTION INBEG+l> THROUGH NEND. .
c. c.CEE DI’CU:‘: ION) . CONPLETE FRCTOPIZRTION OF CA1 .
C. I; qBTRINED WITH NBEG=O RND NEND=N <PIRTRIX ORDER,. .
C. .
c.. N IRDEP OF MeTHI?: CR, .
CO l
C. LD ,N+Is-UURD HPRRY OF DIAGONRL LOCRTION POINTERS .
C. ISEE DICClJ;SION, .
C. .
c. Y H SCRRTCH FLOATING-POINT RPRRY OF LENGTH AT LERST .
C+ N IF ICOND = 0, 4.N IF ICOND IS POSITIVE. l

c* .
CO DOTPRD FUNCTION RETURNING INNER (DOT, SCHLRP) PRODUCT .
C. UF TWO VECTOYS. THIS FUNCTION IS INVOKED BY .
C. DOTPRD(P,Q.N, AND SHOULD EVRLURTE THE INNER .
C+ PRODUCT OF THE TWO N-WORD VECTORS P ,?ND Q. .
CO .
c. SINGRB LOGICRL FLRG CONTROLLING ACTION TO BE TRKEN IF THE .
C. SINGULRRITY TEST (5) IS VERIFIED : l
C. .
C. SINGRB = .TRUE. RBORT SETTING IFAIL = J .
CO SINGHB = .FRLSE. SET D(J) TO Y.EPSNRC.R<A FIND .
c. PROCEED. .
C. .
CO FOR NORMAL USE OF SKYFRC IN EQURTION SOLVING, ONE .
C. SHOULD ALWAYS SET SINGRB = .TRUE.. THE .FRLSE. .
co SETTING IS RECOMMENDED ONLY IF THE DECOMPOSITION .
C* (3) IS TO BE USED IN THE CRLCULATION OF EIGEN- .
C* VECTORS OF [RFFI BY INVEPSE POWER ITERATION. +
C. l
c. PDCHEK LOGICAL FLFlG INDICRTING WHETHER CR1 <OR CRFF, IF .
C* CONSTRAINED) IS TO BE CHECKED FOR POSITIVE .
C. DEFINITENESS, I.E., CONDITION 16) TESTED : l
C* .
C. PDCHEK = .TRUE. ABORT SETTING IFAIL = -J l
C. PDCHEK = FRLSE. DON’T TEST FOR INDEFINITENESS .
C.
C. ICOND IF POSITIVE, A LOWER BOUND ESTXMRTE OF THE EUCLI- :
DEFIN CONDITION NUMBER C(A) OF CR3 <OR CAFF, IF .
CONSTRRINED, WILL BE CALCULATED BY PERFORMING ONE .
ITERATIVE REFINEMENT CYCLE ON ICOND ‘RRNDO,,’ RHS .
VECTORS. THE LRRGER ICOND, THE BETTER THE ESTIIIRTE..
c* HOWEVER, FOR PRRCTICAL R PRIORI RSSESSMENT OF .
C. SOLUTION RCCURRCY. ICOND - 2 IS OFTEN SUFFICIENT. .
.
C. A. FELIPPA

CO IAFILE IF NONZERO, COPIES OF IA, RND ITS FHCTDRIZATION .


C. IJILL BE WRITTEN IN LOGICRL UNIT IAFILE (SEE l
C. ‘OUTPUT FILES’ %ELOWj. IF ZERO. NO COPIES ARE .
1:. WRITTEN. H NONZERO IRFILE IS REQUIRED IN THE .
C. FOLLOWING TWO CASES : l
C. .
c* iH> ICOND IS POSITIVE <iiF,, REQUESTED, .
,B, ITERRTIVE PEFINENENT OF SOLUTION VECTOR: .
E: WILL BE REQUESTED WHEN CRLLING 6lrYSOL. .
C. .
c* fh!HRNING - DO NOT USE FERTUREC <RI 01; iB> IF THE .
c* PHPTIRL FRCTORIZATION OPTION IS BEING EXERCISED. .
CO .
c+.rr ‘2. INPUT-OUTPUT HPGUNENTS - l
CO .
c. H HPPRY CONTRININ‘ INPUT MATRIX TO BE FACTORIZED r,,P .
C. lJNFACTORIZED PORTION THEREOF IF NBEG ST 0, .
C. OUTPUT FRCTOPIZHTION-DEFINITIDN ELENENTC, HZ l
C. DESCRIBED IN THE DICCUSZION. .
C. .
Cl... 3. OUTPUT RPGUMENTS - l
C. .
C. RCOND EPTIMRTE OF CIA> IF ICOND GT 0 (RND IFRIL = 0’ .

C. DETi= IS PREi;T-TO I:<1 &;NPUT. IF DETLF I; ZERO .


i. ON INPUT, THE DETEPMINHNT IS NOT CHLCULHTED. l
IF OUTPUT IFAIL = +,I DETCF IZ ZET TO ZEPO. .
IF OClTPlJT IFAIL = -JI <J 6T O>, THE DETERNINHNT .
a,lbi I’ THRT OF THE UPPER *J r: i’ PPINCIPHL MINOR. .
C. .
C. NE6E I5 COCiNT OF NESATIVE EIGENVALCIES OF [R, m.OR tF,FF, IF .
C. [HI I; CONSTPHINED, IF IFRIL = 0 ON OCITPUT. .
c. .
1: l IFHIL FACTOPIZHTION FRILUPE INDICRTOP: l
1:. l
C. IFRIL= 0 FHCTOPIZRTION CUCCESSFULLY EXECUTED .
C. IFRIL= J :INGVLFIPITY CONDITION r51 DETECTED .
1:. IFRIL=-J INDEFINlTE CONDITION (6, DETECTED .
C. .
C.... 4. ICOMNON INPUTS - .
c* NONE. .
C. l
C***. 5. CON”ON INPUT-OUTPlUT5 - l
C. NONE. .
,- l l
c.... n. COMNON OUTPLlTl - l
C. NOllE. .
C. .
C.... 7. 1PlFlJT FILES - .
C. NONE. l
C. l
C.... :3. OUTFIUT FILES - .
C. l

C. IHFILE IF NONZERO. LOGICAL UNIT IAFILE RECEIVES COPIES .


C. OF THE ORIGINHL AND OUTPUT CONTENTS OF RRRRY A, .
C. SR’VED F,; 2 FORTRAN BINRPY RECORDS OF SIZE LDTN+l). .
c. .
I:*.*. ‘3. XRRTCH FILES - .
c* HONE. l
$. l

C.1.. IO. FROGRHM :UBPOUTINES - .


C. DOTFPD. XYRD”, I~Y?OL l

C. .
C.... 11. LIRRHRY :UBPOLITINE; - l

c* :ORT, FOPTRHN BINRRY 1’0 .


c. l
C,,r...+...rr.*....*.*........****+.*..

i
c T ir’E HND DI”EN:ION : T H T E ” E N T ‘;
c
REAL fIbI>, V 11
REHL HIJ?, DI DETCF, DOTFPD, EF5MRC
INTEGER LDf.1)
LOGICRL PDCHEK, ZINGRB
EOUIVRLENCE IHIJ~,II,DMAII
c
c NOTE - RPPROPIATE ‘JHLClEl IIF EPPNRC FOR VARIOUS COMPUTERS RRE
c CDC 6000,‘i’“O” SERIES :.llE-15 ‘TINGLE PRECISION)
IB” 36W320 EERIES 9.54E-07 +EAL.4 PRECISION)
c IBN 360,370 SERIES 2.2X-16 cRERL.8 PRECISION,
c UNIYHC 1108~1110, IBFl 7094 ,.49E-08 CIINGLE PRECISIONr

DRTR EPCMHC ,‘I. 4?E-8.’


c
c INITIRLIZHTION
i
IFAIL = 0
IDETE:I = 0
NEGEIG = 0
c
c SAVE qPIGINHL MATRIX IF IRFILE NE 0 AND NBEG = 0
c
NldH = IRBS<LDcN+l, I
IF I IRFILE.EO. 0, GO TO 200
IF ‘:NBEG.NE. 0, GO TO 200
REWIND IRFILE
WRITE (I-FILE) cR~J,rJ=I.NWFO
Solution of linear equations with skyline-stored symmetric matrix 19

I; COMPUTE SQUHRED LENGTHS OF UNCONSTRRINED RDWS NBEG+l THR” N


c
200 NBEGPl = NBEG + 1
00 IO”0 I = NEEGPlrN
II = LOiI+l>
IF <III 1000,1000,400
400 V<I> = HrIIa**2
m= II -I
K = MHXO <NBEGPl.IRBS~LO<I>~-M+1)
L = “IN0 INENO,I) - ,
IF <t-L> 500.500,1000
500 00 800 J = IrL
IF <LD iJ+l) ) 800~800~600
600 HIJ2 = HsM*J1..2
V’I, = ‘$‘I> + fiIJ2
V<Jl = V<J, + FzIJ2
8 00 CONTINUE
1000 tONlINUE

c FHCTOPIZHTIUN SECTION
1:
00 4000 J = NbEGPlrNEND
c
C COMPUTE CU SUPEROIRGONF1L ENTRIES OF J-T,, COLU,,,, OF U,,
c IF UNCON‘:TRRINEO
c
JJ = LDfJ+Ia
IF <JJ) 4000.4000.1200
1200 D = HB’J,,
JMJ = IHB:rLD<J, >
Jli = JJ - JMJ
hU = JK - 1
IF tCU.EQ. 0) GO TO 2200
DO 2000 E = 1,y.u
I = J - JY + K
V ,‘b, > = 0.0
II = LD’I+l)
IF (III 2000~2000.1800
LB00 ,I = “IN0 III-IHBS,LDrI,a,k, - ,
I, = JMJ + c
V’IO = HOI,> - DOTPRD IH~II-M>,V’C-llj,fl)
H<IJ, = V*k.>.RtII>
2000 CONTINUE
c
c COMPUTE OIRGONRL ELEMENT D TJ)
c
0 = D - OOTPPD <AtJMJ+I),“.KU,
c
c SINGULRPITY TEST
c
2200 TOLROW = 8. +EPSMFIC*SQRl r” <J> >
IF CABS (0). GT. TOLROW) GO TO 2500
IF <SINGfiB> GO TO 6000
0 = TOLROW
2500 R<JJ, = 1.0/D
C
c UPDRTE DETERIIINANT IF OETCF IS NONZERO
C
-3000 IF <OETCF.EQ. 0. 0) GO TO 3500
OETCF = DETCF*O
3200 IF <ABS (OETCF) .LT. 1.0) GO TO 3400
DETCF = DETCF*. 0625
IDETEX = IDETEX + 4
GO TO 3200
3400 IF (FIBS (DETCF) . GE. .062?5) GO TO 3500
DETCF = DETCF.16.
IOETEX = IDETEX - 4
GO TO 3400
C
C POSITIVE DEFINITNESS CHECK (IF POCHEK = .TRUE.)
C
3500 IF <Q.GT. 0.0) GO TO 4000
NEGEIG = NEGEIG + 1
IF (POCHEK> GO TO 6500
4000 CONTI~~UE
C
C SRVE FFICTOPIZRTION IF IRFILE NE 0 AND N - NEND
r
IF fIRFILE.EQ. 0) GO TO 5000
IF <NEND.NE.NI GO TO 5000
WRITE <IAFILE> 07 (J, ,J==,,NWR>
IF (ICONO.EQ. 0) GO TO 5000
C
C MATRIX CONDITION ESTIHRTION
C
K=O
nwax = 0.0
DO 4200 I = 1,ICOND
C
C SET UP A RANDOM DHS VECTOR IN V
C
CRLL SKYRD” <VI NWA. 0.0, K)
C
c SOLVE FOR V AND DC, ONE CYCLE OF ITERATIVE REFINEMENT TO
C OBTRIN 2-NOR(1 RELRTIVE SOLUTIOW ERROR IN DELTA
C
CALL SKYSOL (A, Nr LD, DOTPRD, 01 -1, VI V<N+l>r
. 1, IRFILE, V<2*N+l>, DELTA)
DMRX = AMRXl IDELTA,OMRX>
4200 CONTINUE

c” NOW ESTIMRTE’C<@) FROM LARGEST OELTR RND MRCHINE PRECISION


C
RCONO = DMAX/ < (1. O+D"AX, .EPSMRC)
C
5000 RETURN
20 C. A. FELIPPA

1: .

C.
1: .
I‘.
I: .
z.
4: l
4: .
C.

c*
C.
C.
c*
c.
,: .
1: . WHERE [BF, RND [BC, RYE PPE:CRIBED FtND THE FREE-FFEE POPTION l
c. b3FFl HH: BEEN PPEFHCTOPED INTO CLFFI [DFFI [IJFFI 81’ ;kYFHC. .
c. IIrKE THE CONiTFHINEI! CH’E ENBOI1IEI THE UNCONSTEHINED ONE. THE t
c. FROZE:: DESCFlPTION BELUbl A:‘,LI,,ED H i,,NiTRHINED ‘IITEN. l

C. l
C. .
1: . l

C+ THE IOLUTION PROCESS IN ZC’iSOL CON51STS OF UP TO :I): STHGE? - .


C. l
C. 1. FHS NODIFICATION : tBF1 IF REPLRCED BY [BFI - CRFCI [XC,. .
C. THIS STEP IS SKIPPED IF THE LINEFIR SY?TEM IS UNCONSTRAINED .
CO OR HONOGENEOUSLY CONSTRAINED <[XC1 = CO,,. .
c+ l
C. 2. FOYWRPU PEDUCTION: THE TRIFlNGULRP SYSTEN [LFF, [ZF, = CBF, .
C. I? COLVEP FOP [ZFl l
C. l
C. 3. SCRLING : THE DIAGONRL SYSTEN tDFF1 CYF, = KZF, IS SOLVED .
C. .
c. 4. BACKSUBSTITUTIOfl : THE TDIANGULRR SYSTEM LUFF1 C%FI = CYFl .
c+ IS SOLVED FOR CAFI .
CO l
c. 5. ITERRTIVE REFINEMENT : IF HRGUMENT IFEF GT 0, THE RESlDUHL .
c. [RF1 = CBF, - [HFFI tXF1 - [HFCI [XC, IS COMPUTED USING
CO HIGHEF PRECISION HPITHMETIC, FlNIt STRGES 2-4 FEPERTED TO
C. %ILVE [AFF, CDXF, = CRFl lNOTE THAT CRC1 = tOI,. THE
C. COFRECTIQN CDXFI I; HDnER TO [XFI RND THE PROCESS FEPEHTED
C. IREF TIMES.
c*
C. 6. CONSTRAINED FHS RECOVERY: CBCI = CACFI CXFI + [KC, [XC,
C. IS CRLL‘ULATED IF REBUESTED <SEE INPUT APGUNENT 1810
CO
C....+.*..+.*rr............*...*........*.*...*..*.*.*.....**...........
C. -__-__---_---- .
CO - CI;HGE- l
C. ----_-_--_-_-- .
c. l
C.... 1. INPUT RR‘UNENTS - l
C. .
c* R OUTPUT MRTRIX FACTORS PRODUCED BY SKYFRC .
C. .
C. N SYSTEM ORDER l

C. l

C. LD IN+I,-WORD RFDRY OF DIRGONAL LOCRTION POINTERS .


C. .
C. DOTPPD ENTRY POINT OF INNERPRODUCT FUNCTION KF, SCYFHC’ +
C. .
C. IOP OPERRTION CONTRDL FLAG : l

C. .
c* IOP = 0 : NOR”RL SOLUTION PROCESS .
C. IOP =-I : EXECUTE STRGES 1-2 RND EXIT (USEFUL l
c* IN CERTRIN SUBSTRUCTURING APPLICATIONS~ l
C. IOP = 1 : EXECUTE STFlGES 3-4 AND EXIT (USEFUL .
C. ON STARTING RN INVERSE ITERATION PROCESS,. .
C. l
c+ IBX FLHG CONTROLLING (IUTPUT CONFIGURRTION OF ARRRY B. L
CO .
C. IBX = 0 : B RND X RRE IDENTIFIED IN THE CALLING .
C. PROGRRN. THE SOLUTION VECTOR X THEN OVERWRITES 8. +
Solution of linear equations with skyline-stored symmetric matrix 21

c* THIS OPTION MRY BE USED ONLY IF .


C* 0% THE SYSTEM IS UNCONSTRRINED. OR HOMOGENEOUSLY .
C* CONSTRAINED WITW NO RECOVERY OF CBCI DESIRED .
c* <S> NO ITEPRTIVE PEFINERENT REQUESTED <IREF=U> l
C* l
c* IBX = -1 : B RND X RRE NOT IDENTIFIED IN TWE l

C* CRLLINCI PROGRRM BUT CONFUTRTION OF EBCI IS ND1 l


C* DESIRED. l

c+ .
c, LB)! = 1 : B AND X FlPE NOT IDENTIFIED IN TWE l

c* CHLLING PROGRAIl RND RECOVERY OF CBCI IS REQUIRED. l

C. .
C1 NOTE - IF THE INPUT SYSTEM CONTRINS NONHOK16WEOUS .
C. I.ONITPAINTC, IBX NUST RE -1 OR +lr I.E., ARRRYS .
c. Et AND ,< MAY NDT SHFIRE THE SANE STORRSE SPACE. .
c. .
CC IPEF IF GT 0, PERFDR” IREF CYCLES OF ITERATXVE .
CI REFINE”ENT OF THE SOLUTION VECTOR. IN PRRCTICE l
c* !,NE SHOULD NOT REQUEST IREF GT 1 Uht_ESS THE .
c. ENTRCE; OF ‘RI HRPPEN TO BE EXRCT NUNBERS l

c* l

c* IHFILE LOGICAL UNIT CONTRINING COPIES OF CR1 AND ITS .


WCTORI’HTION <SEE TKYFACI. REQUIRED IF IREF GT 0 .
;: .
i. v .;C@AICH FLOHTIN6-POINT ARRAY OF LENGTH 2*N .
C+ TO BE U-ED IN ITERHTIVE REFINERENT PROCESS. .
CC NRY BE A DUMMY RRSUMENT IF IREF = 0. .
f. .
C.... 2. INPiJT-OUTPLIT AFlGUMENT’ - l

c. l

c+ B ON INPUT, HRRHY E CONTAINS PRESCRIBED COMPONENTS .


c. OF CB1 HND IX,, I.E., IF THE I-T” EWURTION IS FREE l
C+ rCONSTRRINED> I EtI, ‘ZTORES THE RHS <LNS) VRLUE. .
C. THE OUTPUT CONFIGURRTION OF B IS CONTROLLED BY .
1:. INPUT FLHS 16): <SEE INPUT ARGUMENTS>. .
c* .
;:,.+ 3. OUTPUT RRGUMENTS - .
l
c. x CDMPUTED X?LUTION VECTOR l

C. l
C+ DELTFI IF IREF 67 0, RRTIQ OF LRST CURRECTION LENGTH .
0. TO FII,AL XLUTION LENGTH. NOT UiED IF fRfF = 0. l
1%. .
C.... 4. COMFION INPUTS - .
C. NONE. .
1:l .
Ct... 5. COMNON INPUT-OUTPUTS - .
c+ NONE. l
c* .
C...+ 6. CONNON [IUT~UTS - l
C-+ NONE. l
c+ .
C.... 7. INPUT FILE- ., - l
c+ .
c* IHFILE 3EE IUBROUTINE ;Fr’FRC. l
c. .
C.I.. 8. JUTPUT FILES - .
C. NONE. .

z:...?.
C.
SCRATCH FILES -
NOI+E.
.
.
.
C. l
C.1.. 10. PRO&RR” SUBROUTINEi - .
CC DOTPRD, X’YMUL l
C. l
Cr... II. LIBRHR’i’ JUHROUTINE6 - .
c. :DPT, FORTRAN BINHRY I/O .
c+ .

f
c T 7 P E HND D I N E N ? I J N I T H T E M E ‘l T ”
C
INTEGER LD’l)
YEHL RI11 I Bll>r XI, BXFRC, DELTR
DEHL PNOWN, ‘i < 1 > , x*.1,, Xl, XNORM
EQUIVALENCE rBI.:xI,:wORN~
C
C INITIHLI~ATION
C
HS”IGN
a 3100 TO NEXT
hREF = 0
B.eHC = *.*
IF IIBX.EQ. Ot al TO 280
BXFAf = 1.0
DO 150 I = ItN
150 x <I ) = B < 1 )
100 IF iIOP.GT.0, 130 TO 1800
1F <IBX.EQ. 0) 50 TO 1100
C
C RHP N 0 D I F I C H T I 0 N
C
DO 1000 I = 1.N
II = LDfI+l>
IF III> 3*0* 1OOOt 1000
300 BI = BfI,
IF <DI.EQ. 0.03 GO TO 1000
II = -11
K = I - II + IABS<LD<I,> + 1
DO 900 J = KIN
JJ = LD(J+li
IF <JJ> 900.Y0~,400
400 M=J-I
IF tN> 50”,600,d00
500 x1,, = xc.0 - A~II+M>*BI
6D TO 900
6(30 IJ = JJ - N
22 C. A. BLIPPA

IF ‘IJ-IHBSrLD(JI~> 900,900,*00
8UO X<J, = xc,> - ATIJ>.BI
900 CONTINUE
1000 CONTINUE
C
C FORWHRD 5 U E 5 T I T CI T 1 0 N PHI’
C
1100 DO 1500 1 = IrN
II = Lncx+1,
IF III, taoo, 1200.1300
1200 XTI, = 0.0
GO TO 1500
1300 IMI = IRBS(LD<I,,
M = II - IMI - 1
XII> = Xii, - DOTPRD ~RII~I+l,rX,,-~‘,M)
1500 CONTINUE
IF cIOP.NE.0) GO TI1 SOOCl
C
C TCHLING P-SC
C
1800 no 2000 I = IrN
II = IfiBxrLntt+i,,
2000 X<I> = A<II,*YcI.I
c
,; B H 1:’ /, : 1, B Z T I T 1, T I J E, PHZ3

I = PI
DO 3000 i = IrN
II = ia*r+u
1F ,,I,, 22uo.2’BOo.240,:,
220n .A II I =
BXFAC.B I Ii
GO
TD 8:300
2400 M = II - IHBSacI,, - I
IF <“.EO.
0, Gil TO L2800
no 2’500 J = t,n
:(.I-J’ = <*.I-,, - +?,,*-_,,.:?:,I,
2500 CONTINUE
2800 I =I - I
3000 CONTINUE
IF sIB:X*IHFILE.EQ. 0, GO TO 4000
GO TO NEXT, i31OI>. 3500,
c
c I T E P H T I ‘I E P E F I II E M E PI T ; E C T I 0 N
c
3100 E:REF = lPEF + 1
IF I~REF-IR~F, 32,,0,3500.4u0l3
i
c CALCULATE RESIDUAL ‘VECTOR [RI = [Bl - [HI [Xl LI:INl: SKYMUL.
I‘ WJ RETURNS IN .?r HNn OLD [Xl IN V
c
3200 REWIND IHFILE
NW = IFIBS rLn n,N+l> )
REHn <InFILE) ~,H’Jl,J=,rNWHI
CRLL iKY”UL ‘.A, N, Ln, X. ‘<, -I, 8, ‘“‘)
C
c 50LVE FOP CORRECTlO,, CI1:*:, sUHICH FlPPEHRZ IN Y’r CORRECT
C OLD :,,LUTION RNn EVHLIJHTE 2-NDR” RELHTIVE ERROF UELTA
,.
RERn I
IHFILE) *‘HIJ~,J=~,NWH)
B%FAC = 0.0
HSEI‘N 3500 TO NEXT
GO TO 1100
3500 XNORN = 0.0
PNORN = 0.0
no 3800 I = 1,N
PrlOPM
= RNORM + i~.Il.XcI,
lirl> = V,‘I) + .<<I>
XNOP” = SNOP” + .S<I,.X~ll
3300 CONTINUE
DELTA = 0.0
IF <XMORM.NE. 0.0) DELTA = CORT <RNORM, XNORPI)
IF <KREF-41 3100r3100~4000
C
C CaN;TPHINEn PH3 R E C 0 V E R Y
,-
-4000 IF <IBY.LE.O~ GO TLI 5000
no 4800 I = 1.N
II = LncI+i>
IF ~11) 4200.4200r4S00
4200 IMI = IRBs~Ln~I)~
M = -II - 1111 - 1
B<I, = DCITPRD ,HllMI+,brX,r-n,,n,
DO 4600 J = IIN
I, = IRBS’LD~J+~;~ + I - J
IF IIJ-IRB~TLD~JI,, 4600.460074400
4400 B<,> = BrIl + H<IJl.ll(J>
4600 CONTINUE
4soo CONTINUE
5000 RETURN
END

SUBROUTINE Sk.‘fWL <HI N, Ln, :“:, RX, IOP, B, R)


C
C THIS SUBPOUTINE POSTWLTIPLIES SKYLINE-STORED MATRIX [RI BY
C VECTOR [Xl. THE RESULT [WI IS PRODUCED IN DOUBLE PRECISION.
C FURTHER OPERRTIONS RRE CONTROLLED BY INPUT FLAG IOP :
C IDP- 0 EXIT AFTER OBTRINING [RX,
C IoF= I FORM RESIDURL VECTOR [RI = LB, - [RX, IN R
C IOP = -1 W,VE [Xl TO RI RND FORM LB, - [AX, ,N X.
C
C HRRRYS AX (n.P., RNn R MHY BE EQUIVRLENT IPI THE CALLING PROGRR”
C
DOUBLE PRECISION HXil>, HIJl FIX,
INTEGER Lnci)
RERL HII, I *cl,, XII>, i?(i)
C
Solution of linear equations with skyline-stored symmetric matrix 23

DO ~000 x =
1-N
II = IHB’ILD‘I+lI,
i
HXtI> = DBLEcH~II,,*DRLEiXrI,I
tl = II - IABScLDrI>> - 1
IF (ll.EU. 0) GO TO 2000
no is00 K = lrrl
J=I-k
AIJ = R\IX-K.I
,%<*.I, = AX(I) + RIJ*DBLE0ZIJ>)
R%<J, = RXrJ, + HIJ*DBLEiX*I>,
1500 CONTINUE
~000 CONTINUE
r
TF **[lp> 2500.5000.3500
ZOO DO 2800 1 = 1rN
Wl = iixtr,
!?-‘I, = %<I,
XCI, = m_E<B<l~~ - HXI
IF ,LDII+l) .LE. 0) x,1> = 0.
300 CONTINUE
GO TO 5000
3500 DC) 3300 I = f,N
P%Il = *BLE<Brl>, - Fixc1>
IF ~LDII+I>.‘E.O~ R<I> = a.
3300 CCINTINUE
5000 KETUFN
END

SUBRCOJTINE SCYRDA ‘VI Ns V(IERN, IffUR)


c
c THIS RaUIINE FILLS OUT THE N-WORD FLEIRTING-POINT RRRHY V WXTH
c PSEUDO-RRNDOM NUPlBERS UNIFORMLY DISTRIBUTED IN THE RANGE
c IVMERN-.S.VNERN+.S). FLRG IRDM NUST BE SET TO ZERO BEFORE THE
c FlRST CRLL TO SCYRD,, TO INITIRLIZE THE RFlNDO,, NUHRER SEQUENCE.
c
,,OTE - RNY ‘RERSONABLE’ RRNDOR NUNBER GENERRTOR WILL DO FOR
E THIS RPPLICATION. THE ONLY REQUIREPIENT IS THRT THE FIPST
TWO SIGRlFlCRNT DIGITS PRSS THE EYEBALL TEST. R RRTHER SFIALL
: ,,ODULE 120.16 = 65536) IS USED HERE 50 AS TO PRODUCE IDENTICFIL
C SEQUENCES IN ALL COflPUTERS WITH 32-B,T OR LRRGER WORD SIZE
C
REAL V(N)
C = VMEAN - 0.500
IF <IRDS.NE. 0) GO TD 300
ix = 26983
IRwl = 1
300 DO 500 I = 1,N
IX = MOD <97181+IX+13849,6S536>
x = IX
‘)(I> = .15258?89E-4*X + C
500 CONTINUE
RETURN
END

C...*.**.*.*.....*r,+rr+r,r**....*.******..**~...***...*..*..***.***.****..*
c+ SKYTEST - TEST PRDGRR” FEiP SIYFRC HND SKYSOL *
Cr+*.*.+*.**.**rr..*..****.**..*.***.**~*...*.*~*********.*.*..***..***.
C* c
C. A TEST CRSE CR3 [Xl = tB1 15 DEFINED BY SIX INTEGER PRRRflETEPS: *
C* .
C. ISKY [AI-SKYLINE TYPE INDEX : I = ‘RHNDOfl’ SKYLINE, *
Ci ? = FIXED-BRND, 3 FULL TRIANGLE .
C. l
c* N 3YSTEN ORDER : 2 THPU NflH:< (SEE DHTR STHTEnENTSl *
CO .
C. LEVC RPPROXIMATE NUMBER OF CONSTRRINED EQURTIONS IN .
c. INTEGER PERCENT <NO CUNSTRRXNTS IF LEVC = 0, .
c. *
C* ICOND A POSITIVE ICOND REQUESTS COMPUTHTION OF RN ESTIHATE *
CO OF THE SPECTRAL CLlNDITION NUMBER OF CR> USING ItDND l
C+ ‘RRNDDM’ VECTZIRS <SEE SUBRnUTINE SKYFAC> t
C‘ l
CO IPEF R POSITIVE IREF PEQUESTS IREF CYCLES OF ITERRTIVE *
c. REFINEMENT WHEN SOLVING FOR [Xl (SEE SUBROUTINE :CYSO,.I *
c. .
C. IDU IF NUNZERO, THE EXRCT RND COMPLITEB FACTOPtZRTION OF l
C. CA1 WILL BE PRINTED. *
CI *
C* IHE SIX PARRtlETERS IISKY,N,LEVC.iCOND,IREFIIIiUi ARE RERD FPllM l
C* CARD INPUT FILE 5 IN <6X4> FOR,,RT. ONE CRPD PER TEST. THE TEST .
c. DATR DECK SHOULD BE TERMINATED BY R BLRNK CARD. t
C. *
c. SKYTEST CRLLS FOUR RUXILIRRY ROUTINES: ;KYLDU, SKYMWP. SkYOPC *
C. RND SKYPRT, WHICH RRE LISTED AFTER SKYTEST. SAWPLE INNEIPRDDUCT +
c. ILlUTINES WHDSE ENTRY POINT NAHES <VIP%. VIP%,> RPE FRSSED IN *
C. ARGUMENT LISTS, RRE FiLSD LISTED. l
C* .
C, SKYTEST ALSO INVOKES THE TIMING FUNCTION CPTIME.. X = CPTIMEiO2 .
c. INITIRLIZES THE CPU CLOCK. X = CPTINE<I) RETURNS CPU TI”E IN l
c. FLORTlNG:POINT SECONDS ELAPSED SINCE THE LF,ST CPTIME<O) CHLL. *
CO THE USER SHOULD INSERT APPRUPIRTE REFERENCES TO NIS SYPTEN *
C. CLOCK RWTINES IF HE DESIRES TO TIllE SKYFRC. l
C* *

C IF TESTING ON CDC 6OOOf7000 SERIES, INSERT THE FOLLOWIPIG CRRD


C PRUGRRM SKYTEST <INPUT.OUTPUT~TFIPES=INPUTITAPE6=OUTPUT,T~PE2~
C
C DI%NSIONS OF TEST RRRRYS RRE R(NWANAX>, DUiNWAMHX,, B<NMRXk,
C BEX <NHRX> , DBEX <Ni,RX> , LD <NNRX+ 1) I X <Ni,RX) , XEX rN,,(RX> I Y <J.NllFtXI
WHERE N”RX = LRRGEST N, NWARRX = LRRGEST CR, STURRrjE ALLDCRTIDN
E CONCERTING NATRIX DISPLRY PARRHETERS IPPT. IUPLOW, SEE SKYPRT
C FOR FACT[fRIZRTION ARGURENTS IAFILE, PDCHEK. SINGRB, SEE SKYFRC
C
24 C. A. FELIPPA

DOUBLE PRECISION DBEX<,OO)


EXTERNRL VIPSS, VIPSD
INTEGER BLRNK, CMHRK, LD<lOl>
LOGICAL PDCHEC, SINGHB
RERL R(2000,. DU<2000,
RERL B<lOO>, BEX’lOO>. ‘V<JOO~, X<lOOl, XEX<lOO,
DATA BLANK ,‘1H ,I C”RRK ~IH.,, IRFILE J2,
DRTR IPRT ,2x. IUPLOW 2’2,
DATA NMAX /100/r NWRNRX ~2000~
DATR PDCHEK ..FRLSE.,, SINGAB ,‘. TRUE. /
C

C RERD TEST PARRMETERS FROM CARD FILE <UNIT 5)


C
100 RERD <5r10> ISK’l, N, LEVC. ICOND, IREF, IDU
IF (N.LE. 0) STOP
WRITE t6,20> ISKY, N, LEVC, ICOND, IREF. IDU
IF <N.GT.NNAX> GO TO 5200
IRDN = 0
C

C BUILD TEST S Y S T E M
C
C CONSTRUCT DIAGONHL LOCATION POINTER RRRRY IN LD
c
LD(,> = 0
,F (ISKY-2) . 600,500.400
C ISKY= : FULL SYMMETRIC MATRIX
400 DO 450 I = LIN
450 LD<I+l> = LD<I) + I
GO TO 1000
C ISKY= : FIXED-BRND NATRIX (HALFWIDTH M = MAXO<BI O.J*N))
500 M = MAX0<3,2.N15)
DO 550 I = 1111
550 LD<I+,, = LD<I, + NINO<I,M)
50 TO 1000
C ISKY = 1 : ‘Rf,NDOM’ SKYLINE
600 CALL SKYRDM <VI N, 0.5, IRDM>
C = O.G*FLORT(N)
DO 650 1 = 1,N
K = RNRXI (C.VII>, 1.000*>
650 LD<I+l> = LD<Ij + NINO<I,KI
1000 NW,? = IRBSrLD<N+l))
IF <NWA.GT.NWAMRX) GO TO 5400
C
C MHRK HPPROXIMATELY LEVC.NllOO CONSTRAINTS
C ‘RANDOIILY’ ON LD IF LEVC IS NONZERO
C
IF <LEVC.EQ. 0) GO TO 1500
CRLL SKYRDM (VI Nr 0.5-O. Ol*FLORT(LEVC) I IRDFO
DO 1200 I = 1rN
IF <V(I).LT.O.O> LD<I+,) = -LD(I+l>
1200 CONTINUE
C
C SENEPRTE TEZT CD1 HND [ill IN RRRRY DU
C
1500 CRLL ‘ShYHDM <DC,, NUH, 0.0, IRUM,
DO 1600 I = l,N
II = IRBS<LDcI+l)r
1600 DLlrIIl = ,C..DU<II,
IF <IDU.EQ. 0) GO TO 2000
WRITE (6725,
CALL SYYPRT !DU, N, LDr IJPLOW, CHF12.6,, IPPT)
C
RSSEMBLE MHTRlX CR, = CL1 CD1 GUI
r
2000 CRLL SKYLDU rDU, R, N, LD, Vr ‘VIPSD)
WRITE (6.30)
CRLL SKYPRT <A. N. LD, IUPLOW, 6HF12.6.r IPRT)
WRITE c6,32.,
CRLL SKYMRP tR, Np LD, IUPLOW, IPRT,
CRLL SKYOPC (0, NI LD, KOUNT,
c
c GENERATE RRNDOM LHS VECTOR IN XEX HND RSSOCIHTE RHS VECTOR
C [BEX, = IF!, [XEX, IN DOUBLE PRECISION
C
CRLL PKYRDN <XEX, Nt 0.0, IRDM)
CRLL SKYNUL <RI N, LD, XEX, DBEX, 0, DUNMY, DUMMY)
C

C S V ‘i F H C TElT
r
DETCF = 1.0
DUNNY = CPTI”EtOl
CALL SYlFAC CR, 0, N, N, LD, V, VIPSS, SINGRB, PDCHEK,
. ICOND. IHFILE, RCOND, DETCF, IDETEX, NEGEIG. IFRIL,
TOP = 1. E6rCPTIME 111 /FLORT <KOUNT)
WRITE q6.50, SINSRB, PDCHEK, IFRIL. DETCF. IDETEX, NEGEIG
IF <IFHIL.NE. 01 GO TO 100
WRITE r6,54, KOUNT, TOP
IF <ICOND.NE. 0) WRITE ~6.56) HCOND
IF <IDU.EQ. 0) 50 TO 2200
lWPITE (6,60>
CRLL ‘KYPRT (H. N, LDI IUPLOW. 6HFl2.69, IPRTl
c
c SKY:OL TEST
C
C 3ET UP SINGLE PRECISION RHS VECTOR I:
C
2200 DO 2500 I = 1,N
BEXrI, = DBEX(I>
B<I, = BEX(I>
IF rLD<I+l>.LE.O) B(I) = XEX<I>
2500 CONTINUE
C
Solution of linear equations with skyline-stored symmetric matrix 25

c SOLVELINERR SYSTEM RND PRINT RESULTS


c
CALL SKYSOLw,, N, LD, VIPSS, 0, I, B, X, IREF, IAFILE, V, DELTR)
WRITE (6170,
ENllPM = 0.0
XNORM = 0.0
DO 3200 I = 1.N
XNOR” 3 XNORM + Xll,.X<I,
XERR = XEX*I> - ,-:<I>
ENORM = ENODM + XERP.XEPR
BERR = BEXcI) - BtI’
MhRk = BLRNK
IF <LDrI+l,.LE.O> MRRK = CMhPh
IWRITE (6.72, IrMHRbr BEXrI)rPcI*.BERP, XEXrI~,S,I~,AERP
3200 CONTINUE
:XERP = SQRTcENOP”+XNOPM,
WPITE t6.741 .<ERR
IF rIREF.EQ. 1) ldRITE t6r76, IlELTR
GO TO 100
C
C DIHGNOSTICS FOR ILLEGFlL TEST PHHAMETERS
C
5200 WRITE t6,82> PI, NMAX
GO TO IO0
5400 WRITE (6.86) NUH, NulAMhX
GO TO 100
C
1: FORflAT SThTEMENrS
C
10 FORMAT (614,
20
. llH. C-LEVEL = 13. 22H O-O, lCOND,!REF,ID” = I2rlH,.I,,,H,,I,~
.5x 67<1H-) )
25 FOPPIRT <, ‘5XZ”TEST CDINV, HND CL11 : I
30 FORnAT !,‘%3lHTEZT MHTRIX CR, = CL, CD, [“, : >
32 FORllRT ~I’~;(~OHSC*LINE MHP OF CRI :I
50 FOHRRT i,’ ‘SA27HSKYFRC EXECUTED ,JITH IINGRB = ~3. Ilk,, PDCHEb = L3,
. SXPHIFRIL = 14,16H, DETERMINANT = FlS.:.dH . 2.. 14,
5X22HNEGHTIVE EIGENVRLUES = 14,
54*FORllhT ~SX17HOPERRTION UNlTS =I9/
. 5X20HhVG TI”E,OP l,NIT = F8.2r9H MICROSEC)
56 FORFlhT t’5A 34HF(hTRIX CONDITION NUNBER ESTIMRTE = lPG12.3)
i0 FORMRT rl4XlSHCOMPUTEP FRCTOPS :)
70 FORMAT r/15:<43HShYSOL TEST RESULTS ‘0 = CONZTRHINED EQS) : ‘,
. 2X 2HEQ BXTHESRCT B 5X7HCUNF. B 3:-: 7HB-ERROR 4:i 7HEXhCT N
. 5?: 7HCOMP. .X 3X TN’<-ERROR a
72 FOPMAT ~‘l:~rI3rRlr2F12.3,,PE~O.l~~~PFll.~,Fl2.7,~~E,O.1~
74 FORMRT < ‘5A3SHHCTUHL RELRTIVE ERROR OF COMPUTED [X3 1PE12.2,
i6 FORMRT < 5X3YHESTIAATED REL. ERROR qIF UNREFINEII [Xl lPE12.2)
82 FORMRT (,14H . . . ORDER N = I4r15H EXCEED’ NNRX = 14,
86 FOR,,hT r25H . . . H-IIRTRIX WORDS NWH = 15r17H EXCEEDS NYRFlRX = 15)
END

;VBPOUTINE SCYLDLl #HFRC, R, N, Ln, ‘i’r DOTPRD,


c
C GIVEN MHTRIX FRCTORS CDINVI RND [Lll ‘TORED IN hRPRY BFRC,
C THIZ iUBROUTINE CONPCITE: [HI = [L, CD1 CIJlr WHERE CL1 IS
C THE TRHNSFOSE OF [Ul
C
REHL RF,%<,,, Htllr ‘~*I>
INTEGER LDO,l,
c
DO 4000 J = IrN
JFlJ = IHB~~.LU<JI>
JJ = LDnJ+I,
IF (JJ.LE. 0) GO TO ?OOO
JK = JJ - JMJ
V~JKI = I.OIHFHC<JJ~
DO 2500 K = 1,JK
IJ = J”J + C
I = J + IJ - JJ
II = LD(I+I>
IF (II.LE.0) GO TO 2OOO
IF <I.NE. J, VIK) = RFhC(IJ)/tiFRC(II>
,, = “IN0 <II-IHB”<LDiI)>,K) - 1
F,<IJ> = V<K> + DOTPRD rhFRC~~I-n,,V(K-fl,rn)
GO TO 2500
2000 hcIJ, = FIFt3CrIJ>
‘v’<K , = 0.0
<so0 CONTINUE
GO TO 4000
3000 JJ = -JJ
II = JMJ + 1
DO 3200 IJ = II.JJ
3200 ha:IJ, - RFRC<IJ,
4000 CONTINUE
RETURN
END

SUBROUTINE SKYOPC <NBEG, NEND, LDr COUNT)

RETURNS NUMBER OF qPERRTION UNITS <KOUNT> REQUIRED TO


C FRCTOR h SKYLINE-STORED SYMMETRIC MhTRIX FROM ROW
C (NBEG+i, THRU NEND (EHCH N-WORD INNERPRODUCT IS
C COUNTED AS M OPEPRTION UNITS>
c
INTEGER LD(l>
KOUNT = 0
NBEGPI = NBEG + 1
DO 4000 J = NBEGPl,NEND
JJ = LD<J+L)
IF (JJI
26 C. A. FELIPPA

IuBPOUrINE Ir\NHP *h, N. LD, IUPLOl,,r DEVICE>


c
c IGENEFHTE” h TENPLHTE FIHP’ OF R LD-1‘k.‘fLlNE-:TOYED PIRTPIX CA1 OF
4: OF’DEP N. :‘>‘“1I:DLi +s-, 0 DENOTE PO’ITIVE,NEGhTIVE,:EfO ENTRIES
c
c IllFLOG = 1 : PPlNT “HP OF CIPPEF TPIRNGLE
C IUPLOLI = 2 : PRINT FlHP OF LOGlEP TRIHNGLE
c ItE’.;‘ICE = 1 : FOPMHT PPINT FOP 72-CHHPHCTEP TELETYPE
c DEVICE = 2 : FOPMHT PRINT F[lR 128+ CHHRRCTEP LINE PPINTEF

REAL ht1,
INTEGER RLhNb 7 CFLHG, C”AEk, DEVICE, NEGRT, POSIT, ZERO
INTEGER La’l!, PlJU160~
DHTA BLHNk,CmARC,POSIT,tiEGRTI:EPO /lH , I!,.. lH+r I,+r IHO,
c
KCMHX = MRX0~30,‘3OrDEVICE>
1000
JREF - 0
1100
JBEG = JPEF + 1
JENR - HINO <JPEF+YC,,AX,N>
kC = JEMD - JREF
JREFPS = JREF + 5
WRITE <6.30, (J. J=JREFPSr ,END,S>
30 FQRRRT 1,7X12,10)
DO 1300 J = JBEG.JEriD
I = J - JREF
ROW\Il = BLRNC
IF (LD(J+l).LE.O, ROWrl) = CMARK
1300 COPlTINUE
WRITE (6,401 tROW<J,rJ=,.bC,
40 FORMHT <8X 60R2,
IBEG = 1
IEND = JEND
IF <IUPLOW.EQ. 1) GO TO ,500
IBEG = JBEG
IEND = N
1500 DO 4000 I = IBEG.IEND
DO 1600 J = lrKC
1600 ROW tJ> = BLHNC
CFLRG = BLhNh
II = LDiI+l>
IF (II.LE.0) CFLHG = CMHYI
J1 = I
J2 = JENIl
IF <IUPLOW.EQ. 11 GO TO ,800
II = IhBS\II>
J1 = I + IhBS(LD(I>’ - I, + 1
Jl = MAX0 rJl.JBEG>
J2 = MIPlO <l,JEMD)
IF lJ.?-J,, 4000, *Boo, lSO0
1800 DO 3000 J = JlrJ2
k = J - JREF
M=J-I
I, = II + II
IF <IUPLOW.NE. 1) GO TO 2000
IJ = IRBS<LD(J+l)a - M
IF !IJ.LE.IABSrLD~J>>> GO TO 3000
2000 IF (h<lJ,> 2200.2400,&00
2200 ROW<K, = NEGRT
GO TO 3000
2400 ROW ib.) = ZERO
GO TO 3000
YOWtkl = POSIT
3000 CUNT 1 NLIE
WRITE t6.60) I, CFLHG, <ROW (h> I K=, I KC>
4000 CONTINUE
60 FORMRT <lX14.‘,3.60R.?>
JREF = JEND
IF (JREF-II) 1100.5000,5000
5000 RETURN

?W.FOIJTINE IhYPPT ‘H. II, LD, IsIPLOU. F”T, IiEVlCEl


c
PRINT LD-:b,‘LINE-ITOPEU iPHPSE “RTPIX R OF OPDEF N.
:
c ILlPLObl = 1 : PRINT IIPPEP TRIANGLE ‘C’ILINE
c IUPLOCl = 2 : FRINT LDIJER TRIRNOGLE 5k YLINE
c DE?‘ICE = 1 : FOPb,AT PRINT FOP :2-CHHP TELETYPE (TI”E:HRFE W[IRb )
L “E’rVICE = 2 : FOPFlRT PRINT FOR 128+ CHRP LINE PRINTER ‘BHTCH RUN,
c
c MATPI:< ENTPIE: HPE PPlNTED H‘COPDINS TO E,F OF 6 FOR”HT
c OF I,IIUTH I2 (E.G. Ei2.4, Ph;FEU THPU fiRGI_I”ENT FMT
c
INTEnSER
INTEGEF’
INTEGER
DHTH
DhTa
IlhT”
.
c
Solution of linear equations with skyline-stored symmetric matrix 21

P:Cr!HX = mwo 15, S.DEVICE,


lo00 JREF = 0
C
c SET COL PRINT PHNGE idBEG TO JEND) RHD LIST COL IDENTIFIERS
C
IlOO JBEG = JREF + f
JEND = MINO <J@EF+KCMHX,NI
kC = JEND - JF’EF
DO 1300 _I = JBE‘,JEND
I = J - JPEF
IDCONS< I, = BLANC
IF rLD<J+i)> ,200rl2OO, 1300
1200 IDCONS = CMHYC
1300 CONTINUE
WRITE <6,40, <C(ILLRB,J, IDCONS<J-JREF> , J=JBEG, JEND)
40 FOYM(RT ),‘14X 10’43?14rR1,4X>)
c
C ;ET ROW PRINT RRNGE (IBEG THF’U IEND,
C
IBEG = 1
IEND = JEND
IF IIUPLOW.EQ. L> 60 TO 1500
IBEG = JBEG
IEND = N
1500 Do 3000 I =
IBEGrlEND
KR = 0
IF ~IUPLOW.EQ.2I 50 TO 2000
DO 1600 c = f.KC
c PPEPHRE I-TH ROlrl OF UPPER TRIRtiGLE
RUWF,,TrK+3, = LKIPI~)
J = JREF + C
M=J-I
IF cM.LT.0, GO TO lliO0
IJ = IfiBS’LD’J+l)) - M
IF IIJ.LE.IHBS<LD<J,,, GO TO 1600
POWF,,T*h+3, = FMT(1,
kR = hP + 1
ROUcKR, = Ro:I.J,
,600 CONTINUE
IF ‘kH, 3000,3000.2500
5 PREPRRE I-TH ROW OF LOWER TPIHNGLE
2000 II = IHBS<LDrI+,>I
M = II - IAB?<LD~~I~~ - 1
,I = MRAO <I-WrJBEG,
J2 = “IN0 #:I, JEND)
L.R = J2 - J1 + 1
IF II;P> 300o,3000,2l00
2 100 r = 11 - .lBEG
ROWFNT~JI = TTIPth+l’
POWFMTtS, = 4H 20
ROWFMTa.G> = FpITc,)
IJ = II - Jl I +
DO 2200 K = lrrR
P,,W<r, = RaI.J>
2200 I? = IJ + 1
i
c LIST I-TH POW
C
;‘s*i, TFLHG = RLHNC
iF-‘;D~x;il.Ll.O> SFLAG = CUARK
WF’ITE IG,ROWFMT, POWLHB,I,CFLHG, <ROW<J,rJ=1.CY,
3000 CONTINUE
4000 JPEF = JEND
IF (JPEF-PI, ,10*,5000.5000
5000 PETURN
END

RERL FUNCTION VIPPE <HI Bl Na


c
C :HMPLE INNERPRODUCT FUHCTION PROCEDUPE SERVING SKYFAC RND SKYSOL.
SINGLE PPECISION ACCUflClLATION VERSION (RSSEMBLY LRMGURGE
c
C SHOULD BE U?ED IN HCTUHL IMPLEME~TRTION ON fi GIVEN MRCHINE)
C
PEAL fir,,, B<il
‘VIPS: = 0.0
IF tN) 5000,5000,200
200 DO 500 I = l.N
500 VIPSS = ‘VIPSC + A~I>.B~I~
5000 PETURN
ENU

RERL FUNCTION VIPTD CR. B, PO


C
c SA,,PLE INNERPPODUCT FUNCTION PROCEDURE SERVING SKYFAC RND SKYSOL.
C DOUBLE PRECISION RCCU,,ULHTION VERSION (ASSEMBLY LANGUAGE
C SHOULD BE USED IN ACTURL IMPLEMENTATION ON 1 GIVEN ,,RCHlNE,
h
RERL A<l,, B(l)
DOUBLE PRECISION UM
SU” = O.ODO
IF (PI> 1000.1000.200
200 DO 500 I = IrN
500 SUM = SU” + DBLE(AtIl)rDBLEtB(I))
1000 VIPSD = sun
5000 RETURN
END
28 C. A. FELIPPA

... TEST EXRMPLE ...

SKY-TYPE 1, ORDER N = 20, C-LEVEL = 30 O/O, ICOND.IREF,IDU = O.l,O

TEST NATRIX CR1 = CL, CD, [Lb, :


COL 1 COL 2 COL 3 COL 4 COL 5
ROW 1 .125876
ROW 2 018694 -1.770384
ROW 3 :017722 -. 177671 .611516
ROW 4 .013656 -. 135824 .212633 -. 382484
ROW 5 .230813
ROW 6 044013 -.326797 -. 077390 -. 151699 -.042492
ROW 7 -:061730 .720432 119363 067160 -.089312
ROW 8 -.052174 .053372 : 182684 -: 036890 -.016849
ROW 94 -. 298889 .105057 -.240814
ROW 10. .319443 -.015320 -. 196823 .362091 .208542
ROW 11 -.008196 -. A46509 -. 209992 -. 145353 -.093933
ROW 12 -. 077434 -.054065
ROW 16, .473480
ROW 17 .040587 -.011119

COL 6 COL 7 COL 3 COL 9. COL lOI


ROW 6 .174217
ROW 7 .029194 -.320265
ROW 8 -.031293 082017 1.032168
ROW 9r -.359695 :329712 110855 5.821777
ROW lo* -.412109 -.333603 -: 443243 166977 -3.020508
ROW 11 -.039510 .272368 -.417660 :375198 .478058
ROW 12 .085142 -. 035472 -.411774 -. 000900 -.258881
ROW 14 .025108 -. 013899 .238645 -.318405
ROW 15 .040987 - .044449 047058
ROW 160 -.122696 .213440 -. 277634 -. 149384 -:182816
ROW 17 -.023942 .026407 .446950 115341 .300110
ROW 19. .365494 -.302399 -: 287247 -.441345
COL 11 COL 12 COL 13 COL 14 COL 15
ROW 11 .079424
ROW 12 .144593 .494019
ROW I3 1.048912
ROW 14 -. 061659 -. 090900 - .34 0589 .373713
ROW 15 .043387 -. 156782 -. 042077 018601 -.050121
ROW 16+ 101807 .417618 .480682 -:361099 172791
ROW 17 -: 098354 -.200029 .250496 -. 053287 :016881
ROW 18 -. 005294 052201
ROW 19. .007034 .410675 -.230179 -.279541 :006973
ROW 20 -.0x4154

COL 16* COL 17 CDL 13 COL 19* COL 20


ROW 16. -2.709717
ROW 17 -. 282257 .689583
ROW 18 -. 184418 -. 157687 .269398
ROW 19* -.248322 -.416275 .439880 -6.405029
ROW 20 -.236160 .048782 -. 058580 .254974 -.17989,

SKYLINE MRP OF [A, :

5 1 I> 15 ‘0
. * l .

1 +
2 +-
3 +-+
4 +-+-
5 +
6 +--__+
3 -+++-+-
3 -++---++
9. -+--+++
10. +--++----+-
11 -------+-+++

12 __+____++
13 +
14 +_+__-_-+
15 +-++--+-
16. +-+---+++-+-
17 +---++++---+-+-+
18 -+--+
19, +--_-++--+--+-
20 __+_+-
;;;;tC=EXECUTED WITH CIN‘AB = T, PDCHEK = F
01 DETERMINHNT = -.1393258 . 2.. -24
NEGATIVE EIGENVALUES = 5
OPERATION UNITS = 226
AVG TIME.jOP UNIT = 34.50 MICRDSEC

SYYSOL TEST RESULTS (. = CONSTRAINED EP;I :

EQ EXHCT B CmlP. I: B-ERROR EXifCT :i t:ONP. X X-ERROR


1 -.0368776 -.0368776 0.0 -.010'3253 -.oio9253 -7.2-09
2 -.3354552 -.3354552 0.0 .2503308 .2503308 0.0
3 -.0437254 -.0437254 0.0 -.2339832 -.2389832 0.0
-.3132310 -.3192.310 0.0 .4102020 .4102020 3.7-09
: 1016244 .I016244 0.0 -.0374023 -.0874023 3.7-09
6 -:0281424 -.0281424 0.0 -.4717565 -.4717865 7.5-09
7 .3474827 .3474*17 0.0 -.4175110 -.4175110 3.7-09
8 -.3593653 -. 3593653 0.0 -.1548004 -.1548004 -5.6-09
9. -2.2627583 -2.2627583 3.0-08 -.4187622 -.4187622 0.0
LO. .3993893 .9993393 -7.5-09 -.1642303 -.1642303 0.0
11 -.4837782 -.4837782 0.0 .2662653 e66e659 a. 0
12 -.0035529 -.0035529 0.0 -.4160319 -.4160919 -3.7-03
13 .2332043 .>33.1049 0.0 4168701 .41CJ701 0.0
14 -.1591169 -.1591169 0.0 :1573742 .1573742 -5.6-09
15 .0594882 .0594882 0.0 1092224 .I092224 4.7-09
16. 1132414 .1132414 0.0 -:0142975 -. 0142975 0.0
17 -:3659491 -.3659491 0.0 -.4036304 -.4086304 0.0
18 .1939173 .1939178 0.0 .P2?2023 .2292023 1.9-09
19. -.9196062 -.9196062 1.5-03 1582336 .1582336 0.0
20 -.0221439 -.0221439 0.0 :1593579 . 1593573 1.9-09

HCTUR!_ RELRTlVE ERROR OF COMPUTED @.I 1.24-03


ESTI"ATED REL. ERROR OF UNPEFINED [Xl 1.'37_07
Solution of linear equations with skyline-stored symmetric matrix 29

and should be removed, unless extended double precision case, the routines presented here can be made use of as
arithmetic (e.g. REAL*16 on IBM 370 computers) is follows:
available for the residual calculation in subroutine
1. Use SKYFAC to factor Ag upon marking the tat
SKYMUL.
equations associated with the external freedoms x, as
A slightly more efficient implementation of these
constrained.
procedures is possible if array LD is used to pack the
2. Solve the homogen~usly constrained block system
following information:
(a) diagonal location pointer
(b) local skyline width excluding diagonal
(20)
(c) constraint flag
by submitting to SKYSOL (with argument IBX = 1) nc
into 3 bit fields. Such a version is not presented here since
right hand sides consisting of the n, columns of A&
partial word manipulation with Fortran statements is
completed with zeros on the constraint equation posi-
highly machine dependent.
tions.
APPLICATIONS 3. The condensed matrix A* is
General
A”=A,,-A;X=A,,-3 (21)
The equation solving procedures presented here may be
useful in the following application areas:
so that one should simply substract each column of B (as
1. As fast linear equation solvers for small-scale they are being put out by SKYSOL) from the approp~ate
systems (normally not exceeding 1000equations). This is column of A,, to produce A* in situ (overwriting A,,).
typical of most finite element codes written in universities Note that X is not used.
and research institutions, as well as pilot pro~ms
The reader may verify that the entire process can be
developed in industry for special applications or feasibil-
carried out without prearranging A, and that only two
ity studies of nonlinear or time-dependent problems.
auxiliary moating-lint vectors of length n itre required in
2. As freedom “condensation” processors for iirst-
addition to the A-definition arrays A and LD. The
level superelement analysis. This application is elaborated
reduction (19) of the load vector can be executed in a
in the following subsection.
3. As a conceptual aid in the design and coding stages similar manner.
of the development of large-scale equation solvers based
REFERENCES
on the skyline storage approach.
1. C. A. Felippa, Finite element and finite difference energy
techniaues for the numerical solution of martial differential
Superelement condensation equatidns, Proc. 1973 Summer Comp~fer-S~m~~~~onCffnf.,
Superelement te~hniques[I4] (also called ~subst~ctur- Montreal, Canada, 1-14 (July 1973).
ing’ or ‘tearing’ by structural engineers and ‘dissection’ 2. R. A. Willouahbv, A survev of snarse matrix technoloev. in
or ‘blocking’ by numerical analysts[9]) are model- Tech. Report A&DL-TR-jl-79, ‘Air Force Flight Dyn&&s
pa~itioning procedures intended for a multistage analysis Lab., W~ght-Pa~te~on AFB, Ohio, 65-171 (June 1971).
of complex finite element idealizations. A block of finite 3. .I. K. Reid (ed.), Large Sparse Sets of Linear Equations. pp.
elements modeling a simply connected portion of a 17-24, 41-56, 97-104, 255-277, Academic Press, London,
complex system is called a level one superelement. A (1971).
4. A. George, A survey of sparse matrix methods in the direct
connected set of level one superelements makes a level two
solution of linear equations, Proc. 1973 Summer Computer
superelement and so forth until the complete model is Sjmu~uf~o~Co& Montreal, Canada, U-20 (July 1973).
realized. The fundamental characteristic of the associated 5. A. Jennings, A compact storage scheme for the solution of
matrix assembly process is that ‘internal’ degrees of symmetric simultaneous equations, Comput. J. 9, 281-285
freedom of all superelements of given level (those (Sept. 1969).
freedoms not shared by two or more superelements) are 6. R. J. Melosh and R. M. Bamford, Efficient solution of
reduced out or ‘condensed’ before proceeding to the next load-deflection equations, J. Struct. Div. ASCE, Proc. Paper
level. I\io. 6510, 661-676 (April 1969).
The governing lineart equations for a particular 7. B. M. Irons, A frontal solution program for finite element
analysis, Int. J. Num. Math. Engrg. 2, 5-30 (January 1970).
superelement may be represented by equation (4), in
8. R. P. Tewarson, Sparse ~airjces. Academic Press, New York
which subvector xf collects all internal freedoms whereas (1973).
xc includes external or connected freedoms. Elimination 9. 0. Birkhoff and A. George, Elimination by nested
of x, yields: dissection, in Complexity of Sequential and Parallel Nume~-
A*x, = b” (17) caf Algotithms. J. F. Traub (Ed.), pp. 221-270, Academic
Press, New York, (1973).
where the (symmetric) condensed superelement matrix 10. J. 0. Owens, The influence of machine organization on
A* and right hand side vector b* are given by algorithms, in vol. quoted in[9], 11l-130 (1973).
11. J. H. Wilkinson and C. Reinsch (eds.), Handbook for
Automatic Computatjoa Voi. IX-Linear Algebra Springer,
A* = A, - A$A;’ A, (18) Berlin (1971).
b* = b, - Af:Ai’bf (19) 12. C. Johnson, On the convergence of a mixed finite element for
analysis of plate bending, Num. bats. 21, 43-42 (1973).
13. 5. H. Wilkinson, Rounding Errors in Algebraic Processes.
provided Aff is nonsingular. The matrix condensation
Prentice-Hall, London, 1973.
process (18) can usually be carried out in core for level 14. P. 0. Araldsen, the application of the superelement method in
one (and sometimes level two) su~reiements. If such is the analysis and design of ship structures and machinery
components, presented at the National Symposium on
Computerized Anaiysis and Design, George Washington
~Superelementtechniquesare mosteffectivein linearproblems. University, Washington, D.C. (May 1972).
id.. Vol. 5;No. I-C

You might also like