by |
(figure provided by Jacque Marshall) |
FISHPACK contains a collection of Fortran77 subroutines that solve second- and fourth-order finite difference approximations to separable elliptic Partial Differential Equations (PDEs). These include Helmholtz equations in cartesian, polar, cylindrical, and spherical coordinates, as well as more general separable elliptic equations. The solvers use the cyclic reduction algorithm. When the problem is singular, a least-squares solution is computed. Singularities induced by the coordinate system are handled, including at the origin r=0 in cylindrical coordinates, and at the poles in spherical coordinates.
Test programs are provided for the 19 solvers. Each serves two purposes: as a template to guide you in writing your own codes utilizing the FISHPACK solvers, and as a demonstration on your computer that you can correctly produce FISHPACK executables.
The FISHPACK library and programs are intended to be installed on your computer using the Makefile provided when you download the files in this distribution. The Makefile builds the library and driver executables under the compiler you specify when you run "make".
If your application requires solution of nonseparable elliptic PDEs, or a mix of separable and nonseparable ones, consider using the MUDPACK library instead of FISHPACK. MUDPACK uses multigrid iteration to approximate separable and nonseparable elliptic PDEs. The software is available on NCAR's web pages. If you are solving separable elliptic PDEs only, and prefer Fortran90 syntax, then you may want to use FISHPACK90, also available on NCAR's web pages. Both FISHPACK and FISHPACK90 have the same functionality.
CAVEAT: FISHPACK source code is known to break the Fortran77 Standard in various ways. In particular, some of the routines pass arguments of one type and use them as another. We have not compiled a comprehensive list of FISHPACK infractions. Prospective users who require complete adherence to the standard for their applications are advised that this package is not compliant.
The most complete source of documentation for FISHPACK is this present document.
Also viewable is older document Efficient FORTRAN Subprograms for the Solution of Elliptic Partial Differential Equations by Paul Swarztrauber and Roland Sweet, NCAR Technical Note-TN/IA-109,July 1975. Readers will notice certain name changes e.g. PWSCRT instead of HWSCRT, and the fact that only 7 of the 19 solvers are discussed in the document. However, it contains technical discussion not available elsewhere.
Document Partial.pdf for solvers HWSCRT and HWSPLR is available when you download from the NCAR FISHPACK home page. It is also viewable from the tabs at the top of the NCAR FISHPACK homepage.
Programs, solvers and support files including some documentation are available at the download tab on the top of the NCAR FISHPACK home page. This distribution favors users running Linux, Mac, or Unix systems with a Fortran compiler, because it uses a Unix-based build system.
available on those systems.The following table summarizes the contents of FISHPACK. Descriptions can be obtained by clicking on the solver name. Descriptions of the PDEs solved are also included after the table.
An Overview of FISHPACK Solvers | ||
---|---|---|
computation | subprogram | test program |
2D Helmholtz in Cartesian coordinates (centered grid) | hwscrt | thwscrt |
2D Helmholtz in polar coordinates (centered grid) | hwsplr | thwsplr |
2D Helmholtz in cylindrical coordinates (centered grid) | hwscyl | thwscyl |
2D Helmholtz in spherical coordinates (centered grid) | hwsssp | thwsssp |
2D Helmholtz in spherical coordinates (centered grid, axisymmetric) | hwscsp | thwscsp |
2D Helmholtz in Cartesian coordinates (staggered grid) | hstcrt | thstcrt |
2D Helmholtz in polar coordinates (staggered grid) | hstplr | thstplr |
2D Helmholtz in cylindrical coordinates (staggered grid) | hstcyl | thstcyl |
2D Helmholtz in spherical coordinates (staggered grid) | hstssp | thstssp |
2D Helmholtz in spherical coordinates (staggered grid, axisymmetric) | hstcsp | thstcsp |
3D Helmholtz in Cartesian coordinates (centered grid) | hw3crt | thw3crt |
2D General Separable PDE (second or fourth order, centered grid) | sepeli | tsepeli |
2D Separable PDE (second or fourth order, centered grid) | sepx4 | tsepx4 |
real linear systems solver (centered grid, sepx4) | genbun | tgenbun |
real block tridiagonal linear systems solver (centered grid, sepeli) | blktri | tblktri |
real linear systems solver (staggered grid) | poistg | tpoistg |
real linear systems solver (3D, centered grid) | pois3d | tpois3d |
complex linear systems solver (centered grid) | cmgnbn | tcmgnbn |
complex block tridiagonal linear systems solver (centered grid) | cblktri | tcblktri |
real and complex fft package | fftpack | use with 3D solvers |
The form of the elliptic equations approximated are outlined below. The solvers allow periodic, specified, or derivative boundary conditions.
Subroutine for solving the standard five-point finite difference approximation to the Helmholtz equation in cartesian coordinates using a centered finite difference grid.
(d/dx)(du/dx) + (d/dy)(du/dy) + lambda*u = f(x,y)
Additional files required: genbun, gnbnaux, comf
Sample program file: thwscrt
Subroutine for solving a five-point finite difference approximation to the Helmholtz equation in polar coordinates using a centered finite difference grid.
(1/r)(d/dr)(r(du/dr)) + (1/r**2)(d/dtheta)(du/dtheta) + lambda*u = f(r,theta)
Additional files required: genbun, gnbnaux, comf
Sample program file: thwsplr
Subroutine for solving a five-point finite difference approximation to the modified Helmholtz equation in cylindrical coordinates using a centered finite difference grid.
(1/r)(d/dr)(r(du/dr)) + (d/dz)(du/dz) + (lambda/r**2)*u = f(r,z)
Additional files required: genbun, gnbnaux, comf
Sample program file: thwscyl
Subroutine for solving a five-point finite difference approximation to the Helmholtz equation in spherical coordinates and on the surface of the unit sphere using a centered finite difference grid
(1/sin(theta))(d/dtheta)(sin(theta)(du/dtheta)) +
(1/sin(theta)**2)(d/dphi)(du/dphi) + lambda*u = f(theta,phi)
Additional files required: genbun, gnbnaux, comf
Sample program file: thwsssp
Subroutine for solving a five-point finite difference approximation to the modified Helmholtz equation in spherical coordinates assuming axisymmetry (no dependence on longitude) using a centered finite difference grid.
(1/r**2)(d/dr)(r**2(du/dr)) +
1/(r**2*sin(theta))(d/dtheta)(sin(theta)(du/dtheta)) +
(lambda/(r*sin(theta)**2))*u = f(theta,r)
Additional files required: blktri, comf
Sample program file: thwscsp
Subroutine for solving the standard five-point finite difference approximation to the Helmholtz equation in cartesian coordinates using a staggered finite difference grid
(d/dx)(du/dx) + (d/dy)(du/dy) + lambda*u = f(x,y)
Additional files required: genbun, poistg, gnbnaux, comf
Sample program file: thstcrt
Subroutine for solving a five-point finite difference approximation to the Helmholtz equation in polar coordinates using a staggered finite difference grid
(1/r)(d/dr)(r(du/dr)) + (1/r**2)(d/dtheta)(du/dtheta) + lambda*u = f(r,theta)
Additional files required: genbun, poistg, gnbnaux, comf
Sample program file: thstplr
Subroutine for solving a five-point finite difference approximation to the modified Helmholtz equation in cylindrical coordinates using a staggered finite difference grid.
(1/r)(d/dr)(r(du/dr)) + (d/dz)(du/dz) + (lambda/r**2)*u = f(r,z)
Additional files required: genbun, poistg, gnbnaux, comf
Sample program file: thstcyl
Subroutine for solving a five-point finite difference approximation to the Helmholtz equation in spherical coordinates and on the surface of the unit sphere using a staggered finite difference grid
(1/sin(theta))(d/dtheta)(sin(theta)(du/dtheta)) +
(1/sin(theta)**2)(d/dphi)(du/dphi) + lambda*u = f(theta,phi)
Additional files required: genbun, poistg, gnbnaux, comf
Sample program file: thstssp
Subroutine for solving a five-point finite difference approximation to the modified Helmholtz equation in spherical coordinates assuming axisymmetry (no dependence on longitude) using a staggered finite difference grid.
(1/r**2)(d/dr)(r**2(du/dr)) +
1/(r**2*sin(theta))(d/dtheta)(sin(theta)(du/dtheta)) +
(lambda/(r*sin(theta)**2))*u = f(theta,r)
Additional files required: blktri, comf
Sample program file: thwscsp
Subroutine for solving the standard seven-point finite difference approximation to the Helmholtz equation in cartesian coordinates using a centered finite difference grid.
(d/dx)(du/dx) + (d/dy)(du/dy) + (d/dz)(du/dz) + lambda*u = f(x,y,z)
Additional files required: pois3d, comf, fftpack
Sample program file: thw3crt
Subroutine for automatically discretizing and solving second and (optionally) fourth order finite difference approximations on a uniform grid to certain separable elliptic partial differential equations with constant coefficients in one direction on a rectangle.
a(x)(d/dx)(du/dx) + b(x)du/dx + c(x)u + (d/dy)(du/dy) = g(x,y)
Additional files required: genbun, gnbnaux, comf
Sample program file: tsepx4
Subroutine for automatically discretizing and solving second and (optionally) fourth order finite difference approximations on a uniform grid to the general separable elliptic partial differential equation on a rectangle.
a(x)(d/dx)(du/dx) + b(x)du/dx + c(x)u + d(y)(d/dy)(du/dy) + e(y)du/dy + f(y)u = g(x,y)
Additional files required: blktri, comf
Sample program file: tsepeli
Subroutine for solving the real linear system of equations that results from a finite difference approximation on a centered grid to certain two-dimensional elliptic partial differential equations (e.g., see sepx4) with constant coefficients in one direction.
Additional files required: gnbnaux, comf
Sample program file: tgenbun
Subroutine for solving block tridiagonal linear systems that arise from finite difference approximations to separable two-dimensional elliptic partial differential equations (see sepeli).
Additional files required: comf
Sample program file: tblktri
Subroutine for solving a block tridiagonal linear system of equations that arises from finite difference approximations on a staggered grid to two-dimensional elliptic partial differential equations with constant coefficients in one direction.
Additional files required: gnbnaux, comf
Sample program file: tpoistg
Subroutine for solving a block tridiagonal linear system of equations that arises from finite difference approximations to three-dimensional elliptic partial differential equations in a box.
Additional files required: comf, fftpack
Sample program file: tpois3d
Subroutine for solving a complex block tridiagonal linear system arising from finite difference approximations to separable complex two-dimensional elliptic partial differential equations in a box.
Additional files required: comf
Sample program file: tcmgnbn
Subroutine for solving a complex block tridiagonal linear system of equations arising from finite difference approximation to separable complex two-dimensional elliptic partial differential equations.
Additional files required: comf
Sample program file: tcblktri
Return to beginning of this document