pdire3
C PDIRE3 SOURCE CHAT 05/01/13 02:11:26 5004 c--------------------------------------------------------------------- c c c===================================================================== c = c This routine computes the eigenvectors. = c = c Input : xl (3) eigenvalues = c s (6) original matrix = c Output: v (3,3) eigenvectors (normalised) = c = c Note: s = (Sxx, Syy, Szz, Sxy, Sxz, Syz) = c xl = (S11, S22, S33) = c = c===================================================================== IMPLICIT INTEGER(I-N) real*8 s (6), xl (3), v (3,3) c c parameter (toler = 1.0 d-07) c c a1 = abs ((xl(2)-xl(3))*compi) a2 = abs ((xl(1)-xl(3))*compi) a3 = abs ((xl(1)-xl(2))*compi) c=====---------------------------------------------------------------- c case-a: three equal eigenvalues | c=====---------------------------------------------------------------- if (a1 .lt. toler .and. a2 .lt. toler) then v (1,1) = 1.0 d0 v (2,2) = 1.0 d0 v (3,3) = 1.0 d0 v (1,2) = 0.0 d0 v (1,3) = 0.0 d0 v (2,1) = 0.0 d0 v (2,3) = 0.0 d0 v (3,1) = 0.0 d0 v (3,2) = 0.0 d0 return end if c=====---------------------------------------------------------------- c case-b: two equal eigenvalues | c=====---------------------------------------------------------------- if (a1 .lt. toler) then return end if if (a2 .lt. toler) then return end if if (a3 .lt. toler) then return end if c=====---------------------------------------------------------------- c case-c: three different eigenvalues | c=====---------------------------------------------------------------- c dot = v (1,1) * v (1,2) + v (2,1) * v (2,2) + v (3,1) * v (3,2) c v (1,2) = v (1,2) - dot * v (1,1) v (2,2) = v (2,2) - dot * v (2,1) v (3,2) = v (3,2) - dot * v (3,1) c xn = 1.0 d0 / SQRT (v(1,2)**2+v(2,2)**2+v(3,2)**2) c v (1,2) = v (1,2) * xn v (2,2) = v (2,2) * xn v (3,2) = v (3,2) * xn v (1,3) = v (2,1) * v (3,2) - v (3,1) * v (2,2) v (2,3) = v (3,1) * v (1,2) - v (1,1) * v (3,2) v (3,3) = v (1,1) * v (2,2) - v (2,1) * v (1,2) c return end
© Cast3M 2003 - Tous droits réservés.
Mentions légales