6 common /comffs/ axm(nip),ax0(nip),axp(nip)
11 dimension fwrk(nip,njp),ffwrk(nip,njp)
21 fwrk(i,j)=-curf(i,j)*r(i)
25 call
foursol(ni,nj,wdm,fwrk,ffwrk,r,z,axm,ax0,axp)
28 if(itin.le.2 ) wght=1.0d0
32 wdm(i,j)=wdm(i,j)*wght+(1.d0-wght)*wdmx(i,j)
48 common /comwrc/ rsp,
p,ip
50 real*8 zw(neqp),rsp(nspp),wdm(nip,njp)
52 integer p(neqp),ip(neqp),isp(nspp),ipath,flag,esp
54 equivalence(rsp(1),isp(1))
56 c equivalence(right(1),zw(1))
60 if(isol.ne.0) go to 20
62 call
odrvd(neq,ia,ja,a,
p,ip,nspp,isp,1,flag)
77 call
sdrvd(neq,
p,ip,ia,ja,a,right,zw,nspp,
78 * isp,rsp,esp,ipath,flag)
81 c
write(6,*)
'zw(i) i',i,zw(i)
91 if(itin.le.2 ) wght=1.0d0
98 wdm(i,j)=zw(ieq)*wght+(1.d0-wght)*wdm(i,j)
125 znev=znev+a(im)*zw(ic)
138 c
write(6,*)
'***right znev ***',il,right(il),znev
139 znmx=dmax1(znmx,znab)
143 c
write(6,*)
'nev:',znmx
147 c-----------------------------------------------------------------------
150 subroutine foursol(ni,nj,u,f,ff,x,y,axm,ax0,axp)
152 implicit real*8(a-h,o-z)
155 dimension u(nip,njp),f(nip,njp),x(nip),y(njp)
156 dimension ff(nip,njp)
157 dimension ff1(njp),w(njp),slam(njp),a(njp)
158 dimension ap(nip),bp(nip),cp(nip),fp(nip)
159 dimension alf(nip),bet(nip),u1(nip)
160 dimension axm(nip),axp(nip),ax0(nip)
162 c-------power nj=2*mm definition
166 if(
md/2*2.ne.
md)
then
167 write(*,*)
'nj-1 must be power of 2.program is terminated '
172 if(
md.eq.1) go to 446
187 u(i,2)=u(i,2)-u(i,1)/hy**2
188 u(i,nj-1)=u(i,nj-1)-u(i,nj)/hy**2
192 u(2,j)=u(2,j)-u(1,j)*axm(2)
193 u(ni-1,j)=u(ni-1,j)-u(ni,j)*axp(ni1)
214 slam(k)=4.d0*dsin(0.5d0*(k-1.d0)*pi/nj1)**2/hy**2
219 cp(i-1)=ax0(i)+slam(k)
226 call
prog1d(ni-2,u1(2), ap,bp,cp,fp, alf,bet)
263 SUBROUTINE rft1 (MM, X, Y, MODE)
264 c fast fourier transform in one dimension.
265 c ==================================================================
266 IMPLICIT REAL*8(a-h,o-z)
268 COMMON /fdata/f,rttwo, n, n2, m, nc, ns, nd, nr
269 COMMON /fwork/ w(2048)
270 c ==================================================================
271 c==== fixed
DATA preparation.
273 IF(mode .NE. 1 .AND. mode .NE. 4)
md = mm + 1
276 c==== copy input vector into working storage.
278 10 w(nd+i) = x(i) * f
279 go to(20, 30, 40, 50, 30, 40), mode
280 c==== general analysis.
284 c==== dcodsine analysis or synthesis.
287 c==== dsine analysis or synthesis.
292 c==== general synthesis.
295 c==== copy into
output vector.
299 c ==================================================================
303 c ==================================================================
304 IMPLICIT REAL*8(a-h,o-z)
305 COMMON /fdata/ f,rttwo,n, n2, m, nc, ns, ndata, nres
306 COMMON /fwork/ w(2048)
307 c ==================================================================
316 w(nor+it) = w(nir+it) + w(nir+it+nq)
317 10 w(noi+it) = w(nir+it) - w(nir+it+nq)
318 c==== 0 .LT. tprime .LE. np / 2
321 IF(no1 - no2) 20, 40, 60
327 re = cc * w(nir+ni2+it) - ss * w(nii+ni2+it)
328 ai = ss * w(nir+ni2+it) + cc * w(nii+ni2+it)
329 w(nor+no1+it) = w(nir+ni1+it) + re
330 w(nor+no2+it) = w(nir+ni1+it) - re
331 w(noi+no1+it) = w(nii+ni1+it) + ai
332 30 w(noi+no2+it) = - w(nii+ni1+it) + ai
335 IF(no1 - no2) 20, 40, 60
338 w(nor+no1+it) = w(nii +it)
339 50 w(noi+no1+it) = w(nii+nq+it)
347 c ==================================================================
351 c ==================================================================
352 IMPLICIT REAL*8(a-h,o-z)
353 COMMON /fdata/ f,rttwo,n, n2, m, nc, ns, ndata, nres
354 COMMON /fwork/ w(2048)
355 c ==================================================================
364 w(nor+it) = w(nir+it) + w(nii+it)
365 20 w(nor+it+nq) = w(nir+it) - w(nii+it)
366 c==== 0 .LT. tprime .LT. np/2.
369 IF(ni1 - ni2) 40, 80, 120
375 w(nor+no1+it) = w(nir+ni1+it) + w(nir+ni2+it)
376 re = w(nir+ni1+it) - w(nir+ni2+it)
377 w(noi+no1+it) = w(nii+ni1+it) - w(nii+ni2+it)
378 ai = w(nii+ni1+it) + w(nii+ni2+it)
379 w(nor+no2+it) = cc * re + ss * ai
380 50 w(noi+no2+it) = cc * ai - ss * re
383 IF(ni1 - ni2) 40, 80, 120
385 w(noi +it) = w(nir+ni1+it) * 2.0d0
386 90 w(noi+nq+it) = w(nii+ni1+it) * 2.0d0
392 IF(l .GT. 0) go to 10
395 c ==================================================================
398 c
REAL odd analysis or synthesis.
399 c ==================================================================
400 IMPLICIT REAL*8(a-h,o-z)
401 COMMON /fdata/ f,rttwo,n, n2, m, nc, ns, ndata, nres
402 COMMON /fwork/ w(2048)
403 c ==================================================================
414 IF(nql .EQ. 0) go to 20
416 w(nob+it) = w(nib+it) - w(nim-it)
417 10 w(nom+it) = w(nib+it) + w(nim-it)
418 20
IF(nqh .NE. nql) w(nom) = 2.0d0 * w(nib+nqh)
419 c==== 0 .LT. tprime .LT. np/2.
422 IF(no1 - no2) 40, 80, 120
424 w(nob+no1) = w(nib+ni) + w(nim+ni)
425 w(nob+no2) = - w(nib+ni) + w(nim+ni)
426 IF(nql .EQ. 0) go to 60
430 re = cc * w(nie+ni-it) - ss * w(nim+ni-it)
431 ai = ss * w(nie+ni-it) + cc * w(nim+ni-it)
432 w(nom+no1+it) = w(nim+ni+it) - re
433 w(nom+no2+it) = w(nim+ni+it) + re
434 w(nob+no1+it) = w(nib+ni+it) + ai
435 50 w(nob+no2+it) = - w(nib+ni+it) + ai
436 60
IF(nqh .EQ. nql) go to 70
438 w(nom+no1)=2.d0*(w(ns+nr)*w(nim+ni+nqh) + w(nc+nr)*w(nib+ni+nqh))
439 w(nom+no2)=2.d0*(w(nc+nr)*w(nim+ni+nqh) - w(ns+nr)*w(nib+ni+nqh))
442 IF(no1 - no2) 40, 80, 120
443 80 w(nob+no1) = w(nim)
444 IF(nql .EQ. 0) go to 100
446 w(nom+no1+it) = w(nim+it)
447 90 w(nob+no1+it) = w(nie-it)
448 100
IF(nqh .NE. nql) w(nom+no1) = rttwo * w(nim+nqh)
456 c ==================================================================
459 c
REAL even analysis or synthesis.
460 c ==================================================================
461 IMPLICIT REAL*8(a-h,o-z)
462 COMMON /fdata/ f,rttwo,n, n2, m, nc, ns, ndata, nres
463 COMMON /fwork/ w(2048)
464 c ==================================================================
475 w(nob ) = w(nib) + w(nim)
476 w(nob+n2) = w(nib) - w(nim)
477 IF(nql .EQ. 0) go to 20
479 w(nob+it) = w(nib+it) + w(nim-it)
480 10 w(nom+it) = w(nib+it) - w(nim-it)
481 20
IF(nqh .NE. nql) w(nom) = w(nib+nqh) * 2.d0
482 c==== 0 .LT. tprime .LT. np / 2
485 IF(no1 - no2) 40, 80, 120
487 w(nob+no1) = w(nib+ni) + w(nim+ni)
488 w(nob+no2) = w(nib+ni) - w(nim+ni)
489 IF(nql .EQ. 0) go to 60
493 re = cc * w(nim+ni-it) - ss * w(nie+ni-it)
494 ai = ss * w(nim+ni-it) + cc * w(nie+ni-it)
495 w(nob+no1+it) = w(nib+ni+it) + re
496 w(nob+no2+it) = w(nib+ni+it) - re
497 w(nom+no1+it) = w(nim+ni+it) - ai
498 50 w(nom+no2+it) = - w(nim+ni+it) - ai
499 60
IF(nqh .EQ. nql) go to 70
501 w(nom+no1)=2.d0*(w(nc+nr)*w(nib+ni+nqh) - w(ns+nr)*w(nim+ni+nqh))
502 w(nom+no2)=2.d0*(w(ns+nr)*w(nib+ni+nqh) + w(nc+nr)*w(nim+ni+nqh))
505 IF(no1 - no2) 40, 80, 120
507 80 w(nob+no1) = w(nib+n2)
508 IF(nql .EQ. 0) go to 100
510 w(nob+no1+it) = w(nim+it)
511 90 w(nom+no1+it) = - w(nie-it)
512 100
IF(nqh .NE. nql) w(nom+no1) = rttwo * w(nim+nqh)
520 c ==================================================================
523 c prepare fixed
DATA for fast fourier transform.
524 c ==================================================================
525 IMPLICIT REAL*8(a-h,o-z)
526 COMMON /fdata/f,rttwo, n, n2, m, nc, ns, ndata, nres
527 COMMON /fwork/ w(2048)
530 c ==================================================================
531 IF(mm .LT. 0) go to 90
537 da = 6.2831853071796d0 * f
552 c ==================================================================
subroutine rft1(MM, X, Y, MODE)
subroutine foursol(ni, nj, u, f, ff, x, y, axm, ax0, axp)
subroutine solve(isol, wdm)
subroutine solve_spar(isol, wdm)
subroutine prog1d(M, U, A, B, C, F, ALF, BET)
subroutine output(NGRID, betpol, zli3)
real(r8) function p(a, x, xr, xs, yr, ys, psi, psir, F_dia)