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

Go to the source code of this file.

Functions/Subroutines

subroutine rotationvectorinv (c, v)
 

Function/Subroutine Documentation

◆ rotationvectorinv()

subroutine rotationvectorinv ( real*8, dimension(3,3), intent(out)  c,
real*8, dimension(3), intent(in)  v 
)
20 !
21 ! calculates rotation matrix from rotation vector
22 !
23  implicit none
24 !
25  real*8 c(3,3),v(3),theta,ds,dc
26 !
27  intent(in) v
28 !
29  intent(out) c
30 !
31  theta=dsqrt(v(1)*v(1)+v(2)*v(2)+v(3)*v(3))
32 !
33  if (theta.eq.0.d0) then
34  c(1,1)=1.d0
35  c(1,2)=0.d0
36  c(1,3)=0.d0
37  c(2,1)=0.d0
38  c(2,2)=1.d0
39  c(2,3)=0.d0
40  c(3,1)=0.d0
41  c(3,2)=0.d0
42  c(3,3)=1.d0
43  else
44 !
45  dc=dcos(theta)
46  ds=dsin(theta)
47 !
48 ! C-matrix from Guido Dhondt, The Finite Element
49 ! Method for Three-Dimensional Thermomechanical
50 ! Applications p 158
51 !
52  c(1,1)=dc+(1.d0-dc)*v(1)*v(1)/(theta*theta)
53  c(1,2)= (1.d0-dc)*v(1)*v(2)/(theta*theta)-ds*v(3)/theta
54  c(1,3)= (1.d0-dc)*v(1)*v(3)/(theta*theta)+ds*v(2)/theta
55  c(2,1)= (1.d0-dc)*v(2)*v(1)/(theta*theta)+ds*v(3)/theta
56  c(2,2)=dc+(1.d0-dc)*v(2)*v(2)/(theta*theta)
57  c(2,3)= (1.d0-dc)*v(2)*v(3)/(theta*theta)-ds*v(1)/theta
58  c(3,1)= (1.d0-dc)*v(3)*v(1)/(theta*theta)-ds*v(2)/theta
59  c(3,2)= (1.d0-dc)*v(3)*v(2)/(theta*theta)+ds*v(1)/theta
60  c(3,3)=dc+(1.d0-dc)*v(3)*v(3)/(theta*theta)
61  endif
62 !
63  return
64 !
Hosted by OpenAircraft.com, (Michigan UAV, LLC)