Skip to content

grid_Cons_Cheb

Fabian Kindermann edited this page Apr 1, 2021 · 11 revisions
subroutine grid_Cons_Cheb(a, left, right)

Description:

Creates (n+1) Chebychev nodes or gridpoints ({x_0, x_1, ldots, x_n}) on the interval ([a, b]) according to the formula
$$
x_i = frac{a+b}{2} + frac{b-a}{2} cdot cosleft(frac{2(n-i) + 1}{2n+2}cdotpiright) quad text{for} quad i = 0, 1, ldots, n.
$$

Input arguments:

  • real*8 :: left
    The left interval endpoint, corresponds to (a).
  • real*8 :: right
    The right interval endpoint, corresponds to (b).

Output arguments:

  • real*8 :: a(:)
    A one-dimensional array of arbitrary length. The subroutine fills up this array with the respective gridpoints.

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.
  • This routine is used in the following programs:
    • prog02_17.f90
Clone this wiki locally