1 SUBROUTINE foranl(nu, nv, nfp, nunv, lasym)
3 USE booz_persistent,
ONLY: cosm_b, cosn_b, sinm_b, sinn_b,
4 1 cosm_nyq, cosn_nyq, sinm_nyq, sinn_nyq, thgrd, ztgrd
5 USE booz_params,
ONLY: mpol1, ntor, mpol_nyq, ntor_nyq
10 INTEGER :: nu, nv, nfp, nunv
11 LOGICAL,
INTENT(in) :: lasym
15 INTEGER :: lk, lt, lz, istat=0
16 REAL(rprec) :: dth, dzt, twopi
18 IF (.not.
ALLOCATED(cosm_b))
ALLOCATE (
19 1 cosm_b(nunv,0:mpol1), sinm_b(nunv,0:mpol1),
20 2 cosn_b(nunv,0:ntor), sinn_b(nunv,0:ntor),
21 3 cosm_nyq(nunv,0:mpol_nyq), sinm_nyq(nunv,0:mpol_nyq),
22 4 cosn_nyq(nunv,0:ntor_nyq), sinn_nyq(nunv,0:ntor_nyq),
23 6 thgrd(nunv), ztgrd(nunv), stat=istat)
24 IF (istat .ne. 0) stop
'Allocation error in foranl'
26 twopi = 8*atan(1.0_dp)
33 dth = twopi/(2*(nu-1))
42 thgrd(lk) = (lt-1)*dth
43 ztgrd(lk) = (lz-1)*dzt
47 CALL trigfunc (thgrd, ztgrd, cosm_b, sinm_b, cosn_b, sinn_b,
50 CALL trigfunc (thgrd, ztgrd, cosm_nyq, sinm_nyq, cosn_nyq,
51 1 sinn_nyq, mpol_nyq, ntor_nyq, nunv)