source: PSPA/parmelaPSPA/tags/v0.1/rotate.f @ 101

Last change on this file since 101 was 101, checked in by garnier, 12 years ago

premier tag

File size: 655 bytes
Line 
1      subroutine rotate
2c---rotate particle cordinates around axis
3c---------------------------------------------------------------------------
4c
5      include 'param_sz.h'
6      include 'pcordcom.h'
7      include 'syscom.h'
8      include 'ucom.h'
9c
10c--------------------------------------------------------------------------
11c*
12      ne=rne
13      ang=el(4,ne)
14      r=sqrt(x**2+y**2)
15      rbg=sqrt(bgx**2+bgy**2)
16      phi=atan2(y,x)-ang
17      bgphi=atan2(bgy,bgx)-ang
18      x=r*cos(phi)
19      y=r*sin(phi)
20      bgx=rbg*cos(bgphi)
21      bgy=rbg*sin(bgphi)
22      return
23      end
24c++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*
Note: See TracBrowser for help on using the repository browser.