13 integer(itm_i4),
intent(in) :: i, j
14 real(r8),
intent(in) :: r0, s0, r, s
16 real(r8),
intent(out) :: h, hr, hs, hrs, hrr, hss
18 real(r8) :: hi, hri, hrri
19 real(r8) :: hj, hsj, hssj
22 hi = -(r + r0)**2 * (r * r0 - 2._r8) / 4._r8
23 hri = -(r + r0) * (r * r0 - 2._r8) / 2._r8 - r0 * (r + r0)**2 &
25 hrri = -1.5_r8 * r * r0
27 hi = r0 * (r + r0)**2 * (r * r0 - 1._r8) / 4._r8
28 hri = r0 * (r + r0) * (r * r0 - 1._r8) / 2._r8 + (r + r0)**2 &
30 hrri = 1.5_r8 * r + 0.5_r8 * r0
33 hj = -(s + s0)**2 * (s * s0 - 2._r8) / 4._r8
34 hsj = -(s + s0) * (s * s0 - 2._r8) / 2._r8 - s0 * (s + s0)**2 &
36 hssj = -1.5_r8 * s * s0
38 hj = s0 * (s + s0)**2 * (s * s0 - 1._r8) / 4._r8
39 hsj = s0 * (s + s0) * (s * s0 - 1._r8) / 2._r8 + (s + s0)**2 &
41 hssj = 1.5_r8 * s + 0.5_r8 * s0
subroutine cubic_polynomials(i, j, r0, s0, r, s, h, hr, hs, hrs, hrr, hss)