chebyshev Module

Chebyshev fit



Functions

public function chebev(a, b, c, m, x)

Chebyshev evaluation: All arguments are input. c(1:m) is an array of Chebyshev coefficients, the first m elements of c output from chebft (which must have been called with the same a and b). The Chebyshev polynomial evaluated and the result is returned as the function value.

Arguments

Type IntentOptional Attributes Name
real(kind=wp) :: a
real(kind=wp) :: b
real(kind=wp) :: c(m)
integer :: m
real(kind=wp) :: x

Return Value real(kind=wp)


Subroutines

public subroutine chebft1(a, b, c, n, func)

Chebyshev fit: Given a function func, lower and upper limits of the interval [a,b], and a maximum degree n, this routine computes the n coefficients c(k) such that func(x) approximately = SUMM_(k=1)^(k=n)[c(k)*T(k-1)(y)]-c(1)/2, where y and x are related by (5.8.10). This routine is to be used with moderately large n (e.g., 30 or 50), the array of c’s subsequently to be truncated at the smaller value m such that c(m+1) and subsequent elements are negligible. Parameters: Maximum expected value of n, and ð.

Arguments

Type IntentOptional Attributes Name
real(kind=wp) :: a
real(kind=wp) :: b
real(kind=wp) :: c(n)
integer :: n
real :: func

public subroutine chder(a, b, c, cder, n)

Given a,b,c(1:n), as output from routine chebft(), and given n, the desired degree of approximation (length of c to be used), this routine returns the array cder(1:n), the Chebyshev coefficients of the derivative of the function whose coefficients are c(1:n).

Arguments

Type IntentOptional Attributes Name
real(kind=wp) :: a
real(kind=wp) :: b
real(kind=wp) :: c(n)
real(kind=wp) :: cder(n)
integer :: n