V3FIT
cftrig.f90
1  SUBROUTINE cftrig_g (n, trigs)
2  USE stel_kinds
3  IMPLICIT NONE
4 !-----------------------------------------------
5 ! D u m m y A r g u m e n t s
6 !-----------------------------------------------
7  INTEGER n
8  REAL(rprec), DIMENSION(*) :: trigs
9 #if !defined(CRAY) || defined(LONESTAR) || defined(MCURIE)
10 !-----------------------------------------------
11 ! L o c a l P a r a m e t e r s
12 !-----------------------------------------------
13  REAL(rprec), PARAMETER :: one = 1, two = 2, p5 = .5_dp
14 !-----------------------------------------------
15 ! L o c a l V a r i a b l e s
16 !-----------------------------------------------
17  INTEGER :: l, i
18  REAL(rprec) :: pi, del, angle
19 !-----------------------------------------------
20  pi = two*asin(one)
21  del = (pi + pi)/n
22  l = n + n
23  DO 10 i=1,l,2
24  angle=(p5*del)*(i-1)
25  trigs(i)=cos(angle)
26  trigs(i+1)=sin(angle)
27  10 CONTINUE
28 #else
29  CALL cftrig (n, trigs)
30 #endif
31  END SUBROUTINE cftrig_g