![]() |
(git:b77b4be)
|
Simple splines Splines are fully specified by the interpolation points, except that at the ends, we have the freedom to prescribe the second derivatives. If we know a derivative at an end (exactly), then best is to impose that. Otherwise, it is better to use the "consistent" end conditions: the second derivative is determined such that it is smooth. More...
Functions/Subroutines | |
real(dp) function, dimension(size(xnew)), public | spline3 (x, y, xnew) |
... | |
subroutine, public | spline3ders (x, y, xnew, ynew, dynew, d2ynew) |
... | |
Simple splines Splines are fully specified by the interpolation points, except that at the ends, we have the freedom to prescribe the second derivatives. If we know a derivative at an end (exactly), then best is to impose that. Otherwise, it is better to use the "consistent" end conditions: the second derivative is determined such that it is smooth.
High level API: spline3, spline3ders. Low level API: the rest of public soubroutines.
Use the high level API to obtain cubic spline fit with consistent boundary conditions and optionally the derivatives. Use the low level API if more fine grained control is needed.
This module is based on a code written by John E. Pask, LLNL.
real(dp) function, dimension(size(xnew)), public splines::spline3 | ( | real(dp), dimension(:), intent(in) | x, |
real(dp), dimension(:), intent(in) | y, | ||
real(dp), dimension(:), intent(in) | xnew | ||
) |
subroutine, public splines::spline3ders | ( | real(dp), dimension(:), intent(in) | x, |
real(dp), dimension(:), intent(in) | y, | ||
real(dp), dimension(:), intent(in) | xnew, | ||
real(dp), dimension(:), intent(out), optional | ynew, | ||
real(dp), dimension(:), intent(out), optional | dynew, | ||
real(dp), dimension(:), intent(out), optional | d2ynew | ||
) |