POWER_RULE
Multidimensional Quadrature Rule Creation


POWER_RULE is a C program which creates a power rule, that is, a multidimensional quadrature rule formed as a repeated product of a single one-dimensional quadrature rule.

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:

power_rule prefix dim_num
where

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:

power_x.txt
a file containing the abscissas of the power rule;
power_w.txt
a file containing the weights of the power rule;
power_r.txt
a file containing the range of the power rule;

Licensing:

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

Languages:

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

Related Data and Programs:

CLENSHAW_CURTIS_RULE, a C program which defines a Clenshaw Curtis quadrature rule.

HERMITE_RULE, a C program which can compute and print a Gauss-Hermite quadrature rule.

LEGENDRE_RULE, a C program which computes a 1D Gauss-Legendre quadrature rule.

PRODUCT_RULE, a C program which constructs a product quadrature rule from distinct 1D factor rules.

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

QUADRULE, a C library which defines quadrature rules on a variety of intervals with different weight functions.

SANDIA_RULES, a C library which produces 1D quadrature rules of Chebyshev, Clenshaw Curtis, Fejer 2, Gegenbauer, generalized Hermite, generalized Laguerre, Hermite, Jacobi, Laguerre, Legendre and Patterson types.

TRUNCATED_NORMAL_RULE, a C program which computes a quadrature rule for a normal probability density function (PDF), also called a Gaussian distribution, that has been truncated to [A,+oo), (-oo,B] or [A,B].

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

power_rule cc3 2
to create a Clenshaw Curtis product rule of order 9 for a 2D region. The files which are created include:

List of Routines:

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


Last revised on 05 February 2014.