PRODUCT_FACTOR is a MATLAB program, using double precision arithmetic, which creates a multidimensional quadrature rule by using a product of distinct one-dimensional quadrature rules.
The program reads a single input file, which contains a list that defines the 1D rules to be used as factors.
Each 1D rule is stored in three files, an "X", "W", and "R" file, which are assumed to share a common filename prefix, so that the files defined by a given prefix have the form:
For instance, let us suppose we want to compute a 2D product rule formed from a 3 point Clenshaw Curtis rule and a 2 point Gauss-Legendre rule. If the prefixes for these files were "cc_d1_o003" and "gl_d1_o002" respectively, then the input file to the program would read as follows:
cc_d1_o003
gl_d1_o002
When the program read the first 1D rule, it would be searching for
three files:
Once the program has computed the multidimensional product rule, it again writes out three files describing the product rule, with a common filename prefix specified by the user, which might be, for instance, product, in which case the files would be:
For information on the form of these files, see the QUADRATURE_RULES directory listed below.
product_factor ( list_file, product_prefix )
If the arguments are not supplied on the command line, the program will prompt for them.
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
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_FACTOR is also available in a C++ version and a FORTRAN90 version
PRODUCT_RULE is an executable MATLAB program for constructing a product rule from identical 1D factor rules.
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.
TESTPACK is a MATLAB library of functions which define a set of integrands used to test multidimensional quadrature.
As an example, we make a 2D product rule.
The first factor is a 1D Clenshaw Curtis rule of order 3:
The second factor is a 1D Gauss Legendre rule of order 2:
We give the command
product_factor factors.txt
The resulting product rule files:
You can go up one level to the MATLAB source codes.