Trailing-Edge
-
PDP-10 Archives
-
decuslib10-01
-
43,50127/matrix.f4
There is 1 other file named matrix.f4 in the archive. Click here to see a list.
00010 C EXECUTIVE ROUTINE FOR MATRIX INTERPRETIVE PROGRAM
00020 INTEGER FREZ,FRET
00030 INTEGER OPLIST(60),WORD(15),ERROR,WORD1,BLANK,SAVNM(2)
00040 COMMON /FF/ NFMX,ITAPE,NWMX
00050 COMMON /XX/ ERROR
00060 COMMON /YY/ INCA,INC1,INC2,INC3,INC4
00070 COMMON /Z/ A(1),NAME(1),NCOL(1),NROW(1),NN(1),NME(4),NSIZE
00080 COMMON /ZZ/ NUM,NNUM,NX,NR,NC,MPYTAG
00090 INTEGER CHAR(0/9)
00100 DIMENSION FNUMB(10)
00110 C * * * * * * * * * * * * * * LIST OF OPERATIONS * * *
00120 DATA (OPLIST(I),I=1,5)/'ZERO','REMAR','PRINT','MAP','ENVEL'/
00130 DATA (OPLIST(I),I=6,10)/'LOAD','DUPL','DELET','SCALE','MSCAL'/
00140 DATA OPLIST(11) /'SQREL'/
00150 DATA (OPLIST(I),I=12,16)/'INVEL','LOG','ADD','SUB','TRANS'/
00160 DATA (OPLIST(I),I=17,20)/'MULT','TRMPY','SYMCK','SYMNV'/
00170 DATA (OPLIST(I),I=21,24)/'INVRT','STODG','RMVDG','IDADD'/
00180 DATA (OPLIST(I),I=25,28)/'DGADD','DGSUB','DGPRE','DGPST'/
00190 DATA (OPLIST(I),I=29,32)/'DGMPY','FORMK','FORMD','MERGE'/
00200 DATA (OPLIST(I),I=33,36)/'STOSM','ADDSM','RMVSM','DELRC'/
00210 DATA (OPLIST(I),I=37,40)/'SELCT','CHOL1','CHOL2','CHOL3'/
00220 DATA (OPLIST(I),I=41,44)/'EIGEN','FUNGN','RESPN','LIST'/
00230 DATA (OPLIST(I),I=45,48)/'EDIT','GET','SAVE','FEM'/
00240 DATA OPLIST(49) /'RANK'/
00250 DATA (CHAR(I),I=0,9) /'0','1','2','3','4','5','6','7',
00260 1 '8','9'/
00270 DATA BLANK/' '/
00280 EXTERNAL SUBERR
00290 C * * * * * * * * * * * * * * INITIALIZE BY ZEROING ARRAY * * *
00300 C SET PSIZE TO 44 AND MAXIMUM IN MLIST TO 30K FOR MATRXB
00310 CALL PSIZE(23)
00320 C CALL PSIZE(44)
00330 CALL EXSIZE(SUBERR)
00340 NNUM=10
00350 NSIZE=0
00360 NUM=0
00370 DO 2 I=1,4
00380 IADDR=FREZ(10)
00390 2 NME(I)=IADDR
00400 INC1=NME(1)-LOC(NAME)
00410 INC2=NME(2)-LOC(NCOL)
00420 INC3=NME(3)-LOC(NROW)
00430 INC4=NME(4)-LOC(NN)
00440 NOPER=49
00450 TYPE 4
00460 4 FORMAT(' MATRIX REV. 7 JULY 1969'///)
00470 5 NF=0
00480 NW=1
00490 ITAPE=0
00500 NFMX=10
00510 NWMX=15
00520 ERROR=0
00530 DO 50 I=1,5
00540 WORD(I)=BLANK
00550 FNUMB(I)=0
00560 50 CONTINUE
00570 DO 55 I=6,10
00580 FNUMB(I)=0
00590 55 CONTINUE
00600 TYPE 6
00610 6 FORMAT(' *'$)
00620 CALL FREAD(NW,WORD,NF,FNUMB)
00630 WORD1=WORD(1)
00640 I=1
00650 8 IF(NOPER-I)9,10,10
00660 9 TYPE 9001
00670 9001 FORMAT(' ILLEGAL COMMAND'/)
00680 GO TO 5
00690 10 IF(OPLIST(I).EQ.WORD1) GO TO 15
00700 I=I+1
00710 GO TO 8
00720 15 IDITO=I
00730 GO TO (100,5,120,140,160,180,200,220,240,260,280,300,
00740 1 320,340,350,380,400,420,440,460,480,500,520,540,560,
00750 2 580,600,620,640,660,680,700,720,740,760,780,800,
00760 3 820,840,860,880,1000,1020,2000,190,2020,2040,2060,2080), IDITO
00770 C * * * * * * ZEROS A MATRIX * * * * * *
00780 100 NAMA=WORD(2)
00790 IF ((NW.NE.2).OR.(NF.NE.2)) GO TO 995
00800 NR=FNUMB(1)
00810 NC=FNUMB(2)
00820 MPYTAG=0
00830 CALL MLIST(NAMA)
00840 IF(ERROR.GT.0) GO TO 990
00850 DO 110 I=1,NR*NC
00860 A(I+INCA)=0.0
00870 110 CONTINUE
00880 GO TO 5
00890 C * * * * * * * * * * * * * * MATRIX PRINT - PRINT* * *
00900 120 NAMA=WORD(2)
00910 CALL MFIND(NAMA)
00920 IF(ERROR.GT.0) GO TO 990
00930 CALL PRINT(NAMA)
00940 GO TO 5
00950 C * * * * * * * * * * * * * * MATRIX MAP - MAP* * *
00960 140 NAMA=WORD(2)
00970 SCAL1=FNUMB(1)
00980 CALL MFIND(NAMA)
00990 IF(ERROR.GT.0) GO TO 990
01000 CALL MTXMAP(SCAL1)
01010 GO TO 5
01020 C * * * * * * * * * * * * * * ENVELOPE VALUES OF MATRIC - ENVEL* * *
01030 160 SCAL1=FNUMB(2)
01040 IF(NF.EQ.1) TYPE 1601
01050 1601 FORMAT(' INTERVAL SCALAR OMITTED'/)
01060 IF ((NW.LT.2).OR.(NF.LT.2)) GO TO 995
01070 NAMA=WORD(2)
01080 KCOL=FNUMB(1)
01090 CALL MFIND(NAMA)
01100 IF(ERROR.GT.0) GO TO 990
01110 NA=INCA
01120 IF(KCOL) 998,163,164
01130 163 NRA=NR
01140 NCA=NC
01150 GO TO 165
01160 164 NCA=NR
01170 NRA=NC
01180 165 NAMB=WORD(3)
01190 IF(NAMB.EQ.BLANK) GO TO 175
01200 NR=1
01210 NC=NRA
01220 CALL MLIST(NAMB)
01230 IF(ERROR.GT.0) GO TO 990
01240 NBB=1
01250 GO TO 176
01260 175 NBB=0
01270 176 NR=NRA
01280 NC=NCA
01290 CALL ENVEL(NA,NBB,SCAL1,KCOL)
01300 GO TO 5
01310 C * * * * * * * * * * * * * * LOAD MATRIX - LOAD * * *
01320 180 IF (NW.LT.2.OR.NF.NE.2) GO TO 995
01330 IF (NW.EQ.3) GO TO 184
01340 NAMA=WORD(2)
01350 GO TO 185
01360 184 IF (WORD(2).NE.'TAPE') GO TO 9
01370 NAMA=WORD(3)
01380 ITAPE=1
01390 185 NR=FNUMB(1)
01400 NC=FNUMB(2)
01410 CALL MLIST(NAMA)
01420 IF(ERROR.GT.0) GO TO 990
01430 CALL LOAD
01440 GO TO 5
01450 C * * * * * * * EDIT AN ELEMENT OF A MATRIX * * * * * * * *
01460 190 IF (NW.NE.2.OR.NF.NE.1) GO TO 995
01470 NAMA=WORD(2)
01480 CALL MFIND(NAMA)
01490 IF (ERROR.GT.0) GO TO 990
01500 NTIM=FNUMB(1)
01510 IF (NTIM.LT.1) GO TO 996
01520 TYPE 1900
01530 1900 FORMAT(5X,'ROW-COL COORDINATES - VALUE'/)
01540 DO 195 I=1,NTIM
01550 NW=-3
01560 NF=3
01570 NWMX=1
01580 NFMX=10
01590 CALL FREAD(NW,WORD,NF,FNUMB)
01600 NREL=FNUMB(1)
01610 NCEL=FNUMB(2)
01620 IF (NREL.GT.NR.OR.NCEL.GT.NC) GO TO 901
01630 NA=(NREL-1)*NC+NCEL+INCA
01640 A(NA)=FNUMB(3)
01650 195 CONTINUE
01660 GO TO 5
01670 C * * * * * * * * * * * * * * DUPLICATE MATRIX - DUPL * * *
01680 200 NAMA=WORD(2)
01690 IF (NW.NE.3) GO TO 995
01700 NAMB=WORD(3)
01710 IGO=1
01720 CALL MFIND(NAMA)
01730 IF(ERROR.GT.0) GO TO 990
01740 NB=INCA
01750 CALL MLIST(NAMB)
01760 IF(ERROR.GT.0) GO TO 990
01770 NS=NR*NC
01780 DO 210 I=1,NS
01790 A(I+INCA)=A(I+NB)
01800 210 CONTINUE
01810 GO TO 5
01820 C * * * * * * * * * * * * * * DELETE MATRIX - DELETE * * *
01830 220 NTIME=NW-3+1
01840 DO 225 I=1,NTIME
01850 NAMA=WORD(2+I)
01860 CALL DELETE(NAMA)
01870 IF(ERROR.GT.0) GO TO 990
01880 225 CONTINUE
01890 GO TO 5
01900 C * * * * * * * * * * * * * * SCALAR MULTIPLICATION - SCALE * * *
01910 240 NAMA=WORD(2)
01920 IF ((NW.NE.2).OR.(NF.NE.1)) GO TO 995
01930 SCAL1=FNUMB(1)
01940 241 CALL MFIND(NAMA)
01950 IF(ERROR.GT.0) GO TO 990
01960 DO 245 I=1,NR*NC
01970 A(I+INCA)=SCAL1*A(I+INCA)
01980 245 CONTINUE
01990 GO TO 5
02000 C * * * * * * * * * * * * * * MULTIPLY A*B(NR,NC) - MSCALE * * *
02010 260 IFLAG=1
02020 IF ((NW.NE.3).OR.(NF.NE.2)) GO TO 995
02030 NAMA=WORD(2)
02040 NAMB=WORD(3)
02050 NR=FNUMB(1)
02060 NC=FNUMB(2)
02070 IF(NR*NC) 909,272,273
02080 272 NR=1
02090 NC=1
02100 273 NRB=NR
02110 NCB=NC
02120 CALL MFIND(NAMB)
02130 IF(ERROR.GT.0) GO TO 990
02140 IF((NRB.GT.NR).OR.(NCB.GT.NC)) GO TO 909
02150 IF(NR*NC.EQ.0) GO TO 909
02160 SCAL1=A(INCA+(NRB-1)*NC+NCB)
02170 GO TO 241
02180 C * * * * * * * * * * * * * * SQUARE ROOT OF EACH ELEMENT - SQREL * * *
02190 280 IFLAG=1
02200 281 NAMA=WORD(2)
02210 CALL MFIND(NAMA)
02220 IF(ERROR.GT.0) GO TO 990
02230 CALL ELEMNT(IFLAG)
02240 IF (ERROR.NE.0) GO TO 990
02250 GO TO 5
02260 C * * * * * * * * * * * * * * INVERSION OF EACH ELEMENT - INVEL * * *
02270 300 IFLAG=2
02280 GO TO 281
02290 C * * * * * * * * * * * * * * LOG OF MATRIX - LOG * * *
02300 320 IFLAG=3
02310 GO TO 281
02320 C * * * * * * * * * * * * * * ADD OR SUBTRACT MATRICES - ADD , SUB * * *
02330 340 TAG=1.0
02340 GO TO 351
02350 350 TAG=-1.
02360 351 NAMA=WORD(2)
02370 NAMB=WORD(3)
02380 IF (NW.NE.3) GO TO 995
02390 CALL MFIND(NAMA)
02400 IF(ERROR.GT.0) GO TO 990
02410 NA=INCA
02420 NRA=NR
02430 NCA=NC
02440 CALL MFIND(NAMB)
02450 IF(ERROR.GT.0) GO TO 990
02460 IF ((NR.NE.NRA).OR.(NC.NE.NCA)) GO TO 901
02470 NS=NR*NC
02480 DO 360 I=1,NS
02490 A(NA+I)=A(NA+I)+TAG*A(INCA+I)
02500 360 CONTINUE
02510 GO TO 5
02520 C * * * * * * * * * * * * * * MATRIX TRANSPOSE - TRANS * * *
02530 380 NAMA=WORD(2)
02540 IF (NW.NE.3) GO TO 995
02550 NAMB=WORD(3)
02560 CALL MFIND(NAMA)
02570 IF(ERROR.GT.0) GO TO 990
02580 NRA=NR
02590 NR=NC
02600 NB=INCA
02610 NC=NRA
02620 CALL MLIST(NAMB)
02630 IF(ERROR.GT.0) GO TO 990
02640 CALL TRANS(NB)
02650 GO TO 5
02660 C * * * * * * * * * * * * * * MATRIX RIGHT MULTIPLY - MULT * * *
02670 400 MPYTAG=FNUMB(1)
02680 ITRMPY=0
02690 410 NAMA=WORD(2)
02700 CALL MFIND(NAMA)
02710 IF(ERROR.GT.0) GO TO 990
02720 NA=INCA
02730 NRA=NR
02740 NCA=NC
02750 IF (NW.NE.4) GO TO 995
02760 NAMB=WORD(3)
02770 NAMC=WORD(4)
02780 CALL MFIND(NAMB)
02790 IF(ERROR.GT.0) GO TO 990
02800 NRB=NR
02810 NCB=NC
02820 NB=INCA
02830 NR=NRA
02840 IF(ITRMPY.EQ.0) GO TO 411
02850 NR=NCA
02860 NCA=NRA
02870 411 IF (NCA.NE.NRB) GO TO 901
02880 413 CALL MLIST(NAMC)
02890 IF(ERROR.GT.0) GO TO 990
02900 CALL MULT(NA,NB,NCA,NCB,ITRMPY)
02910 MPYTAG=0
02920 ITRMPY=0
02930 GO TO 5
02940 C * * * * * * * * * * PREMULTIPLY BY TRANSPOSE (AND ADD) -TRMPY
02950 420 MPYTAG=FNUMB(1)
02960 ITRMPY=1
02970 GO TO 410
02980 C * * * * * * * * * * * * * * *SYMMETRY CHECK * * * *
02990 440 L=1
03000 441 NAMA=WORD(2)
03010 SCAL1=FNUMB(1)
03020 442 CALL MFIND(NAMA)
03030 IF(ERROR.GT.0) GO TO 990
03040 IF (NR.NE.NC) GO TO 945
03050 IF(SCAL1) 443,443,445
03060 443 SCAL1=ABS(A(INCA+1)*1.0E-06)
03070 445 IFLAG=0
03080 CALL SYMCHK(SCAL1,IFLAG)
03090 IF(IFLAG) 908,455,450
03100 450 IF(L-1) 908,5,901
03110 455 GO TO (5,465,822,885), L
03120 C * * * * * * * * * * * *INVERSION OF SYMETRIC MATRIX * *
03130 460 L=2
03140 GO TO 441
03150 465 NA=INCA
03160 NRA=NR
03170 467 NAMB=WORD(3)
03180 IF(NAMB.EQ.BLANK) GO TO 470
03190 CALL MFIND(NAMB)
03200 IF(ERROR.GT.0) GO TO 990
03210 IF(NR.EQ.NRA) GO TO 470
03220 ERROR=1
03230 GO TO 990
03240 470 NC=0
03250 471 CALL SYMINV(NA,SCAL1)
03260 IF(ERROR.GT.0) GO TO 990
03270 GO TO 5
03280 C * * * * * * * * * * * * * *MATRIX INVERSION * * *
03290 480 NAMA=WORD(2)
03300 SCAL1=FNUMB(1)
03310 482 CALL MFIND(NAMA)
03320 IF(ERROR.GT.0) GO TO 990
03330 NA=INCA
03340 NRA=NR
03350 IF (NR.NE.NC) GO TO 945
03360 NAMB=WORD(3)
03370 IF(NAMB.EQ.BLANK) GO TO 490
03380 CALL MFIND(NAMB)
03390 IF(ERROR.GT.0) GO TO 990
03400 IF(NR.EQ.NRA) GO TO 492
03410 ERROR=1
03420 GO TO 990
03430 490 NC=0
03440 492 CALL INVERT(NA,SCAL1)
03450 IF(ERROR.GT.0) GO TO 990
03460 GO TO 5
03470 C * * * * * * * * * * * * * STORE ROW (B) ON DIAGONAL OF (A) -STODG
03480 500 NAMA=WORD(2)
03490 NAMB=WORD(3)
03500 IF (NW.NE.3) GO TO 995
03510 CALL MFIND(NAMA)
03520 IF(ERROR.GT.0) GO TO 990
03530 K=INCA+1
03540 IF (NR.NE.NC) GO TO 945
03550 NCA=NC
03560 CALL MFIND(NAMB)
03570 IF(ERROR.GT.0) GO TO 990
03580 IF (NR.NE.1) GO TO 901
03590 IF (NC.NE.NCA) GO TO 901
03600 DO 510 I=1,NC
03610 A(K)=A(I+INCA)
03620 K=K+NCA+1
03630 510 CONTINUE
03640 GO TO 5
03650 C * * * * * * *REMOVE ROW(B) FROM DIAGONAL OF (A) - RMVDG
03660 520 NAMA=WORD(2)
03670 NAMB=WORD(3)
03680 IF (NW.NE.3) GO TO 995
03690 CALL MFIND(NAMA)
03700 IF(ERROR.GT.0) GO TO 990
03710 IF (NR.NE.NC) GO TO 945
03720 NR=1
03730 CALL MLIST(NAMB)
03740 IF(ERROR.GT.0) GO TO 990
03750 NB=INCA
03760 CALL MFIND(NAMA)
03770 K=INCA+1
03780 DO 525 I=1,NC
03790 A(I+NB)=A(K)
03800 K=K+NC+1
03810 525 CONTINUE
03820 GO TO 5
03830 C * * * * * *ADDITION OF SCALAR TIMES IDENTITY MATRIX - IDADD
03840 540 NAMA=WORD(2)
03850 IF ((NW.NE.2).OR.(NF.NE.1)) GO TO 995
03860 SCAL1=FNUMB(1)
03870 CALL MFIND(NAMA)
03880 IF(ERROR.GT.0) GO TO 990
03890 IF (NR.NE.NC) GO TO 945
03900 K=1+INCA
03910 DO 545 I=1,NR
03920 A(K)=A(K)+SCAL1
03930 K=K+NC+1
03940 545 CONTINUE
03950 GO TO 5
03960 C * * * * ADDITION OR SUBTRACTION OF DIAGONAL MATRIX - DGADD,DGSUB
03970 560 TAG=1.0
03980 561 NAMA=WORD(2)
03990 NAMB=WORD(3)
04000 IF (NW.NE.3) GO TO 995
04010 CALL MFIND(NAMA)
04020 IF(ERROR.GT.0) GO TO 990
04030 NA=INCA
04040 IF (NR.NE.NC) GO TO 945
04050 NCA=NC
04060 CALL MFIND(NAMB)
04070 IF(ERROR.GT.0) GO TO 990
04080 IF (NR.NE.1) GO TO 901
04090 IF (NC.NE.NCA) GO TO 901
04100 K=1+NA
04110 DO 565 I=1,NC
04120 A(K)=A(K)+TAG*A(I+INCA)
04130 K=K+NC+1
04140 565 CONTINUE
04150 GO TO 5
04160 580 TAG=-1.0
04170 GO TO 561
04180 C * * * *PREMULTIPLICATION BY DIAGONAL MATRIX - DGPRE * * *
04190 600 IFLAG=1
04200 601 NAMA=WORD(2)
04210 NAMB=WORD(3)
04220 IF (NW.NE.3) GO TO 995
04230 CALL MFIND(NAMA)
04240 IF(ERROR.GT.0) GO TO 990
04250 NA=INCA
04260 NRA=NR
04270 NCA=NC
04280 CALL MFIND(NAMB)
04290 IF(ERROR.GT.0) GO TO 990
04300 IF (NR.NE.1) GO TO 901
04310 GO TO (610,611,612),IFLAG
04320 610 IF(NC-NRA) 901,615,901
04330 611 IF(NC-NCA) 901,615,901
04340 612 IF(NRA-1) 901,611,901
04350 615 CALL DGMPY(NA,NRA,NCA,IFLAG)
04360 GO TO 5
04370 C * * * * * * * * *POSTMULTIPLICATION BY DIAGONAL MATRIX DGPST
04380 620 IFLAG=2
04390 GO TO 601
04400 C * * * * * * * * * *MULTIPLY TWO DIAGONAL MATRICES * * * *
04410 640 IFLAG=3
04420 GO TO 601
04430 C * * * *FORM TWO DIMENSIONAL BEAM STIFFNESS MATRIX(2X2,3X3,4X4)
04440 660 NAMA=WORD(2)
04450 IF ((NW.NE.2).OR.(NF.LT.1)) GO TO 995
04460 NR=FNUMB(1)
04470 NC=FNUMB(2)
04480 IF((NR.LT.0).OR.(NR.GT.4)) GO TO 903
04490 IF(NR-1) 671,671,672
04500 671 NR=2
04510 672 NTYPE=NR
04520 IF(NC) 908,673,674
04530 673 NC=1
04540 674 N=NC
04550 NR=N*NTYPE
04560 NC=NR
04570 CALL MLIST(NAMA)
04580 IF(ERROR.GT.0) GO TO 990
04590 CALL FORMK(NTYPE,N)
04600 IF(ERROR) 990,5,990
04610 C * * * *FORM BEAM MATRIX FOR DIRECT STIFFNESS MERGING(4X4,6X6)
04620 680 NAMA=WORD(2)
04630 IF ((NW.NE.2).OR.(NF.NE.2)) GO TO 995
04640 NTYPE=FNUMB(1)
04650 N=FNUMB(2)
04660 IF(.NOT.(NTYPE.EQ.4.OR.NTYPE.EQ.6.AND.N.GE.0)) GO TO 995
04670 IF(N.LE.0) N=1
04680 NR=NTYPE
04690 NC=NR
04700 DO 685 I=1,5
04710 NPLAC=I
04720 CALL GET(NAMA,I,IC)
04730 IF(IC.EQ.BLANK) GO TO 686
04740 685 CONTINUE
04750 686 NDIG=1
04760 IF(N.GE.10) NDIG=2
04770 IF((NPLAC+NDIG).GT.5) NPLAC=6-NDIG
04780 J=0
04790 NEND=N
04800 NTIME=N/10
04810 IF(NTIME.EQ.0) GO TO 688
04820 NTIME=NTIME+1
04830 NPLAC=NPLAC+1
04840 687 J=J+1
04850 CALL PUT(NAMA,NPLAC-1,CHAR(J-1))
04860 NEND=N-(J-1)*10
04870 IF(NEND.GT.9) NEND=9
04880 IF(J.EQ.1) GO TO 688
04890 CALL PUT(NAMA,NPLAC,CHAR(0))
04900 CALL MLIST(NAMA)
04910 IF(ERROR.GT.0) GO TO 990
04920 IF(NEND.EQ.0) GO TO 692
04930 688 DO 690 I=1,NEND
04940 ICHAR=CHAR(I)
04950 CALL PUT(NAMA,NPLAC,ICHAR)
04960 CALL MLIST(NAMA)
04970 IF(ERROR.GT.0) GO TO 990
04980 690 CONTINUE
04990 IF(NTIME.EQ.0) GO TO 692
05000 IF(J-NTIME) 687,692,692
05010 692 CALL FORMKD(NTYPE,N)
05020 IF(ERROR)990,5,990
05030 C * * * * * * * * * * * * * * * * *MATRIX MERGE * * *
05040 700 IF(.NOT.(NW.EQ.3.AND.NF.EQ.1)) GO TO 995
05050 K=FNUMB(1)
05060 NAMA=WORD(2)
05070 NAMB=WORD(3)
05080 IF(K.EQ.0) GO TO 903
05090 CALL MFIND(NAMA)
05100 IF(ERROR.GT.0) GO TO 990
05110 NA=INCA
05120 NRA=NR
05130 NCA=NC
05140 CALL MFIND(NAMB)
05150 IF(ERROR.GT.0) GO TO 990
05160 IF((NR.GT.100).OR.(NC.GT.100)) GO TO 901
05170 CALL MERGE(NA,NRA,NCA,K)
05180 IF(ERROR) 990,5,990
05190 C * * * * * * * * * * * * * STORE SUBMATRIX * * * * * *
05200 720 NTAG=1
05210 721 IF ((NW.NE.3).OR.(NF.NE.2)) GO TO 995
05220 J=FNUMB(1)
05230 K=FNUMB(2)
05240 NAMB=WORD(3)
05250 CALL MFIND(NAMB)
05260 IF(ERROR.GT.0) GO TO 990
05270 GO TO 770
05280 C * * * * * * * * * * * * * * * * ADD SUBMATRIX * * * *
05290 740 NTAG=-1
05300 GO TO 721
05310 C * * * * * * * * * * * * * * * * * * REMOVE SUBMATRIX * * *
05320 760 IF ((NW.NE.3).OR.(NF.NE.4)) GO TO 995
05330 NAMB=WORD(3)
05340 J=FNUMB(1)
05350 K=FNUMB(2)
05360 NR=FNUMB(3)
05370 NC=FNUMB(4)
05380 NTAG=0
05390 CALL MLIST(NAMB)
05400 IF(ERROR.GT.0) GO TO 990
05410 770 NB=INCA
05420 NRB=NR
05430 NCB=NC
05440 NAMA=WORD(2)
05450 CALL MFIND(NAMA)
05460 IF(ERROR.GT.0) GO TO 990
05470 CALL STOSM(NB,NRB,NCB,J,K,NTAG)
05480 IF(ERROR.GT.0) GO TO 990
05490 GO TO 5
05500 C * * * * * DELETION OF NR ROWS AND NC COLUMNS FROM MATRIX *
05510 780 IF(.NOT.(NW.EQ.3.AND.(NF.EQ.1.OR.NF.EQ.2))) GO TO 995
05520 NAMA=WORD(2)
05530 NAMB=WORD(3)
05540 NRD=FNUMB(1)
05550 IF(NF.EQ.2) GO TO 790
05560 K=1
05570 NCD=NRD
05580 GO TO 795
05590 790 NCD=FNUMB(2)
05600 K=0
05610 795 IF((NRD.GT.100).OR.(NCD.GT.100)) GO TO 901
05620 CALL DELRC(NAMA,NRD,NCD,NAMB,K)
05630 IF(ERROR) 990,5,990
05640 C * * * * * * * * SELECT EVERY NTH VALUE IN A ROW MATRIX
05650 800 IF ((NW.NE.3).OR.(NF.LE.0)) GO TO 995
05660 N=FNUMB(1)
05670 M=FNUMB(2)
05680 NAMA=WORD(2)
05690 NAMB=WORD(3)
05700 IF(N.LE.0.OR.M.LE.0) GO TO 908
05710 CALL MFIND(NAMA)
05720 IF(ERROR.GT.0) GO TO 990
05730 NA=INCA+M
05740 IF(NR-1) 901,813,811
05750 811 IF (NC.NE.1) GO TO 901
05760 NTMP=NR
05770 NR=NC
05780 NC=NTMP
05790 813 NC=1+(NC-M)/N
05800 IF(NC.LT.M) GO TO 901
05810 CALL MLIST(NAMB)
05820 IF(ERROR.GT.0) GO TO 990
05830 DO 815 I=1,NC
05840 A(I+INCA)=A(NA)
05850 NA=NA+N
05860 815 CONTINUE
05870 GO TO 5
05880 C = = = = = = EIGENVALUE,RESPONSE,AND SUPPORTING OPERATIONS = = =
05890 C * * * * CHOLESKI RIGHT DECOMPOSITION (UPPER TRIANGULAR) * * *
05900 820 L=3
05910 IF (NW.NE.3) GO TO 995
05920 NAMB=WORD(3)
05930 GO TO 441
05940 822 CALL MLIST(NAMB)
05950 IF(ERROR.GT.0) GO TO 990
05960 NB=INCA
05970 CALL MFIND(NAMA)
05980 CALL DECOM(NB)
05990 IF(ERROR) 990,5,990
06000 C * * * * * * * * * * * * * * * * * * * CHOLESKI REDUCTION * * :
06010 840 IFLAG=0
06020 841 IF(.NOT.(NW.EQ.2.OR.NW.EQ.3)) GO TO 995
06030 SCAL1=FNUMB(1)
06040 NAMA=WORD(2)
06050 CALL MFIND(NAMA)
06060 IF(ERROR.GT.0) GO TO 990
06070 NA=INCA
06080 IF (NR.NE.NC) GO TO 945
06090 NRA=NR
06100 IF(NW.EQ.2) GO TO 845
06110 NAMB=WORD(3)
06120 CALL MFIND(NAMB)
06130 IF(ERROR.GT.0) GO TO 990
06140 IF (NRA.NE.NR) GO TO 901
06150 GO TO 846
06160 845 NC=0
06170 846 CALL CHSOLV(NA,IFLAG,SCAL1)
06180 IF(ERROR)5,5,990
06190 C * * * * * * * * CHOLESKI BACK SUBSITUTION * * *
06200 860 IFLAG=1
06210 GO TO 841
06220 C * * * * * * * EIGENVALUES AND EIGENVECTORS * * * * * * * * * * *
06230 880 L=4
06240 IF ((NW.NE.5).OR.(NF.LE.0)) GO TO 995
06250 M=FNUMB(1)
06260 SCAL1=FNUMB(2)
06270 NAMA=WORD(2)
06280 GO TO 442
06290 885 N=NR
06300 NR=1
06310 NC=N
06320 NAMD=WORD(5)
06330 CALL MLIST(NAMD)
06340 ND=INCA
06350 IF(ERROR.GT.0) GO TO 990
06360 NR=IABS(M)
06370 NAMC=WORD(4)
06380 CALL MLIST(NAMC)
06390 IF(ERROR.GT.0) GO TO 990
06400 NE=INCA
06410 CALL MFIND(NAMA)
06420 NA=INCA
06430 NAMB=WORD(3)
06440 CALL MFIND(NAMB)
06450 IF(ERROR.GT.0) GO TO 990
06460 IF (NR.NE.1) GO TO 901
06470 IF (N.NE.NC) GO TO 901
06480 CALL EIGEN(A(NA+1),A(NE+1),A(ND+1),N,M,N)
06490 IF(ERROR) 5,5,990
06500 C * * * * * * * * FUNCTION GENERATION * * * * * * * * *
06510 1000 IF ((NW.NE.3).OR.(NF.NE.2)) GO TO 995
06520 NAMA=WORD(2)
06530 NAMB=WORD(3)
06540 N=FNUMB(1)
06550 SCAL1=FNUMB(2)
06560 NR=1
06570 NC=N
06580 CALL MLIST(NAMB)
06590 IF(ERROR.GT.0) GO TO 990
06600 NB=INCA
06610 CALL MFIND(NAMA)
06620 IF(ERROR.GT.0) GO TO 990
06630 IF (NC.NE.2) GO TO 901
06640 NS=NR*NC
06650 CALL FUNGN(NB,N,NS,SCAL1)
06660 IF(ERROR)5,5,990
06670 C * * * * * * * * * RESPONSE* * * * * * * * * * * * * * * * *
06680 1020 IF ((NW.NE.5).OR.(NF.NE.4)) GO TO 995
06690 NAMA=WORD(2)
06700 NAMB=WORD(3)
06710 NAMC=WORD(4)
06720 NAMD=WORD(5)
06730 N=FNUMB(1)
06740 K=FNUMB(2)
06750 SCAL1=FNUMB(3)
06760 SCAL2=FNUMB(4)
06770 IF((K.LT.0).OR.(K.GT.2)) GO TO 995
06780 CALL MFIND(NAMA)
06790 IF(ERROR.GT.0) GO TO 990
06800 NA=INCA
06810 M=NC
06820 IF (NR.NE.1) GO TO 901
06830 CALL MFIND(NAMC)
06840 IF(ERROR.GT.0) GO TO 990
06850 L=NC
06860 NTAG=1
06870 IF (NR.EQ.1) NTAG=0
06880 NC=(NC-1)/N
06890 NR=M
06900 NRA=INCA
06910 CALL MLIST(NAMD)
06920 IF(ERROR.GT.0) GO TO 990
06930 ND=INCA
06940 CALL MFIND(NAMB)
06950 IF(ERROR.GT.0) GO TO 990
06960 IF ((NC.NE.1).OR.(NR.NE.M)) GO TO 901
06970 CALL RESPON(A(NA+1),A(NRA+1),A(ND+1),M,N,L,SCAL1,SCAL2,NTAG,K)
06980 IF(ERROR) 5,5,990
06990 C * * * * * * * * * * * * * LIST NAMES OF MATRICES
07000 2000 NS=NSIZE
07010 TYPE 2001, NUM,NS
07020 2001 FORMAT(1X,I3,' MATRICES DEFINED, USING A TOTAL OF',
07030 1 I6,' WORDS OF STORAGE'/)
07040 IF (NUM.EQ.0) GO TO 5
07050 DO 2010 I=1,NUM
07060 NAMA=NAME(I+INC1)
07070 CALL MFIND(NAMA)
07080 TYPE 2002,NAMA,NR,NC
07090 2002 FORMAT(2X,A5,'(',I3,',',I3,')')
07100 2010 CONTINUE
07110 TYPE 2012
07120 2012 FORMAT(/)
07130 GO TO 5
07140 C * * * * * * * * * * * GET MATRIX FILE * * * * * * * * * * *
07150 2020 IF ((NW.NE.2).OR.(NF.NE.0)) GO TO 995
07160 CALL MGET(WORD(2))
07170 IF (ERROR.NE.0) GO TO 990
07180 GO TO 5
07190 C * * * * * * * * * SAVE ALL MATRICES * * * * * * * * * * * * *
07200 2040 IF ((NW.EQ.3).AND.(NF.EQ.0)) GO TO 2050
07210 IF ((NW.EQ.2).AND.(NF.EQ.1)) GO TO 2042
07220 GO TO 995
07230 C * * * * * * * * SAVE "N" MATRICES * * * * * * * * * * *
07240 2042 NV=FNUMB(1)
07250 CALL MSAVE(WORD(2),NV)
07260 IF (ERROR.NE.0) GO TO 990
07270 GO TO 5
07280 2050 IF (WORD(2).NE.'ALL') GO TO 995
07290 NV=NUM
07300 CALL MSAVE(WORD(3),NV)
07310 GO TO 5
07320 C * * * * * * * * GENERATION OF FIXED END MOMENTS MATRIX * * *
07330 2060 IF(NW.NE.2.OR.NF.GT.1) GO TO 995
07340 IF(NF.EQ.0) FNUMB(1)=1.
07350 NAMA=WORD(2)
07360 NC=1
07370 NTIME=FNUMB(1)
07380 NR=4*NTIME
07390 CALL MLIST(NAMA)
07400 IF(ERROR.GT.0) GO TO 990
07410 CALL FIXEM(NTIME)
07420 GO TO 5
07430 C * * * * * * * * * * * RANK OF MATRIX * * * * * * * * * *
07440 2080 IF(NW.NE.2) GO TO 995
07450 NAMA=WORD(2)
07460 SCAL1=-99999.
07470 GO TO 482
07480 C * * * * * * * * * * END OF COMMANDS FOR NOW * * : : * * *
07490 C * * * * * * * * * * * *ERROR MESSAGES * * * * *
07500 901 ERROR=1
07510 GO TO 990
07520 903 ERROR=2
07530 GO TO 990
07540 908 ERROR=8
07550 GO TO 990
07560 909 ERROR=9
07570 GO TO 990
07580 945 TYPE 946, NAMA
07590 946 FORMAT(2X,' MATRIX ',A5,' IS NOT SQUARE'/)
07600 GO TO 5
07610 990 CALL SUBERR
07620 GO TO 5
07630 995 TYPE 996
07640 996 FORMAT(2X,' ERROR IN COMMAND STRING'/)
07650 GO TO 5
07660 998 TYPE 999
07670 999 FORMAT(2X,' ERROR IN MATRIX LOGIC, COMMAND STOPPED'/)
07680 GO TO 5
07690 END