C
C
C     ============================
      SUBROUTINE IMINV(IA,IB,JDET)
C     ============================
C
C
C     .. Scalar Arguments ..
      INTEGER JDET
C     ..
C     .. Array Arguments ..
      INTEGER IA(3,3),IB(3,3)
C     ..
C     .. Local Scalars ..
      INTEGER I,I1,I2,J,J1,J2
C     ..
C
C
      DO 20 J = 1,3
        DO 10 I = 1,3
          I1 = 2 - I/2
          I2 = 3 - I/3
          J1 = 2 - J/2
          J2 = 3 - J/3
          IA(I,J) = (IB(J1,I1)*IB(J2,I2)-IB(J2,I1)*IB(J1,I2))*
     +              (-1)** (I+J)
   10   CONTINUE
   20 CONTINUE
C
C
      JDET = IB(1,1)*IA(1,1) + IB(1,2)*IA(2,1) + IB(1,3)*IA(3,1)
C
C
      DO 40 I = 1,3
        DO 30 J = 1,3
          IA(I,J) = IA(I,J)/JDET
   30   CONTINUE
   40 CONTINUE
C
C
      END
