-
Notifications
You must be signed in to change notification settings - Fork 46
linint_Gen
Fabian Kindermann edited this page Apr 1, 2021
·
5 revisions
function linint_Gen(x, xi, yi, istart_in)
Interpolates the (arbitrary) data pairs with a piecewise linear function. The interpolant is evaluated at the supplied value .
-
real*8 :: x
The point where to evaluate the interpolating piecewise linear function. -
real*8 :: xi(:)
A one-dimensional array containing the nodes at which the interpolation data is supplied. Note that the data can be arbitrary, but needs to be supplied in ascending order, otherwise the subroutine does not work. -
real*8 :: yi(:)
A one-dimensional array containing the interpolation data at the nodesxi
. This input variable needs to have the same length asxi
.
-
integer :: istart_in
If you have a good guess of a gridpoint that is very closely located to the interpolation pointx
, you can supply its index through this optional input variable. By doing so, you can speed up the process of interpolation significantly.
-
real*8 :: linint_Gen
The value of the interpolating piecewise linear function at the point supplied inx
.
- For further reading refer to:
- Süli, E. & Mayers, D. F. (2003). An Introduction to Numerical Analysis. Cambridge: Cambridge University Press.
- Powell, M.J.D. (1996). Approximation Theory and Methods. Cambridge: Cambridge University Press.
- This routine is used in the following programs:
prog08_07.f90