Given arrays x(1:n) and y(1:n) containing a tabulated function, i.e.,
, with , and given values yp1 and ypn
for the 1st derivative of the interpolating function at points
1 and n, respectively, this routine returns an array y2(1:n) of
length n which contains the second derivatives of the interpolating
function at the tabulated points xi.
If yp1 and/or ypn are equal to 1.e30 or larger, the routine is
signaled to set the corresponding boundary condition for a natural
spline, with zero second derivative on that boundary.
Parameter: NMAX is the largest anticipated value of n.
Note
Taken from "Numerical Recipes in Fortran 77", W.H.Press et al.
This routine returns an array y2(1:n) of length n which contains the second derivatives of the interpolating function at the tabulated points xi.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | nmax | ||||
| real(kind=dp), | dimension(nmax) | :: | x | |||
| real(kind=dp), | dimension(nmax) | :: | y | |||
| integer | :: | n | ||||
| real(kind=dp) | :: | yp1 | ||||
| real(kind=dp) | :: | ypn | ||||
| real(kind=dp), | dimension(nmax) | :: | y2 |
This routine returns an array y2(1:n) of length n which contains the second derivatives of the interpolating function at the tabulated points xi.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | nmax | ||||
| real(kind=dp), | dimension(nmax) | :: | x | |||
| complex(kind=dp), | dimension(nmax) | :: | y | |||
| integer | :: | n | ||||
| complex(kind=dp) | :: | yp1 | ||||
| complex(kind=dp) | :: | ypn | ||||
| complex(kind=dp), | dimension(nmax) | :: | y2 |