13SUBROUTINE fouri(grpmn, gsource, amatrix, amatsq, bvec, wint, lasym)
21 REAL(rprec),
DIMENSION(mnpd,nv,nu3,ndim),
INTENT(in) :: grpmn
22 REAL(rprec),
DIMENSION(nuv),
INTENT(in) :: gsource
23 REAL(rprec),
DIMENSION(mnpd,mnpd,ndim**2),
INTENT(out) :: amatrix
24 REAL(rprec),
DIMENSION(mnpd2,mnpd2),
INTENT(out) :: amatsq
25 REAL(rprec),
DIMENSION(0:mf,-nf:nf,ndim),
INTENT(inout) :: bvec
26 REAL(rprec),
DIMENSION(nuv2),
intent(in) :: wint
27 logical,
intent(in) :: lasym
30 REAL(rprec),
PARAMETER :: int_ext = 1
32 INTEGER :: k, i, j, n, kvi, kui, mn, m, mn0, isym
33 REAL(rprec) :: cosn, sinn, cosm, sinm
60 source(j,i,1) = gsource(k) - gsource(imirr(k))
67 source(j,i,2) = gsource(k) + gsource(imirr(k))
94 actemp(:,n,:,isym) =
actemp(:,n,:,isym) + cosn*grpmn(:,kvi,:,isym)
95 astemp(:,n,:,isym) =
astemp(:,n,:,isym) + sinn*grpmn(:,kvi,:,isym)
117 bvec(m,-nf:nf,1) = bvec(m,-nf:nf,1) +
bcos(kui,-nf:nf,1)*sinm -
bsin(kui,-nf:nf,1)*cosm
119 bvec(m,-nf:nf,2) = bvec(m,-nf:nf,2) +
bcos(kui,-nf:nf,2)*cosm +
bsin(kui,-nf:nf,2)*sinm
127 cosm = cosu(m,kui)*wint(kui*nv)
128 sinm = sinu(m,kui)*wint(kui*nv)
131 amatrix(:,m+1:mnpd:mf1,1) = amatrix(:,m+1:mnpd:mf1,1) + sinm*
actemp(:,-nf:nf,kui,1) - cosm*
astemp(:,-nf:nf,kui,1)
135 amatrix(:,m+1:mnpd:mf1,2) = amatrix(:,m+1:mnpd:mf1,2) + cosm*
actemp(:,-nf:nf,kui,1) + sinm*
astemp(:,-nf:nf,kui,1)
138 amatrix(:,m+1:mnpd:mf1,3) = amatrix(:,m+1:mnpd:mf1,3) + sinm*
actemp(:,-nf:nf,kui,2) - cosm*
astemp(:,-nf:nf,kui,2)
141 amatrix(:,m+1:mnpd:mf1,4) = amatrix(:,m+1:mnpd:mf1,4) + cosm*
actemp(:,-nf:nf,kui,2) + sinm*
astemp(:,-nf:nf,kui,2)
155 amatrix = (
pi2*
pi2)*amatrix
159 bvec(0,-nf:-1,1:ndim) = 0
165 amatrix(1:mn0-mf1:mf1, :, 1:ndim*ndim) = 0
169 amatrix(mn,mn,1) = amatrix(mn,mn,1) +
pi3*int_ext
177 amatrix(mn,mn,4) = amatrix(mn,mn,4) +
pi3*int_ext
183 amatrix(mn0,mn0,4) = amatrix(mn0,mn0,4) +
pi3*int_ext
189 amatsq(:mnpd,:mnpd) = amatrix(:,:,1)
193 amatsq(:mnpd,1+mnpd:mnpd2) = amatrix(:,:,2)
196 amatsq(1+mnpd:mnpd2,:mnpd) = amatrix(:,:,3)
199 amatsq(1+mnpd:mnpd2,1+mnpd:mnpd2) = amatrix(:,:,4)
205 call add_real_2d(
"source", nv, nu2,
source)
207 call add_real_2d(
"bcos", nu2, nf1,
bcos)
208 call add_real_2d(
"bsin", nu2, nf1,
bsin)
210 call add_real_4d(
"actemp", mf1, nf1, nf1, nu3,
actemp)
211 call add_real_4d(
"astemp", mf1, nf1, nf1, nu3,
astemp)
213 call add_real_2d(
"bvec", mf1, nf1, bvec)
214 call add_real_4d(
"amatrix", mf1, nf1, mf1, nf1, amatrix)
216 call add_real_2d(
"amatsq", mf1*nf1, mf1*nf1, amatsq)