ABSTRACT

The data set used to illustrate subroutine thomas is taken from Example 1.17. The output generated by the Thomas algorithm program is presented below.

Output 1.3. Solution by the Thomas algorithm.

The Thomas algorithm

A and b

A, b, and x after elimination

1.8.4. Successive-Over-Relaxation (SOR) Successive-over-relaxation (SOR) is based on Eqs. (1.212) and (1.213):

U= 1,2, ... ,n) (1.220b)

A FORTRAN subroutine, subroutine sor, for solving these equations is presented below. Program main defines the data set and prints it, calls subroutine sor to implement the solution, and prints the solution. Input variable iw is a flag for output of intermediate results. When iw = 0, no intermediate results are output. When iw = 1, intermediate results are output.