power_rule


power_rule, a FORTRAN77 code 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 and an Octave version.

Related Data and Programs:

power_rule_test

chebyshev1_rule, a FORTRAN90 program which can compute and print a Gauss-Chebyshev type 1 quadrature rule.

chebyshev2_rule, a FORTRAN90 program which can compute and print a Gauss-Chebyshev type 2 quadrature rule.

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

GEGENBAUER_RULE, a FORTRAN90 program which can compute and print a Gauss-Gegenbauer quadrature rule.

GEN_HERMITE_RULE, a FORTRAN90 program which can compute and print a generalized Gauss-Hermite quadrature rule.

GEN_LAGUERRE_RULE, a FORTRAN90 program which can compute and print a generalized Gauss-Laguerre quadrature rule.

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

JACOBI_RULE, a FORTRAN90 program which can compute and print a Gauss-Jacobi quadrature rule.

LAGUERRE_RULE, a FORTRAN90 program which can compute and print a Gauss-Laguerre quadrature rule.

LEGENDRE_RULE, a FORTRAN77 program which computes a Gauss-Legendre quadrature rule.

LEGENDRE_RULE_FAST, a FORTRAN77 program which uses a fast (order N) algorithm to compute a Gauss-Legendre quadrature rule of given order.

LOGNORMAL_RULE, a FORTRAN90 program which can compute and print a quadrature rule for functions of a variable whose logarithm is normally distributed.

PATTERSON_RULE, a FORTRAN77 program which returns the points and weights of a 1D Gauss-Patterson quadrature rule of order 1, 3, 7, 15, 31, 63, 127, 255 or 511.

PRODUCT_RULE, a FORTRAN77 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 FORTRAN77 library which defines quadrature rules on a variety of intervals with different weight functions.

TANH_SINH_RULE, a FORTRAN90 program which computes and writes out a tanh-sinh quadrature rule of given order.

TRUNCATED_NORMAL_RULE, a FORTRAN77 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:


Last revised on 02 November 2023.