Computers in Physics · 1994 · 13 citations · 0 references
ComputingComputer SciencePhysicsComputational MechanicsComputational PhysicsScientific ComputingFinite Difference MethodsIterative SolversNumerical AlgorithmsNumerical AnalysisNumerical Methods For Differential EquationsDiscretization Of Partial Differential EquationsElliptic Partial Differential EquationsFinite Difference Solution Of Partial Differential EquationsNumerical Solutions Of Partial Differential EquationsPartial Differential Equation SolversPoisson EquationPoisson's EquationSuccessive Over-relaxation
The program RELAX3D is useful for the solution of the three-dimensional, second-order, elliptic partial differential equation, ∇2V(x,y,z)=F(x,y,z), which includes Laplace’s equation and Poisson’s equation. It uses the finite-difference algorithm known as symmetric successive over-relaxation. After a brief survey of other solution techniques, the program is described in detail and several examples of its actual use are given. The program is interactive and accurately solves for V according to the function F and the arbitrary boundary conditions, both supplied via the user-encoded subroutine ‘‘BND.’’ The functions V and F are defined on grids of two or three dimensions, in Cartesian, cylindrical, or polar coordinates. To improve the efficiency of the repetitive five-point or seven-point relaxation iterations on the grid, conventional fortran array addressing is replaced by a fast hard-coded addressing method. In the inner loop where the program spends most of its time, references to the V and F arrays are accomplished using only one addition per address. Detailed derivations are provided for 2D and 3D Cartesian relaxation formulas, with error terms of 𝒪 (h4), 𝒪 (h6), and 𝒪 (h8); we report a set of test computations which verify these formulas. RELAX3D provides alphanumeric printer output with input boundaries clearly displayed, and high-resolution printer or plotter contour maps of any desired slices through the solution region.