cheb_ser_eval2 Function

public function cheb_ser_eval2(nx, ny, c, x, y, rwrk) result(res)

f(x,y), (x,y) E [-1,1]x[-1,1] is given by the following appproximation formula in terms of Chebyshev polynomials:

f(x,y) = (1/2)c_00 * T_0(x)T_0(y) + ... + c_mn * T_m(x)*T_n(y)

Given the vector of coefficients, c(0), ..., c(n), this routine evaluates the above sum at a point (x,y) E [-1,1]x[-1,1].

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nx

Highest degree of polynomial along x and y.

integer, intent(in) :: ny

Highest degree of polynomial along x and y.

real(kind=rp), intent(in), dimension(:) :: c

Chebyshev coefficients

real(kind=rp), intent(in) :: x

(x,y) E [-1,1]x[-1,1] the point where the series is to be evaluated.

real(kind=rp), intent(in) :: y

(x,y) E [-1,1]x[-1,1] the point where the series is to be evaluated.

real(kind=rp), intent(inout), dimension(:) :: rwrk

Work array of size at least ny+1

Return Value real(kind=rp)