APPENDIX B
FISHPAK
The FORTRAN package FISHPAK developed by Swarztrauber and Sweet
is used for our numerical experiments. Documentation for the package is given
in ACM Algorithm 541 [24]. The original package is written in single precision.
In order to get more precise numerical results, a double precision version package
is obtained by a little adjustment. The subroutine POIS3D is used to solve for
potentials in our model. POIS3D solves the linear system of equations for unknown
X values,
C1*(X(I-1,J,K) 2.*X(I,J,K) + X(I+1,J,K)) +
C2*(X(I,J-1,K) 2.*X(I,J,K) + X(I,J+1,K)) +
A(K)*X(I,J,K-1) + B(K)*X(I,J,K) + C(K)*X(I,J,K+1)
= F(I,J,K),
where I = 1, 2, .--, L, J = 1, 2, M, and K = 1, 2, --- ,N. The indices K-1 and
K+1 are evaluated modulo N, i.e. X(I,J,0)=X(I,J,N) and X(I,J,N+1)=X(I,J,1).
The unknowns X(0,J,K), X(L+1,J,K), X(I,0,K), and X(I,M+1,K) are assumed
to take on certain prescribed values. The operation count for POIS3D is roughly
proportional to
L x M x N x (log2 M + log2 N + 5).