m-@vOiPRxnpj


      SUBROUTINE NMB1(M,C,K,F,U,UD,U2D,NA,TS,TE,DT,BETA)

      REAL M,K
      DIMENSION F(NA),U(NA),UD(NA),U2D(NA)
 
      N=IFIX((TE-TS)/DT+0.1)+1
      IF(N.gt.NA) then
           WRITE(6,*) "N IS GREATER THAN NA."
         @stop
      endif

      C1=1.0/(M+0.5*DT*C+BETA*DT**2*K)

      d=U(1)
      v=UD(1)
      G=F(1)
      a=(G-K*d-C*v)/M
      write(6,*) Ts,d,v,a

      DO I=2,N
          G=F(I)
          G=G-C*(v+0.5*DT*a)
          G=G-K*(d+DT*v+(0.5-BETA)*DT**2*a)
          aa=C1*G
          U2D(I)=aa
          UD(I)=v+0.5*DT*(a+aa)
          U(I)=d+DT*v+(0.5-BETA)*DT**2*a+BETA*DT**2*aa
          a=U2D(I)
          v=UD(I)
          d=U(I)
          t=Ts+float(i-1)*dt
          write(6,*) t,d,v,a
      enddo

      RETURN
      END