cheb_eval Function

public function cheb_eval(n, x) result(res)

Evaluates a Chebyshev polynomial of degree n at x (-1 <= x <= 1).

Reference

Kopriva, D (2009) Implementing spectral methods for partial differential equations, Springer, p. 60 (Algorithm 21).

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n
real(kind=rp), intent(in) :: x

Return Value real(kind=rp)