25 integer,
intent(in) :: nx
26 integer,
intent(in) :: ny
27 real(kind=kind_real),
intent(out) :: x(nx,ny)
28 real(kind=kind_real),
intent(in) :: b(nx,ny)
29 real(kind=kind_real),
intent(in) :: c
30 real(kind=kind_real),
intent(in) :: deltax
31 real(kind=kind_real),
intent(in) :: deltay
33 real(kind=kind_real) :: v(ny), z(ny), bext(nx+2,ny), xext(nx+2,ny)
34 real(kind=kind_real) :: pi, am, bm, w
35 integer :: k, i, iri, jj
37 x(:,:) = 0.0_kind_real
39 if (maxval(abs(b))>0.0_kind_real)
then 43 call fft_fwd(nx,b(:,jj),bext(:,jj))
46 pi = 4.0_kind_real*atan(1.0_kind_real)
54 am = c + 2.0_kind_real*( cos( 2.0_kind_real*
real(k,kind_real)*pi &
55 /
real(nx,kind_real)) &
56 -1.0_kind_real)/(deltax*deltax) &
57 - 2.0_kind_real/(deltay*deltay)
59 bm = 1.0_kind_real/(deltay*deltay)
63 z(1) = bext(2*k+iri,1)/am
68 z(i) = (bext(2*k+iri,i)-bm*z(i-1))/w
71 xext(2*k+iri,ny) = z(ny)
73 xext(2*k+iri,i) = z(i) - v(i)*xext(2*k+iri,i+1)
80 call fft_inv(nx,xext(:,jj),x(:,jj))
subroutine, public fft_inv(kk, pf, pg)
Fortran module for Eigen FFTs.
subroutine solve_helmholz(x, b, c, nx, ny, deltax, deltay)
Solve a Helmholz equation.
subroutine, public fft_fwd(kk, pg, pf)