14SUBROUTINE alias(gcons, ztemp, gcs, gsc, gcc, gss)
18 REAL(rprec),
DIMENSION(ns*nzeta,ntheta3),
INTENT(out) :: gcons
19 REAL(rprec),
DIMENSION(ns*nzeta,ntheta3),
INTENT(in) :: ztemp
20 REAL(rprec),
DIMENSION(ns,0:ntor,0:mpol1),
intent(inout) :: gcs, gsc, gcc, gss
22 REAL(rprec),
PARAMETER :: p5 = 0.5_dp
24 INTEGER :: m, i, ir, jk, jka, n, k, js, l
25 REAL(rprec),
DIMENSION(:,:),
ALLOCATABLE :: work, gcona
30 ALLOCATE (work(ns*nzeta,4), gcona(ns*nzeta,ntheta3))
35 gcs = 0.0_dp; gsc = 0.0_dp
36 gcc = 0.0_dp; gss = 0.0_dp
44 work(jk,1) = work(jk,1) + ztemp(jk,i)*cosmui(i,m)
45 work(jk,2) = work(jk,2) + ztemp(jk,i)*sinmui(i,m)
52 work(jk,3) = work(jk,3) + ztemp(jka,ir)*cosmui(i,m)
53 work(jk,4) = work(jk,4) + ztemp(jka,ir)*sinmui(i,m)
63 gcs(js,n,m) = gcs(js,n,m) +
tcon(js)*work(js+l,1)*sinnv(k,n)
64 gsc(js,n,m) = gsc(js,n,m) +
tcon(js)*work(js+l,2)*cosnv(k,n)
68 gcs(js,n,m) = gcs(js,n,m) + p5*
tcon(js)*sinnv(k,n)*(work(js+l,1)-work(js+l,3))
69 gsc(js,n,m) = gsc(js,n,m) + p5*
tcon(js)*cosnv(k,n)*(work(js+l,2)-work(js+l,4))
70 gss(js,n,m) = gss(js,n,m) + p5*
tcon(js)*sinnv(k,n)*(work(js+l,2)+work(js+l,4))
71 gcc(js,n,m) = gcc(js,n,m) + p5*
tcon(js)*cosnv(k,n)*(work(js+l,1)+work(js+l,3))
84 work(js+l,3) = work(js+l,3) + gcs(js,n,m)*sinnv(k,n)
85 work(js+l,4) = work(js+l,4) + gsc(js,n,m)*cosnv(k,n)
89 work(js+l,1) = work(js+l,1) + gcc(js,n,m)*cosnv(k,n)
90 work(js+l,2) = work(js+l,2) + gss(js,n,m)*sinnv(k,n)
98 gcons(jk,i) = gcons(jk,i) + (work(jk,3)*cosmu(i,m) + work(jk,4)*sinmu(i,m))*
faccon(m)
102 gcona(jk,i) = gcona(jk,i) + (work(jk,1)*cosmu(i,m) + work(jk,2)*sinmu(i,m))*
faccon(m)
112 DO i = 1 + ntheta2, ntheta1
116 gcons(jk,i) = -gcons(jka,ir) + gcona(jka,ir)
121 gcons(:,:ntheta2) = gcons(:,:ntheta2) + gcona(:,:ntheta2)
125 DEALLOCATE (work, gcona)
integer, dimension(:), allocatable ireflect
two-dimensional array for computing 2pi-v angle
real(rprec), dimension(0:mpol1d) faccon
factor for spectral constraint
real(rprec), dimension(:), allocatable tcon
constraint-force multiplier