24 REAL(rprec),
DIMENSION(ns,0:ntor,0:mpol1,3*ntmax),
TARGET,
INTENT(out) :: frzl_array
25 REAL(rprec),
DIMENSION(ns*nzeta*ntheta3,0:1),
INTENT(in) :: &
26 brmn_con, bzmn_con, arcon, azcon
28 INTEGER :: jmax, m, mparity, i, n, k, l, nsz
29 INTEGER :: ioff, joff, mj, ni, nsl, j2, j2l, jl, jll, jmaxl, js
30 REAL(rprec),
DIMENSION(:,:,:),
POINTER :: frcc, frss, fzcs, fzsc, flcs, flsc
31 REAL(rprec),
ALLOCATABLE,
DIMENSION(:,:) :: work1
32 REAL(rprec),
DIMENSION(:),
ALLOCATABLE :: tempr, tempz
34 frcc => frzl_array(:,:,:,
rcc)
36 flsc => frzl_array(:,:,:,
zsc+2*
ntmax)
38 frss => frzl_array(:,:,:,
rss)
40 flcs => frzl_array(:,:,:,
zcs+2*
ntmax)
45 ALLOCATE (work1(nsz,12), tempr(nsz), tempz(nsz), stat=i)
46 IF (i .ne. 0) stop
'Allocation error in VMEC2000 tomnsps'
54 IF (
ivac .lt. 1) jmax = ns1
80 tempr(:) =
xmpq(m,1)*arcon(jll:nsl,mparity)
81 tempz(:) =
xmpq(m,1)*azcon(jll:nsl,mparity)
83 work1(:,1) = work1(:,1) + tempr(:)*cosmui(i,m) + brmn_con(jll:nsl,mparity)*sinmumi(i,m)
84 work1(:,7) = work1(:,7) + tempz(:)*sinmui(i,m) + bzmn_con(jll:nsl,mparity)*cosmumi(i,m)
88 work1(:,3) = work1(:,3) + tempr(:)*sinmui(i,m) + brmn_con(jll:nsl,mparity)*cosmumi(i,m)
89 work1(:,5) = work1(:,5) + tempz(:)*cosmui(i,m) + bzmn_con(jll:nsl,mparity)*sinmumi(i,m)
106 frcc(j2:jmax,ni,mj) = frcc(j2:jmax,ni,mj) + work1(j2l:jmaxl,1)*cosnv(k,n)
107 fzsc(j2:jmax,ni,mj) = fzsc(j2:jmax,ni,mj) + work1(j2l:jmaxl,7)*cosnv(k,n)
111 frss(j2:jmax,ni,mj) = frss(j2:jmax,ni,mj) + work1(j2l:jmaxl,3)*sinnv(k,n)
112 fzcs(j2:jmax,ni,mj) = fzcs(j2:jmax,ni,mj) + work1(j2l:jmaxl,5)*sinnv(k,n)
118 DEALLOCATE (work1, tempr, tempz)
136 brmn_con, bzmn_con, &
142 REAL(rprec),
DIMENSION(ns,0:ntor,0:mpol1,3*ntmax),
TARGET,
INTENT(inout) :: frzl_array
143 REAL(rprec),
DIMENSION(ns*nzeta,ntheta3,0:1),
INTENT(in) :: &
144 brmn_con, bzmn_con, arcon, azcon
146 INTEGER :: jmax, m, mparity, i, n, k, l, nsz
147 INTEGER :: ioff, joff, mj, ni, nsl, j2, j2l, jl, jll, jmaxl, js
148 REAL(rprec),
DIMENSION(:,:,:),
POINTER :: frcs, frsc, fzcc, fzss, flcc, flss
149 REAL(rprec),
DIMENSION(:),
ALLOCATABLE :: temp1, temp3
150 REAL(rprec),
DIMENSION(:,:),
ALLOCATABLE :: work1
152 frsc => frzl_array(:,:,:,
rsc)
154 flcc => frzl_array(:,:,:,
zcc+2*
ntmax)
156 frcs => frzl_array(:,:,:,
rcs)
158 flss => frzl_array(:,:,:,
zss+2*
ntmax)
162 ALLOCATE (work1(nsz,12), temp1(nsz), temp3(nsz), stat=i)
163 IF (i .ne. 0) stop
'Allocation error in VMEC tomnspa'
165 ioff = lbound(frsc,2)
166 joff = lbound(frsc,3)
169 IF (
ivac .lt. 1) jmax = ns1
184 temp1(:) =
xmpq(m,1)*arcon(:,i,mparity)
185 temp3(:) =
xmpq(m,1)*azcon(:,i,mparity)
187 work1(:,3) = work1(:,3) + temp1(:)*sinmui(i,m) + brmn_con(:,i,mparity)*cosmumi(i,m)
188 work1(:,5) = work1(:,5) + temp3(:)*cosmui(i,m) + bzmn_con(:,i,mparity)*sinmumi(i,m)
192 work1(:,1) = work1(:,1) + temp1(:)*cosmui(i,m) + brmn_con(:,i,mparity)*sinmumi(i,m)
193 work1(:,7) = work1(:,7) + temp3(:)*sinmui(i,m) + bzmn_con(:,i,mparity)*cosmumi(i,m)
209 frsc(j2:jmax,ni,mj) = frsc(j2:jmax,ni,mj) + work1(j2l:jmaxl,3)*cosnv(k,n)
210 fzcc(j2:jmax,ni,mj) = fzcc(j2:jmax,ni,mj) + work1(j2l:jmaxl,5)*cosnv(k,n)
214 frcs(j2:jmax,ni,mj) = frcs(j2:jmax,ni,mj) + work1(j2l:jmaxl,1)*sinnv(k,n)
215 fzss(j2:jmax,ni,mj) = fzss(j2:jmax,ni,mj) + work1(j2l:jmaxl,7)*sinnv(k,n)
221 DEALLOCATE (work1, temp1, temp3)
integer ivac
counts number of free-boundary iterations
real(rprec), dimension(0:mpol1d, 3) xmpq
spectral condensation weighting factors