C  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *        
C     SUBROUTINE FOR INTEGRATION OF ACCELERATION TIME HISTORY           
C  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *        
C                                                                       
C                                           CODED BY Y.OHSAKI           
C                                                                       
C     PURPOSE                                                           
C       TO INTEGRATE ACCELERATION TIME HISTORY BY MEANS OF THE LINEAR   
C       ACCELERATION METHOD TO OBTAIN VELOCITY AND DISPLACEMENT         
C       TIME HISTORIES AND THEIR MAXIMA                                 
C                                                                       
C     USAGE                                                             
C       CALL IACC(DT,NN,DDY,DY,Y,ND,DYMAX,YMAX)                         
C                                                                       
C     DESCRIPTION OF ARGUMENTS                                          
C       DT      - TIME INCREMENT IN ACCELERATION TIME HISTORY IN SEC    
C       NN      - TOTAL NUMBER OF DATA IN ACCELERATION TIME HISTORY     
C       DDY(ND) - ACCLERATION TIME HISTORY IN GALS                      
C       DY(ND)  - VELOCITY TIME HISTORY IN KINES                        
C       Y(ND)   - DISPLACEMENT TIME HISTORY IN CENTIMETERS              
C       ND      - DIMENSION OF DDY,DY,Y IN CALLING PROGRAM              
C       DYMAX   - MAX. VELOCITY IN KINES                                
C       YMAX    - MAX. DISPLACEMENT IN CENTIMETERS                      
C                                                                       
C     SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED                     
C       NONE                                                            
C                                                                       
      SUBROUTINE IACC(DT,NN,DDY,DY,Y,ND,DYMAX,YMAX)                     
C                                                                       
      DIMENSION DDY(ND),DY(ND),Y(ND)                                    
C                                                                       
      DYMAX=0.                                                          
      YMAX=0.                                                           
      DY(1)=0.                                                          
      Y(1)=0.                                                           
      DO 110 M=2,NN                                                     
      DY(M)=DY(M-1)+(DDY(M-1)+DDY(M))*DT/2.                             
      Y(M)=Y(M-1)+DY(M-1)*DT+(DDY(M-1)/3.+DDY(M)/6.)*DT**2              
      DYMAX=AMAX1(DYMAX,ABS(DY(M)))                                     
      YMAX=AMAX1(YMAX,ABS(Y(M)))                                        
  110 CONTINUE                                                          
      RETURN                                                            
      END                                                               
