1 subroutine tb15a(n ,n_bnd, x, f, d, w, lp)
17 integer(itm_i4) :: lp, n, n_bnd
18 real(r8) :: d(n_bnd + 2), f(n_bnd + 2), x(n_bnd + 2)
19 real(r8) :: w(3 * n_bnd + 6)
20 real(r8) :: a3n1, f1, f2, h1, h2,
p
21 integer(itm_i4) :: i, k
25 write (lp,
'(a39)')
'return from tb15a because n too small'
30 if (x(i) <= x(i - 1))
then
31 write (lp,
'(a29, i3, a13)')
'return from tb15a because ', i, &
37 if (f(1) /= f(n))
then
38 write (lp,
'(a40)')
'return from tb15ad because f(1) /= f(n)'
43 h1 = 1._r8 / (x(i) - x(i - 1))
46 h2 = 1._r8 / (x(2) - x(1))
49 h2 = 1._r8 / (x(i + 1) - x(i))
53 w(3 * i - 1) = 2._r8 * (h1 + h2)
55 d(i) = 3._r8 * (f2 * h2 * h2 + f(i) * (h1 * h1 - h2 * h2) - f1 * h1 &
62 w(k + 3) = w(k + 3) -
p * w(k + 1)
63 d(i + 1) = d(i + 1) -
p * d(i)
64 w(k + 2) = -
p * w(k - 1)
66 a3n1 = -
p * w(k - 1) + a3n1
67 d(n) = d(n) -
p * d(i)
70 p = (w(k + 2) + w(k - 1)) / w(k)
71 a3n1 = a3n1 -
p * (w(k + 1) + w(k - 1))
72 d(n) = (d(n) -
p * d(n - 1)) / a3n1
75 d(k) = (d(k) - w(3 * k) * d(k + 1) - w(3 * k - 2) * d(n)) / w(3 * k - 1)
subroutine tb15a(n, n_bnd, x, f, d, w, lp)
real(r8) function p(a, x, xr, xs, yr, ys, psi, psir, F_dia)