1 SUBROUTINE fftrans(r0c, z0c, rhoc, rhos, rbc, zbs, rbs, zbc,
12 REAL(rprec),
DIMENSION(nphi) :: r0c, z0c
13 REAL(rprec),
DIMENSION(0:mrho-1,nphi) :: rhoc, rhos
14 REAL(rprec),
DIMENSION(0:mpol-1,-nphi2:nphi2) ::
16 REAL(rprec),
DIMENSION(0:nphi2) :: rmnaxis, zmnaxis
20 INTEGER :: i, mn, mreal, nreal
21 REAL(rprec),
DIMENSION(nv) :: intgrate, argi
22 REAL(rprec) :: delphi,dn,rmc_p,zms_p,rms_p,zmc_p,
31 argi(i) = twopi*(i - 1)/real(nphi*nfp,rprec)
34 rbc = 0; zbs = 0; rbs = 0; zbc = 0
41 CALL getrz(rmc_p,rms_p,zmc_p,zms_p,r0c(i),z0c(i),
42 1 rhoc(0,i),rhos(0,i),mreal,mrho)
46 rbc(mreal,nreal) = rbc(mreal,nreal) + intgrate(i)*(tcosn*
47 1 rmc_p + tsinn*rms_p)
48 zbs(mreal,nreal) = zbs(mreal,nreal) + intgrate(i)*(tcosn*
49 1 zms_p - tsinn*zmc_p)
50 zbc(mreal,nreal) = zbc(mreal,nreal) + intgrate(i)*(tcosn*
51 1 zmc_p + tsinn*zms_p)
52 rbs(mreal,nreal) = rbs(mreal,nreal) + intgrate(i)*(tcosn*
53 1 rms_p - tsinn*rmc_p)
59 IF (mreal.eq.0 .and. nreal.eq.0)
THEN
60 rmnaxis(0) = dot_product(intgrate(:nphi),raxis(:nphi))
62 ELSE IF (mreal.eq.0 .and. nreal.gt.0)
THEN
63 rbc(0,nreal) = 2*rbc(0,nreal)
64 rbs(0,nreal) = 2*rbs(0,nreal)
65 zbc(0,nreal) = 2*zbc(0,nreal)
66 zbs(0,nreal) = 2*zbs(0,nreal)
69 rmnaxis(nreal) = rmnaxis(nreal) + sum(2*intgrate(:nphi)*
70 1 raxis(:nphi)*cos(dn*argi(:nphi)))
71 zmnaxis(nreal) = zmnaxis(nreal) - sum(2*intgrate(:nphi)*
72 1 zaxis(:nphi)*sin(dn*argi(:nphi)))
76 END SUBROUTINE fftrans