Skip to content

grid_Inv_Cheb

Fabian Kindermann edited this page Apr 2, 2021 · 11 revisions
function grid_Inv_Cheb(x, left, right, n)

Description:

Inverts the formula

for Chebychev gridpoints on the interval , such that

If is equal to a particular gridpoint created by the subroutine grid_Cons_Cheb, then the return value of this function is the integer index . If lies in between two gridpoints values, the function will return a value in between the two integer indices of the gridpoints according to the above formula.

Input arguments:

  • real*8 :: x    or    real*8 :: x(:)
    The gridpoint of which to calculate the index, corresponds to . This can be either a scalar or a one-dimensional array containing many different gridpoints.
  • real*8 :: left
    The left interval endpoint, corresponds to .
  • real*8 :: right
    The right interval endpoint, corresponds to .
  • integer :: n
    The number of gridpoints to use, corresponds to .

Return Value:

  • real*8 :: grid_Inv_Cheb    or    real*8 :: grid_Inv_Cheb(:)
    The index of the Chebychev gridpoint i. This is a scalar if x is a scalar and a one-dimensional array if x is an array.

References

  • 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.
Clone this wiki locally