next up previous index
Next: D401 Numerical Differentiation Up: CERNLIB Previous: D300 Elliptic Partial

D302 Fast Partial Differential Equation Solver

Routine ID: D302
Author(s): R.C. Le BailLibrary: MATHLIB
Submitter: Submitted: 20.03.1972
Language: FortranRevised: 01.12.1981

ELPAHY uses fast Fourier transform techniques for the solution, over a rectangular domain, of the following elliptic, parabolic or hyperbolic part differential equation:

{d2φ(x,y)dx2}+c1{d2φ(x,y)dy2}+c2{dφ(x,y)dy}+c3φ(x,y) = ρ(x,y)

where φ(x,y) is the unknown function, ρ(x,y) the known source term, and c1,c2,c3 given coefficients. A large variety of boundary conditions can be specified on the sides of the rectangle.

Structure:

SUBROUTINE subprogram
User Entry Names: ELPAHY
Internal Entry Names: NEWRO, ELANAL, ESOLVE, SYNT, MFT
External References: RFT (D700)
COMMON Block Names and Lengths: /FW1/ 774, /FW2/ 100

Usage:

    CALL ELPAHY(F,NX,NY,DX,DY,C,IBX,BWEST,BEAST,JBY,BSOUTH,BNORTH)
F
( REAL) Two-dimensional array, dimensioned (NX,NY) in the calling program. On input it contains the source term ρ(x,y) and on return it contains the unknown function φ(x,y) .
NX
( INTEGER) Number of divisions along X. NX must be of the form 2n+1 .
NY
( INTEGER) Number of divisions along Y.
DX
( REAL) Mesh spacing along X.
DY
( REAL) Mesh spacing along Y.
C
( REAL) One-dimensional array of dimension 3, containing the coefficients c1,c2,c3 .
IBX
( INTEGER) Controls the type of boundary conditions on the left (BWEST) and right (BEAST) sides of the rectangular domain:
IBX=1: Imposed periodicity along x; BWEST, BEAST not given.
IBX=2: Given derivative on either vertical side.
IBX=3: Given value on either vertical side.
IBX=4: Given value on the left side, given derivative on the right side.
BWEST
( REAL) One-dimensional array of size NY containing values or derivatives for the left side; the interpretation depends on IBX.
BEAST
( REAL) One-dimensional array of size NY containing values or derivatives for the right side; the interpretation depends on IBX.

JBY
( INTEGER) Controls the type of boundary conditions on the lower (BSOUTH) und upper (BNORTH) sides of the rectangular domain:
Elliptic equation (c1>0 ):
JBY=1: Given value on both lower and upper sides.
JBY=2: Given derivative on both lower and upper sides.
JBY=3: Given value on lower side, given derivative on upper side.
JBY=4: Given derivative on lower side, given value on upper side.
Parabolic equation (c1=0 ):
Specify BSOUTH array only. (If y=time, BSOUTH are initial values and the future BNORTH cannot be specified).
JBY=1: Given value on lower side.
JBY=2: Given derivative on lower side.
Hyperbolic equation (c1<0 ):
The BSOUTH array specifies the value, the BNORTH array the derivative.
JBY=1 .
BSOUTH
( REAL) One-dimensional array of size NX containing values or derivatives for the lower side; the interpretation depends on JBY.
BNORTH
( REAL) One-dimensional array of size NX containing values or derivatives for the upper side; the interpretation depends on JBY.

Notes:

If NX > 65 , specify COMMON /FWORK/ of length 6*NX and COMMON /FW1/ of length 6*NX in the calling program. If NY > 50 , specify COMMON /FW2/ of length 2*NY. In either case, make sure your program is loaded before ELPAHY (D302) (this is automatic unless you recompile D302 in the same job).

References:

  1. R.C. Le Bail, Use of fast Fourier transforms for solving partial differential equations in physics, J. Comput. Phys. 9 (1972) 440--465
A copy of Ref. 1 is available.

D401

K.S. Kölbig



next up previous index
Next: D401 Numerical Differentiation Up: CERNLIB Previous: D300 Elliptic Partial


Janne Saarela
Mon Apr 3 15:06:23 METDST 1995