      SUBROUTINE CHRM(Y)
C
C  ROUTINE FOR THE COMPUTATION OF THE ELEMENTS OF THE CHRISTOFFEL
C  MATRIX FOR AN ARBITRARY ANISOTROPIC MEDIUM
C
      DIMENSION Y(6)
      COMMON /APROX/ A11,A12,A13,A14,A15,A16,A22,A23,A24,A25,A26,A33,
     1               A34,A35,A36,A44,A45,A46,A55,A56,A66,
     1               DXA11,DXA12,DXA13,DXA14,DXA15,DXA16,DXA22,DXA23,
     1               DXA24,DXA25,DXA26,DXA33,DXA34,DXA35,DXA36,DXA44,
     1               DXA45,DXA46,DXA55,DXA56,DXA66,
     1               DYA11,DYA12,DYA13,DYA14,DYA15,DYA16,DYA22,DYA23,
     1               DYA24,DYA25,DYA26,DYA33,DYA34,DYA35,DYA36,DYA44,
     1               DYA45,DYA46,DYA55,DYA56,DYA66,
     1               DZA11,DZA12,DZA13,DZA14,DZA15,DZA16,DZA22,DZA23,
     1               DZA24,DZA25,DZA26,DZA33,DZA34,DZA35,DZA36,DZA44,
     1               DZA45,DZA46,DZA55,DZA56,DZA66,
     1               A2546,A1266,A1355,A1456,A3645,A2344
      COMMON /AUXI/  IANI(20),INTR,INT1,IOUT,KRE,IREFR,LAY,NDER,IPRINT,
     1 MPRINT,NTR,ISQRT,NAUX,ISOUR,MAUX,MREG,MDIM,IPOL,MSCON,LOUT,
     2 IAMP,MTRNS,ICOEF,IAD,IRHO,ISHEAR,IAC,IRT,mori
      INTEGER CODE
      COMMON /COD/  CODE(50,2),KREF,KC,ITYPE
      COMMON /DJK/  D11,D12,D13,D22,D23,D33,DTR
      COMMON /GAM/  C11,C12,C13,C22,C23,C33
C
      P1=Y(4)
      P2=Y(5)
      P3=Y(6)
      P2P3=P2*P3
      P1P2=P1*P2
      P1P3=P1*P3
      P1P1=P1*P1
      P2P2=P2*P2
      P3P3=P3*P3
      C11=P1P1*A11+P2P2*A66+P3P3*A55
     1+2.*(P2P3*A56+P1P3*A15+P1P2*A16)
      C22=P1P1*A66+P2P2*A22+P3P3*A44
     1+2.*(P2P3*A24+P1P3*A46+P1P2*A26)
      C33=P1P1*A55+P2P2*A44+P3P3*A33
     1+2.*(P2P3*A34+P1P3*A35+P1P2*A45)
      C23=P1P1*A56+P2P2*A24+P3P3*A34
     1   +P2P3*A2344+P1P3*A3645+P1P2*A2546
      C13=P1P1*A15+P2P2*A46+P3P3*A35
     1   +P2P3*A3645+P1P3*A1355+P1P2*A1456
      C12=P1P1*A16+P2P2*A26+P3P3*A45
     1   +P2P3*A2546+P1P3*A1456+P1P2*A1266
      C11N=C11-1.
      C22N=C22-1.
      C33N=C33-1.
      C23SQ=C23*C23
      C13SQ=C13*C13
      C12SQ=C12*C12
      D11=C22N*C33N-C23SQ
      D22=C11N*C33N-C13SQ
      D33=C11N*C22N-C12SQ
      D12=C13*C23-C12*C33N
      D13=C12*C23-C13*C22N
      D23=C12*C13-C23*C11N
      DTR=D11+D22+D33
      IF(ABS(DTR).LT.0.00001)THEN
        IND=10
      END IF
      RETURN
      END
