eqhom3
C EQHOM3 SOURCE CHAT 05/01/12 23:43:56 5004 C SOURCE MARTINEZ C C resolution d'une equation sans second membre dans un espace C a 3 dimensions C C C C IMPLICIT INTEGER(I-N) IMPLICIT REAL*8 (A-H,O-Z) REAL*8 A(3,3),X(3) C A11=A(1,1) A12=A(1,2) A13=A(1,3) A21=A(2,1) A22=A(2,2) A23=A(2,3) A31=A(3,1) A32=A(3,2) A33=A(3,3) C C------- ON RESOUD ApX=Yp, Ap ET Yp CALC. A PARTIR DE A C YP1=-1.D0*(A11*A13+A21*A23+A31*A33) YP2=-1.D0*(A12*A13+A22*A23+A32*A33) C AP11=A11*A11+A21*A21+A31*A31 AP12=A12*A11+A22*A21+A32*A31 AP21=A12*A11+A22*A21+A32*A31 AP22=A12*A12+A22*A22+A32*A32 C IF (ABS(AP11*AP22-AP21*AP12).GT.1.D-12) THEN X(1)=(YP1*AP22-YP2*AP12)/(AP11*AP22-AP21*AP12) X(2)=(YP1*AP21-YP2*AP11)/(AP12*AP21-AP11*AP22) X(3)=1.D0 C ELSE YP1=-1.D0*(A11*A12+A21*A22+A31*A32) YP2=-1.D0*(A12*A13+A22*A23+A32*A33) C AP11=A11*A11+A21*A21+A31*A31 AP12=A13*A11+A23*A21+A33*A31 AP21=A13*A11+A23*A21+A33*A31 AP22=A13*A13+A23*A23+A33*A33 C IF (ABS(AP11*AP22-AP21*AP12).GT.1.D-12) THEN X(1)=(YP1*AP22-YP2*AP12)/(AP11*AP22-AP21*AP12) X(2)=1.D0 X(3)=(YP1*AP21-YP2*AP11)/(AP12*AP21-AP11*AP22) C ELSE YP1=-1.D0*(A11*A13+A21*A23+A31*A33) YP2=-1.D0*(A12*A11+A22*A21+A32*A31) C AP11=A13*A13+A23*A23+A33*A33 AP12=A12*A13+A22*A23+A32*A33 AP21=A12*A13+A22*A23+A32*A33 AP22=A12*A12+A22*A22+A32*A32 C IF (ABS(AP11*AP22-AP21*AP12).GT.1.D-12) THEN X(1)=1.D0 X(2)=(YP1*AP21-YP2*AP11)/(AP12*AP21-AP11*AP22) X(3)=(YP1*AP22-YP2*AP12)/(AP11*AP22-AP21*AP12) ELSE X(1)=0.D0 X(2)=0.D0 X(3)=0.D0 ENDIF ENDIF ENDIF C C RETURN END
© Cast3M 2003 - Tous droits réservés.
Mentions légales