CalculiX  2.13
A Free Software Three-Dimensional Structural Finite Element Program
calceigenvalues.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine calceigenvalues (c, al)
 

Function/Subroutine Documentation

◆ calceigenvalues()

subroutine calceigenvalues ( real*8, dimension(3,3)  c,
real*8, dimension(3)  al 
)
20 !
21 ! calculates the eigenvalues al of the symmetric 3x3 matrix c
22 ! the eigenvalues are sorted in increasing order
23 !
24  implicit none
25 !
26  integer idummy(3),three,kflag,i
27 !
28  real*8 c(3,3),al(3),v1,v2,v3,bb,cc,cm,cn,tt,pi
29 !
30  data kflag /1/
31  data three /3/
32 !
33 ! calculation of the eigenvalues of c
34 ! Simo & Hughes Computational Inelasticity p 244
35 !
36  pi=4.d0*datan(1.d0)
37 !
38  v1=c(1,1)+c(2,2)+c(3,3)
39  v2=c(2,2)*c(3,3)+c(1,1)*c(3,3)+c(1,1)*c(2,2)-
40  & (c(2,3)*c(2,3)+c(1,3)*c(1,3)+c(1,2)*c(1,2))
41  v3=c(1,1)*(c(2,2)*c(3,3)-c(2,3)*c(2,3))
42  & -c(1,2)*(c(1,2)*c(3,3)-c(1,3)*c(2,3))
43  & +c(1,3)*(c(1,2)*c(2,3)-c(1,3)*c(2,2))
44 !
45  bb=v2-v1*v1/3.d0
46  cc=-2.d0*v1**3/27.d0+v1*v2/3.d0-v3
47  if(dabs(bb).le.1.d-10) then
48  if(dabs(cc).gt.1.d-10) then
49  al(1)=-cc**(1.d0/3.d0)
50  else
51  al(1)=0.d0
52  endif
53  al(2)=al(1)
54  al(3)=al(1)
55  else
56  cm=2.d0*dsqrt(-bb/3.d0)
57  cn=3.d0*cc/(cm*bb)
58  if(dabs(cn).gt.1.d0) then
59  if(cn.gt.1.d0) then
60  cn=1.d0
61  else
62  cn=-1.d0
63  endif
64  endif
65  tt=datan2(dsqrt(1.d0-cn*cn),cn)/3.d0
66  al(1)=cm*dcos(tt)
67  al(2)=cm*dcos(tt+2.d0*pi/3.d0)
68  al(3)=cm*dcos(tt+4.d0*pi/3.d0)
69  endif
70  do i=1,3
71  al(i)=al(i)+v1/3.d0
72  enddo
73 !
74 ! sorting
75 !
76  call dsort(al,idummy,three,kflag)
77 !
78  return
static double * v1
Definition: mafillsmmain_se.c:40
subroutine dsort(dx, iy, n, kflag)
Definition: dsort.f:6
Hosted by OpenAircraft.com, (Michigan UAV, LLC)