-
Notifications
You must be signed in to change notification settings - Fork 46
linint_Cheb
Fabian Kindermann edited this page Apr 2, 2021
·
10 revisions
subroutine linint_Cheb(x, left, right, n, il, ir, phi)
This subroutine calculates nodes and weights for the linear interpolation of data that is located on an Chebychev grid of nodes , see grid_Cons_Cheb. It therefore calculates the indices of a left and right gridpoints and as well as an interpolation weight , so that we can calculate the linear interpolant as
-
real*8 :: x
orreal*8 :: x(:)
The point(s) where to evaluate the interpolating polynomial. This can be either a scalar or a one-dimensional array of arbitrary size. In the latter case, the polynomial is evaluated at each point supplied in the arrayx
. -
real*8 :: left
The left interval endpoint of the Chebychev grid . -
real*8 :: right
The right interval endpoint of the Chebychev grid . -
integer :: n
The number of gridpoints the Chebychev grid is made up of.
-
integer :: il
orinteger :: il(:)
The left interpolation node(s) . If the input valuex
is a scalar, this needs to be a scalar. Ifx
is a one-dimensional array, this also needs to be a one-dimensional array with exactly the same length. -
integer :: ir
orinteger :: ir(:)
The right interpolation node(s) . If the input valuex
is a scalar, this needs to be a scalar. Ifx
is a one-dimensional array, this also needs to be a one-dimensional array with exactly the same length. -
real*8 :: phi
orreal*8 :: phi(:)
The interpolation weight(s) . If the input valuex
is a scalar, this needs to be a scalar. Ifx
is a one-dimensional array, this also needs to be a one-dimensional array with exactly the same length.
- 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.