product_rule, a FORTRAN90 code 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_o002When 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:
product_rule ( list_file, product_prefix )where
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 MIT license
product_rule is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version
CHEBYSHEV1_RULE, a FORTRAN90 code which can compute and print a Gauss-Chebyshev type 1 quadrature rule.
CHEBYSHEV2_RULE, a FORTRAN90 code which can compute and print a Gauss-Chebyshev type 2 quadrature rule.
CLENSHAW_CURTIS_RULE, a FORTRAN90 code which defines a Clenshaw Curtis quadrature rule.
GEGENBAUER_RULE, a FORTRAN90 code which can compute and print a Gauss-Gegenbauer quadrature rule.
GEN_HERMITE_RULE, a FORTRAN90 code which can compute and print a generalized Gauss-Hermite quadrature rule.
GEN_LAGUERRE_RULE, a FORTRAN90 code which can compute and print a generalized Gauss-Laguerre quadrature rule.
HERMITE_RULE, a FORTRAN90 code which can compute and print a Gauss-Hermite quadrature rule.
JACOBI_RULE, a FORTRAN90 code which can compute and print a Gauss-Jacobi quadrature rule.
LAGUERRE_RULE, a FORTRAN90 code which can compute and print a Gauss-Laguerre quadrature rule.
LEGENDRE_RULE, a FORTRAN90 code which computes a Gauss-Legendre quadrature rule.
PATTERSON_RULE, a FORTRAN90 code 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.
POWER_RULE, a FORTRAN90 code which constructs a power rule, that is, a product quadrature rule from identical 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 FORTRAN90 code which defines quadrature rules on a variety of intervals with different weight functions.
TRUNCATED_NORMAL_RULE, a FORTRAN90 code 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].