10 real(r8),
intent(in) :: x1, x1s, x2, x2s
11 real(r8),
intent(in) :: s
13 real(r8),
intent(out) :: x, xs
15 real(r8) :: h0m, h0p, h1m, h1p, h0ms, h0ps, h1ms, h1ps
17 h0m = (s - 1._r8)**2 * (s + 2._r8) * 0.25_r8
18 h0ms = (s - 1._r8) * (s + 2._r8) / 2._r8 + (s - 1._r8)**2 &
20 h0p = -(s + 1._r8)**2 * (s - 2._r8) * 0.25_r8
21 h0ps = -(s + 1._r8) * (s - 2._r8) / 2._r8 - (s + 1._r8)**2 &
23 h1m = (s - 1._r8)**2 * (s + 1._r8) * 0.25_r8
24 h1ms = (s - 1._r8) * (s + 1._r8) / 2._r8 + (s - 1._r8)**2 &
26 h1p = (s + 1._r8)**2 * (s - 1._r8) * 0.25_r8
27 h1ps = (s + 1._r8) * (s - 1._r8) / 2._r8 + (s + 1._r8)**2 &
30 x = x1 * h0m + x1s * h1m + x2 * h0p + x2s * h1p
31 xs = x1 * h0ms + x1s * h1ms + x2 * h0ps + x2s * h1ps
subroutine cubic_interp_1d(x1, x1s, x2, x2s, s, x, xs)