VMEC 8.52
3D Equilibrium solver with nested flux surfaces.
Loading...
Searching...
No Matches
fsym_invfft.f90
Go to the documentation of this file.
1
3
8SUBROUTINE fsym_invfft (bsubsu, bsubsv)
9 USE vmec_main, ONLY: rprec, ns, nzeta, ntheta1, ntheta2, ntheta3, ireflect
10 IMPLICIT NONE
11
12 REAL(rprec), DIMENSION(ns*nzeta,ntheta3,0:1), INTENT(inout) :: bsubsu, bsubsv
13
14 INTEGER :: ir, i, jkz, jkr
15
16 ! EXTENDS FUNCTION FROM ntheta2 to ntheta3 range
17 ! ASSUMES bsubsu,v(0) ~ cos(mu-nv)
18 ! bsubsu,v(1) ~ sin(mu-nv)
19
20 DO i = 1+ntheta2, ntheta1
21 ! -theta
22 ir = ntheta1+2-i
23 DO jkz= 1, ns*nzeta
24 ! -zeta
25 jkr = ireflect(jkz)
26 bsubsu(jkz,i,0) = bsubsu(jkr,ir,0) - bsubsu(jkr,ir,1)
27 bsubsv(jkz,i,0) = bsubsv(jkr,ir,0) - bsubsv(jkr,ir,1)
28 END DO
29 END DO
30
31 bsubsu(:,:ntheta2,0)=bsubsu(:,:ntheta2,0) + bsubsu(:,:ntheta2,1)
32 bsubsv(:,:ntheta2,0)=bsubsv(:,:ntheta2,0) + bsubsv(:,:ntheta2,1)
33
34END SUBROUTINE fsym_invfft
subroutine fsym_invfft(bsubsu, bsubsv)
Extends function from ntheta2 to ntheta3 range.
integer, dimension(:), allocatable ireflect
two-dimensional array for computing 2pi-v angle