nag_ode_bvp_ps_lin_cgl_grid (d02ucc) (PDF version)
d02 Chapter Contents
d02 Chapter Introduction
NAG Library Manual

NAG Library Function Document

nag_ode_bvp_ps_lin_cgl_grid (d02ucc)

+ Contents

    1  Purpose
    7  Accuracy
    10  Example

1  Purpose

nag_ode_bvp_ps_lin_cgl_grid (d02ucc) returns the Chebyshev Gauss–Lobatto grid points on a,b.

2  Specification

#include <nag.h>
#include <nagd02.h>
void  nag_ode_bvp_ps_lin_cgl_grid (Integer n, double a, double b, double x[], NagError *fail)

3  Description

nag_ode_bvp_ps_lin_cgl_grid (d02ucc) returns the Chebyshev Gauss–Lobatto grid points on a,b. The Chebyshev Gauss–Lobatto points on -1,1 are computed as ti = - cos i-1π n , for i=1,2,,n+1. The Chebyshev Gauss–Lobatto points on an arbitrary domain a,b  are:
xi = b-a 2 ti + a+b 2 ,   i=1,2,,n+1 .

4  References

Trefethen L N (2000) Spectral Methods in MATLAB SIAM

5  Arguments

1:     nIntegerInput
On entry: n, where the number of grid points is n+1. This is also the largest order of Chebyshev polynomial in the Chebyshev series to be computed.
Constraint: n>0 and n is even.
2:     adoubleInput
On entry: a, the lower bound of domain a,b.
Constraint: a<b.
3:     bdoubleInput
On entry: b, the upper bound of domain a,b.
Constraint: b>a.
4:     x[n+1]doubleOutput
On exit: the Chebyshev Gauss–Lobatto grid points, xi, for i=1,2,,n+1, on a,b.
5:     failNagError *Input/Output
The NAG error argument (see Section 3.6 in the Essential Introduction).

6  Error Indicators and Warnings

NE_BAD_PARAM
On entry, argument value had an illegal value.
NE_INT
On entry, n=value.
Constraint: n>0.
On entry, n=value.
Constraint: n is even.
NE_INTERNAL_ERROR
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
NE_REAL_2
On entry, a=value and b=value.
Constraint: a<b.

7  Accuracy

The Chebyshev Gauss–Lobatto grid points computed should be accurate to within a small multiple of machine precision.

8  Parallelism and Performance

Not applicable.

9  Further Comments

The number of operations is of the order n logn  and there are no internal memory requirements; thus the computation remains efficient and practical for very fine discretizations (very large values of n).

10  Example

See Section 10 in nag_ode_bvp_ps_lin_solve (d02uec).

nag_ode_bvp_ps_lin_cgl_grid (d02ucc) (PDF version)
d02 Chapter Contents
d02 Chapter Introduction
NAG Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2014