Télécharger kpinv3.eso

Retour à la liste

Numérotation des lignes :

  1. C KPINV3 SOURCE CB215821 16/04/21 21:17:34 8920
  2. SUBROUTINE KPINV3(A,D)
  3. IMPLICIT INTEGER(I-N)
  4. IMPLICIT REAL*8 (A-H,O-Z)
  5. DIMENSION A(3,3),D(3,3)
  6. C
  7. C calcul de D=A-1
  8. C
  9. C Y1 A11 + Y2 A12 + Y3 A13 = B1
  10. C Y1 A21 + Y2 A22 + Y3 A23 = B2
  11. C Y1 A31 + Y2 A32 + Y3 A33 = B3
  12. C
  13. A11 = A(1,1)
  14. A12 = A(1,2)
  15. A13 = A(1,3)
  16. A21 = A(2,1)
  17. A22 = A(2,2)
  18. A23 = A(2,3)
  19. A31 = A(3,1)
  20. A32 = A(3,2)
  21. A33 = A(3,3)
  22.  
  23. DELTA= (A11*A22*A33 + A21*A32*A13 + A31*A12*A23)
  24. & -(A31*A22*A13 + A21*A12*A33 + A11*A32*A23)
  25. DDD=ABS(DELTA)
  26. IF(DDD.LT.1D-20) THEN
  27. WRITE(6,*) '>PINV3 : matrice singuliere'
  28. CALL ARRET(0)
  29. RETURN
  30. ELSE
  31.  
  32. D(1,1) = (A22*A33-A32*A23)/DELTA
  33. D(2,1) = (A31*A23-A21*A33)/DELTA
  34. D(3,1) = (A21*A32-A31*A22)/DELTA
  35.  
  36. D(1,2) = (A32*A13-A12*A33)/DELTA
  37. D(2,2) = (A11*A33-A31*A13)/DELTA
  38. D(3,2) = (A31*A12-A11*A32)/DELTA
  39.  
  40. D(1,3) = (A12*A23-A22*A13)/DELTA
  41. D(2,3) = (A21*A13-A11*A23)/DELTA
  42. D(3,3) = (A11*A22-A21*A12)/DELTA
  43.  
  44. ENDIF
  45. RETURN
  46. END
  47.  
  48.  
  49.  
  50.  
  51.  

© Cast3M 2003 - Tous droits réservés.
Mentions légales