      SUBROUTINE ASSEMB(A,ALOK,F,FLOK,MXNOD,STEER,NODEL,IDIAG)

      INTEGER MXNOD,NODEL,IDIAG,STEER(*)
      DOUBLE PRECISION A(2*MXNOD,*),F(*),ALOK(*),FLOK(*)
      INTEGER IND,INDI,INDJ,I,J,NLOK
      PARAMETER(NLOK=8)
      DOUBLE PRECISION M(2*NLOK,2*NLOK)

      IND=1
      DO 10 I=1,2*NLOK
         DO 20 J=1,2*NLOK
            M(J,I)=ALOK(IND)
            IND=IND+1
 20      CONTINUE
 10   CONTINUE

        DO 30 I=1,NODEL
          DO 40 J=1,NODEL

            INDI=2*STEER(I)-1
            INDJ=2*STEER(J)-1
            INDJ=IDIAG+INDJ-INDI
            A(INDI,INDJ)=A(INDI,INDJ)+M(2*I-1,2*J-1)

            INDI=2*STEER(I)-1
            INDJ=2*STEER(J)
            INDJ=IDIAG+INDJ-INDI
            A(INDI,INDJ)=A(INDI,INDJ)+M(2*I-1,2*J)

            INDI=2*STEER(I)
            INDJ=2*STEER(J)-1
            INDJ=IDIAG+INDJ-INDI
            A(INDI,INDJ)=A(INDI,INDJ)+M(2*I,2*J-1)

            INDI=2*STEER(I)
            INDJ=2*STEER(J)
            INDJ=IDIAG+INDJ-INDI
            A(INDI,INDJ)=A(INDI,INDJ)+M(2*I,2*J)
            
 40      CONTINUE
         F(2*STEER(I)-1)=F(2*STEER(I)-1)+FLOK(2*I-1)
         F(2*STEER(I))=F(2*STEER(I))+FLOK(2*I)
 30   CONTINUE

      RETURN
      END
