TRIDAG Subroutine

subroutine TRIDAG(n, a, b, c, r, u, ierror)


Date : 15/9/99
Purpose: Solves for a vector U a tridiagonal linear set. * References: * Press, W.H., B.P. Flannery, S.A. Teukolsky & W.T. Vetterling, 1989. * Numerical Recipes in FORTRAN. Cambridge University Press, New York. * pp 40-41 *


Input: N - Number of equations * A,B,C - Coefficients of the matrix * R - known vector * Output: U - solved vector *


Arguments

Type IntentOptional Attributes Name
integer :: n
real(kind=8) :: a(n)
real(kind=8) :: b(n)
real(kind=8) :: c(n)
real(kind=8) :: r(n)
real(kind=8) :: u(n)
integer :: ierror