1 : C JACOD3 SOURCE CHAT 05/01/13 00:48:32 5004 2 : subroutine jacod3(a,idim,d) 3 : C====================================================================== 4 : C OBJET 5 : C ----- 6 : C DIAGONALISATION D UNE MATRICE 3*3 SYMETRIQUE 7 : C sans sortir les vecteurs propres 8 : C 9 : C ENTREES 10 : C ------- 11 : C A(3,3) = MATRICE SYMETRIQUE 12 : C IDIM = 2 OU 3 SI 2 ON NE S OCCUPE QUE DE A(2,2) 13 : C SI 3 DE A(3,3) 14 : C SORTIES 15 : C ------- 16 : C D(3) = VALEURS PROPRES ORDONNEES D(1)>D(2)>D(3) 17 : C 18 : C=============================================================== 19 : IMPLICIT INTEGER(I-N) 20 : IMPLICIT REAL*8 (A-H,O-Z) 21 : dimension a(3,3),d(3),x(3,3) 22 : if (idim.ne.3) then 22 : call jacob2(a,d,x) 23 : return 24 : endif 25 : c3=-1 26 : c2=a(1,1)+a(2,2)+a(3,3) 27 : c1=-(a(1,1)*a(2,2)+a(2,2)*a(3,3)+a(3,3)*a(1,1))+ 28 : > a(1,3)**2+a(1,2)**2+a(2,3)**2 29 : c0=2*a(1,2)*a(1,3)*a(2,3)-a(1,1)*a(2,3)**2- 30 : > a(2,2)*a(1,3)**2-a(3,3)*a(1,2)**2+ 31 : > a(1,1)*a(2,2)*a(3,3) 32 : c0=c0/c3 33 : c1=c1/c3 34 : c2=c2/c3 34 : call degre3(c0,c1,c2,d1,XI1,d2,XI2,d3,XI3) 35 : d(1)=max(d1,d2,d3) 36 : d(3)=min(d1,d2,d3) 37 : d(2)=d1+d2+d3-d(1)-d(3) 38 : end 39 : * 40 : 41 :
© Cast3M 2003 - All rights reserved.
Disclaimer