clenshaw_curtis_grid


clenshaw_curtis_grid, a FORTRAN90 code which sets up a Clenshaw Curtis quadrature rule in one or multiple dimensions.

Routines are available to look up or compute the weights and abscissas of the 1D rule.

The code includes a routine to set the abscissas of a multiple dimension product rule.

It is easy to generate a Clenshaw Curtis grid of any order N. Of special interest are nested grids, particularly those for which the nesting involves repeated divisions of the interval length by 2. In such a case, the data computed from the previous step can be reused, and the new data allows for an inexpensive estimate of the rate of error decrease. In the 1D case, we can keep track of such a nested sequence of rules by the "level", which, except for the zeroth level, has a simple relationship to the order N:
LEVELNH
012
13=2+11
25=4+11/2
39=8+11/4
417=16+11/8
533=32+11/16

The code includes routines which pack into a single array all the abscissas associated with several Clenshaw Curtis grids of abscissas, with the grids selected in one of two ways.

Two selection rules are available.

For the first "MINMAX" selection rule, we define the quantity Q to be the sum of the 1D orders:


        Q = sum ( 1 <= I <= DIM_NUM ) ORDER(I)
      
and then select all grids for which

        Q_MIN <= Q <= Q_MAX.
      

For the second "CONSTRAINED" selection rule, we define the quantity Q to be the weighted sum of the 1D orders:


        Q = sum ( 1 <= I <= DIM_NUM ) ALPHA(I) * ORDER(I)
      
and we require that the orders be bounded:

        ORDER_MIN(I) <= ORDER(I) <= ORDER_MAX(I).
      
and then select all grids for which

        Q <= Q_MAX.
      

Licensing:

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Languages:

clenshaw_curtis_grid is available in a C++ version and a FORTRAN90 version and a MATLAB version.

Related Data and Programs:

clenshaw_curtis_grid_test

CLENSHAW_CURTIS_RULE a FORTRAN90 code which defines a Clenshaw Curtis quadrature rule.

FEKETE, a FORTRAN90 code which defines a Fekete rule for quadrature or interpolation over a triangle.

INTLIB a FORTRAN90 code which contains routines for numerical estimation of integrals in 1D.

NINT_EXACTNESS a FORTRAN90 code which demonstrates how to measure the polynomial exactness of a multidimensional quadrature rule.

NINTLIB a FORTRAN90 code which contains a variety of routines for numerical estimation of integrals in multiple dimensions.

PRODUCT_FACTOR a FORTRAN90 code which constructs a product rule from distinct 1D factor rules.

PRODUCT_RULE a FORTRAN90 code which constructs a product rule from identical 1D factor rules.

QUADPACK a FORTRAN90 code which contains a variety of routines for numerical estimation of integrals in 1D.

QUADRATURE_RULES a dataset directory which contains sets of files that define quadrature rules over various 1D intervals or multidimensional hypercubes.

QUADRULE a FORTRAN90 code which contains quadrature rules.

STROUD a FORTRAN90 code which contains quadrature rules for a variety of unusual areas, surfaces and volumes in 2D, 3D and N-dimensions.

TEST_INT a FORTRAN90 code which contains functions that may be used as test integrands for quadrature rules in 1D.

TEST_NINT a FORTRAN90 code which contains functions that may be used as test integrands for quadrature rules in multiple dimensions.

TOMS351 a FORTRAN77 code which estimates an integral using Romberg integration.

TOMS379 is a FORTRAN77 code which estimates an integral.

TOMS418 a FORTRAN77 code which estimates the integral of a function with a sine or cosine factor.

TOMS424 a FORTRAN77 code which estimates the integral of a function using Clenshaw-Curtis quadrature.

TOMS468 is a FORTRAN77 code which "automatically" integrates a function.

Reference:

  1. Philip Davis, Philip Rabinowitz,
    Methods of Numerical Integration,
    Second Edition,
    Dover, 2007,
    ISBN: 0486453391,
    LC: QA299.3.D28.
  2. Charles Clenshaw, Alan Curtis,
    A Method for Numerical Integration on an Automatic Computer,
    Numerische Mathematik,
    Volume 2, Number 1, December 1960, pages 197-205.
  3. W Morven Gentleman,
    Algorithm 424: Clenshaw-Curtis Quadrature,
    Communications of the ACM,
    Volume 15, Number 5, May 1972, pages 353-355.
  4. Lloyd Trefethen,
    Is Gauss Quadrature Better than Clenshaw-Curtis?,
    SIAM Review,
    Volume 50, Number 1, 2008, pages 67-87.
  5. Joerg Waldvogel,
    Fast Construction of the Fejer and Clenshaw-Curtis Quadrature Rules,
    BIT Numerical Mathematics,
    Volume 43, Number 1, 2003, pages 1-18.

Source Code:


Last revised on 06 September 2021.