inv33
C INV33 SOURCE PV 18/06/19 21:15:08 9861 IMPLICIT REAL*8(A-H,O-Z) IMPLICIT INTEGER(I-N) * *-------------------------------------------------------------------- * CALCUL DE L'INVERSE D'UNE MATRICE 3*3 (METHODE DES MINEURS) * H. BUNG 03-95 *-------------------------------------------------------------------- * * ENTREE : AA(3,3) * SORTIE : USA(3,3) ET DET , LRET (=0 OK, =1 ERREUR) * * IMPLICIT NONE * * * REAL *8 AA(3,3),USA(3,3),DET * INTEGER LRET DIMENSION AA(3,3),USA(3,3) * * REAL *8 PRECIS,GRAND,CC1,CC2,CC3,UNSDET * INTEGER I * * * * *--- CALCUL DU DETERMINANT * CC1 = AA(2,2)*AA(3,3) - AA(3,2)*AA(2,3) CC2 = - AA(1,2)*AA(3,3) + AA(3,2)*AA(1,3) CC3 = AA(1,2)*AA(2,3) - AA(2,2)*AA(1,3) * LRET=0 ELSE LRET=1 DO J=1,3 DO I=1,3 END DO END DO GOTO 9 ENDIF * * USA(1,1)= CC1 * UNSDET USA(1,2)= CC2 * UNSDET USA(1,3)= CC3 * UNSDET USA(2,1)= ( - AA(2,1)*AA(3,3) + AA(3,1)*AA(2,3) ) * UNSDET USA(2,2)= ( AA(1,1)*AA(3,3) - AA(3,1)*AA(1,3) ) * UNSDET USA(2,3)= ( - AA(1,1)*AA(2,3) + AA(2,1)*AA(1,3) ) * UNSDET USA(3,1)= ( AA(2,1)*AA(3,2) - AA(3,1)*AA(2,2) ) * UNSDET USA(3,2)= ( - AA(1,1)*AA(3,2) + AA(3,1)*AA(1,2) ) * UNSDET USA(3,3)= ( AA(1,1)*AA(2,2) - AA(2,1)*AA(1,2) ) * UNSDET * 9 CONTINUE * END
© Cast3M 2003 - Tous droits réservés.
Mentions légales