*DECK ALLDLM
      SUBROUTINE ALLDLM (L4,ASS,VEC,Z,MU1,ITY)
*
*-----------------------------------------------------------------------
*
* MULTIPLICATION OF A SYMMETRIC MATRIX IN COMPRESSED DIAGONAL STORAGE
* MODE BY A VECTOR.
*
* INPUT PARAMETERS:
*    L4 : ORDER OF THE COEFFICIENT MATRIX.
*   ASS : COEFFICIENT MATRIX IN COMPRESSED DIAGONAL STORAGE MODE.
*         DIMENSION ASS(MU1(L4))
*   VEC : VECTOR TO MULTIPLY. DIMENSION VEC(L4)
*     Z : VECTOR THAT WILL BE ADDED TO THE RESULT IF ITY=2.
*         DIMENSION Z(L4)
*   MU1 : POSITION OF EACH DIAGONAL ELEMENT IN VECTOR ASS.
*         DIMENSION MU1(L4)
*   ITY : ITY=1 ---- Z=ASS*VEC
*         ITY=2 ---- Z=Z+(ASS-DIAG(ASS))*VEC
*
* OUTPUT PARAMETER:
*     Z : SOLUTION OF THE MULTIPLICATION. DIMENSION Z(L4)
*
*-------------------------------------- AUTHOR: A. HEBERT ; 15/09/89 ---
*
      DIMENSION ASS(*),MU1(*),Z(*),VEC(*)
      GO TO (10,60),ITY
*
* CALCULATION OF Z=ASS*VEC.
   10 Z(1)=ASS(MU1(1))*VEC(1)
      I1=MU1(1)+1
      DO 50 K=2,L4
      I2=MU1(K)
      KEY1=I2-K
      ZK=0.0
      DO 30 L=I1-I2+K,K-1
      ZK=ZK+ASS(KEY1+L)*VEC(L)
   30 Z(L)=Z(L)+ASS(KEY1+L)*VEC(K)
      Z(K)=ZK+ASS(KEY1+K)*VEC(K)
   50 I1=I2+1
      RETURN
*
* CALCULATION OF Z=Z+(ASS-DIAG(ASS))*VEC.
   60 I1=MU1(1)+1
      DO 80 K=2,L4
      I2=MU1(K)
      KEY1=I2-K
      DO 70 L=I1-I2+K,K-1
      Z(K)=Z(K)+ASS(KEY1+L)*VEC(L)
   70 Z(L)=Z(L)+ASS(KEY1+L)*VEC(K)
   80 I1=I2+1
      RETURN
      END
