*DECK ALLDLF
      SUBROUTINE ALLDLF (L4,ASS,MU1)
*
*-----------------------------------------------------------------------
*
* IN-PLACE L-D-L(T) FACTORIZATION OF A SYMMETRIC POSITIVE DEFINITE
* MATRIX IN COMPRESSED DIAGONAL STORAGE MODE.
*
* INPUT PARAMETERS:
*    L4 : ORDER OF THE COEFFICIENT MATRIX.
*   ASS : COEFFICIENT MATRIX IN COMPRESSED DIAGONAL STORAGE MODE.
*         A(I,J)=ASS(MU1(I)-I+J) IF J.LE.I AND J.GT.I+MU1(I-1)-MU1(I)
*               =A(J,I)          IF I.LT.J
*               =0.0             ELSE
*         DIMENSION ASS(MU1(L4)-MU1(1)+1)
*   MU1 : POSITION OF EACH DIAGONAL ELEMENT IN VECTOR ASS.
*         DIMENSION MU1(L4)
*
* OUTPUT PARAMETER:
*   ASS : LU FACTORS.
*
*-----------------------------------------------------------------------
*
      INTEGER L4,MU1(L4)
      REAL ASS(*)
*
      ASS(MU1(1))=1./ASS(MU1(1))
      IF (L4.EQ.1) RETURN
      DO K=2,L4
        KLL=K-1
        K1=MU1(K)-K
        KM=MU1(K-1)+1-K1
        KMM=KM+1
        IF(KMM-K .LE. 0) THEN
          IF(KMM-K .LT. 0) THEN
            DO I=KMM,KLL
              R=ASS(K1+I)
              ASS(K1+I)=0.0
              S=0.0
              I1=MU1(I)-I
              IM=MU1(I-1)+1-I1
              IMIN=MAX0(IM,KM)
              DO J=IMIN,I
                S=S+ASS(K1+J)*ASS(I1+J)
              ENDDO
              ASS(K1+I)=R-S
            ENDDO
          ENDIF
          S=0.0
          DO I=KM,KLL
            R=ASS(K1+I)
            ASS(K1+I)=R*ASS(MU1(I))
            S=S+R*ASS(K1+I)
          ENDDO
          ASS(MU1(K))=ASS(MU1(K))-S
        ENDIF
        ASS(MU1(K))=1./ASS(MU1(K))
      ENDDO
      RETURN
      END
