COSMOS v7.655  COSMOSv7655
(AirShowerMC)
cgetRotMat3.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine cgetrotmat3 (m, cosa, sina, rm)
 
subroutine cinvrotmat3 (rm, rmn)
 
subroutine cmultrotmat3 (a, b, c)
 
subroutine capplyrot3 (a, v, vn)
 

Function/Subroutine Documentation

◆ capplyrot3()

subroutine capplyrot3 ( real*8, dimension(3,3)  a,
real*8, dimension(3)  v,
real*8, dimension(3)  vn 
)

Definition at line 145 of file cgetRotMat3.f.

145 ! 3-d transformation matrix a is multiplied by
146 ! a vector v to obtain a new vector vn.
147 ! vn can be v.
148 !
149  implicit none
150  real*8 a(3,3), v(3), vn(3)
151 
152 !
153  real*8 sum
154  integer i, j
155 !
156  do i=1, 3
157  sum=0.
158  do j=1, 3
159  sum=sum + a(i, j)*v(j)
160  enddo
161  vn(i)=sum
162  enddo
nodes i
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code kiron data j
Definition: cblkHeavy.h:36
real(4), save a
Definition: cNRLAtmos.f:20

◆ cgetrotmat3()

subroutine cgetrotmat3 ( integer  m,
real*8  cosa,
real*8  sina,
real*8, dimension(3, 3)  rm 
)

Definition at line 80 of file cgetRotMat3.f.

References cerrormsg(), and d0.

80  implicit none
81 !
82  integer m
83  real*8 cosa, sina
84  real*8 rm(3, 3)
85 !
86  integer i, j, m1, m2
87  character*70 msg
88 !
89  if(m .ge. 1 .and. m .le. 3) then
90  do i=1, 3
91  do j=1, 3
92  rm(i, j)= 0.d0
93  enddo
94  enddo
95  rm(m, m)=1.d0
96  m1=mod(m,3)+1
97  m2=mod(m1,3)+1
98  rm(m1,m1)=cosa
99  rm(m2,m2)=cosa
100  rm(m1,m2)=sina
101  rm(m2,m1)=-sina
102  else
103  write(msg, *) ' invalid m=',m,' to cgetRotMat3 '
104  call cerrormsg(msg,0)
105  endif
subroutine cerrormsg(msg, needrtn)
Definition: cerrorMsg.f:4
nodes i
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code kiron data j
Definition: cblkHeavy.h:36
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
block data include Zlatfit h c fitting region data data data data data d0 data data d0 data data m
Definition: ZlatfitBD.h:35
Here is the call graph for this function:

◆ cinvrotmat3()

subroutine cinvrotmat3 ( real*8, dimension(3,3)  rm,
real*8, dimension(3,3)  rmn 
)

Definition at line 108 of file cgetRotMat3.f.

108 ! Invert rotation matrix rm and put into rmn.
109 ! rm should be a roation matrix made by calling
110 ! cgetRotMat3 (with cosa, sina). rmn can be made by calling
111 ! cgetRotMat3 with cosa, -sina, too.
112 ! rmn cannot be the same arrays as rm.
113 ! rmn is nothing but the transposed matrix of rm.
114  implicit none
115  real*8 rm(3,3), rmn(3,3)
116  integer i, j
117  do i=1,3
118  do j=i+1, 3
119  rmn(i,j)=rm(j, i)
120  rmn(j,i)=rm(i, j)
121  enddo
122  enddo
123  do i=1, 3
124  rmn(i,i)=rm(i, i)
125  enddo
nodes i
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code kiron data j
Definition: cblkHeavy.h:36

◆ cmultrotmat3()

subroutine cmultrotmat3 ( real*8, dimension(3,3)  a,
real*8, dimension(3,3)  b,
real*8, dimension(3,3)  c 
)

Definition at line 128 of file cgetRotMat3.f.

128 ! 3-d matrix product c=a*b
129 ! c cannot be either of a or b.
130  implicit none
131  real*8 a(3,3), b(3,3), c(3,3)
132  integer i, j, k
133  real*8 ab
134  do i=1, 3
135  do j=1, 3
136  ab=0.
137  do k=1, 3
138  ab=ab+ a(i,k)*b(k,j)
139  enddo
140  c(i,j)=ab
141  enddo
142  enddo
nodes i
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code kiron data j
Definition: cblkHeavy.h:36
real(4), save a
Definition: cNRLAtmos.f:20
real(4), save b
Definition: cNRLAtmos.f:21
dE dx *! Nuc Int sampling table c
Definition: cblkMuInt.h:130