Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-02 - decus/20-0026/soln.smp
There are 2 other files named soln.smp in the archive. Click here to see a list.
C                                                                       SOLN  10
C     ..................................................................SOLN  20
C                                                                       SOLN  30
C        SAMPLE MAIN PROGRAM - SOLN                                     SOLN  40
C                                                                       SOLN  50
C        PURPOSE                                                        SOLN  60
C           SOLUTION OF A SET OF SIMULTANEOUS EQUATIONS                 SOLN  70
C                                                                       SOLN  80
C        SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED                  SOLN  90
C           SIMQ                                                        SOLN 100
C           MATIN                                                       SOLN 110
C           MXOUT                                                       SOLN 120
C           LOC                                                         SOLN 130
C                                                                       SOLN 140
C        METHOD                                                         SOLN 150
C           A MATRIX OF SIMULTANEOUS EQUATIONS COEFFICIENTS AND A VECTORSOLN 160
C           OF CONSTANTS ARE READ FROM THE STANDARD INPUT DEVICE. THE   SOLN 170
C           SOLUTION IS OBTAINED AND LISTED ON THE STANDARD OUTPUT      SOLN 180
C           DEVICE. THIS PROCEDURE IS REPEATED FOR OTHER SETS OF        SOLN 190
C           EQUATIONS UNTIL A BLANK CARD IS ENCOUNTERED.                SOLN 200
C                                                                       SOLN 210
C     ..................................................................SOLN 220
C                                                                       SOLN 230
C        MATRIX IS DIMENSIONED FOR 2500 ELEMENTS. THEREFORE, NUMBER OF  SOLN 240
C        EQUATIONS TO BE SOLVED CANNOT EXCEED 50 UNLESS DIMENSION       SOLN 250
C        STATEMENT IS CHANGED                                           SOLN 260
C                                                                       SOLN 270
      DIMENSION A(2500),B(50)                                           SOLN 280
C                                                                       SOLN 290
   10 FORMAT(1H1,34HSOLUTION OF SIMULTANEOUS EQUATIONS)                 SOLN 300
   11 FORMAT(1H0,44HDIMENSIONED AREA TOO SMALL FOR INPUT MATRIX ,I4)    SOLN 310
   12 FORMAT(1H0,20HEXECUTION TERMINATED)                               SOLN 320
   13 FORMAT(1H0,47HROW AND COLUMN DIMENSIONS NOT EQUAL FOR MATRIX ,I4) SOLN 330
   14 FORMAT(1H0,42HINCORRECT NUMBER OF DATA CARDS FOR MATRIX ,I4)      SOLN 340
   15 FORMAT(1H0,18HGO ON TO NEXT CASE)                                 SOLN 350
   16 FORMAT(1H0,38HSTRUCTURE CODE IS NOT ZERO FOR MATRIX ,I4)          SOLN 360
   17 FORMAT(1H1,17HORIGINAL B VECTOR,////)                             SOLN 370
   18 FORMAT(1H1,15HSOLUTION VALUES,////)                               SOLN 380
   19 FORMAT(1H0,18HMATRIX IS SINGULAR)                                 SOLN 390
   20 FORMAT(7F10.0)                                                    SOLN 400
   21 FORMAT(I3,10X,E16.6)                                              SOLN 410
   22 FORMAT(1H0,11HEND OF CASE)                                        SOLN 420
C                                                                       SOLN 430
C     ..................................................................SOLN 440
C                                                                       SOLN 450
      WRITE (6,10)                                                      SOLN 460
   25 CALL MATIN(ICOD,A,2500,N,M,MS,IER)                                SOLN 470
      IF(N) 30,95,30                                                    SOLN 480
   30 IF(IER-1) 45,35,40                                                SOLN 490
   35 WRITE(6,11) ICOD                                                  SOLN 500
      GO TO 90                                                          SOLN 510
   40 WRITE(6,14) ICOD                                                  SOLN 520
      GO TO 95                                                          SOLN 530
   45 IF(N-M) 50,55,50                                                  SOLN 540
   50 WRITE(6,13) ICOD                                                  SOLN 550
      GO TO 90                                                          SOLN 560
   55 IF(MS) 60,65,60                                                   SOLN 570
   60 WRITE(6,16) ICOD                                                  SOLN 580
      GO TO 90                                                          SOLN 590
   65 CALL MXOUT(ICOD,A,N,M,MS,60,120,2)                                SOLN 600
      READ(5,20)(B(I),I=1,N)                                            SOLN 610
      WRITE(6,17)                                                       SOLN 620
      DO 70 I=1,N                                                       SOLN 630
   70 WRITE(6,21) I,B(I)                                                SOLN 640
      CALL SIMQ(A,B,N,KS)                                               SOLN 650
      IF(KS-1) 80,75,80                                                 SOLN 660
   75 WRITE(6,19)                                                       SOLN 670
      WRITE(6,15)                                                       SOLN 680
      GO TO 25                                                          SOLN 690
   80 WRITE(6,18)                                                       SOLN 700
      DO 85 I=1,N                                                       SOLN 710
   85 WRITE(6,21) I,B(I)                                                SOLN 720
      WRITE(6,22)                                                       SOLN 730
      GO TO 25                                                          SOLN 740
   90 READ(5,20)(B(I),I=1,N)                                            SOLN 750
      WRITE(6,15)                                                       SOLN 760
      GO TO 25                                                          SOLN 770
   95 WRITE(6,12)                                                       SOLN 780
      RETURN                                                            SOLN 790
      END                                                               SOLN 800