PRODUCT_RULE
Multidimensional Quadrature Rule Creation


PRODUCT_RULE is a MATLAB program, using double precision arithmetic, which creates a multidimensional quadrature rule by using a product of one-dimensional quadrature rules.

The current version of the program requires that all the "factor rules" be identical, that is, the product rule is created as the product of n identical one-dimensional rules. It is possible to create product rules in which the factors are not equal, and one day this program may be extended to handle that case.

Note that the three files that define the quadrature rule are assumed to have related names, of the form

When running the program, the user only enters the common prefix part of the file names, which is enough information for the program to find all three files.

For information on the form of these files, see the QUADRATURE_RULES directory listed below.

Usage:

product_rule prefix dim_num

prefix
the common prefix for the files containing the abscissa, weight and region information of the quadrature rule;
dim_num
the dimension of the product space

If the arguments are not supplied on the command line, the program will prompt for them.

The program will create these output files, which define the multidimensional quadrature rule:

product_x.txt
a file containing the dim_num-dimensional abscissas of the product rule;
product_w.txt
a file containing the weights of the product rule;
product_r.txt
a file containing the range of the product rule;

Licensing:

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

Related Data and Programs:

CLENSHAW_CURTIS is a MATLAB library which sets up a Clenshaw Curtis quadrature grid in multiple dimensions.

INTEGRAL_TEST is a FORTRAN90 program which uses some of these test integrals to evaluate sets of quadrature points.

NINT_EXACTNESS is a MATLAB program which can test a quadrature rule for polynomial exactness.

NINTLIB is a MATLAB library of routines for numerically estimating integrals in multiple dimensions.

PRODUCT_RULE is also available in a C++ version and a FORTRAN90 version

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

QUADRATURE_TEST an executable MATLAB program which reads the definition of a multidimensional quadrature rule from three files, applies the rule to a number of test integrals, and prints the results.

QUADRULE is a MATLAB library of routines for defining quadrature rules on a variety of intervals with different weight functions.

STROUD is a MATLAB library containing quadrature rules for a variety of unusual areas, surfaces and volumes in 2D, 3D and N-dimensions.

TEST_NINT is a MATLAB library of integrand functions for testing multidimensional quadrature routines.

Reference:

  1. Philip Davis, Philip Rabinowitz,
    Methods of Numerical Integration,
    Second Edition,
    Dover, 2007,
    ISBN: 0486453391,
    LC: QA299.3.D28.

Source Code:

Examples and Tests:

As an example, we start with a 1D Clenshaw Curtis rule of order 3:

We give the command

product_rule ( 'cc_d1_o003', 2 )
to create a Clenshaw Curtis product rule of order 9 for a 2D region. The files which are created include:

You can go up one level to the MATLAB source codes.


Last revised on 08 May 2007.