product_rule


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_o002
      
When the program read the first 1D rule, it would be searching for three files: and similarly for the second file.

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:

Usage:

product_rule ( list_file, product_prefix )
where

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

Licensing:

The information on this web page is distributed under the MIT license.

Languages:

product_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:

product_rule_test

f90_rule, a Fortran90 code which computes a quadrature rule which estimates the integral of a function f(x), which might be defined over a one dimensional region (a line) or more complex shapes such as a circle, a triangle, a quadrilateral, a polygon, or a higher dimensional region, and which might include an associated weight function w(x).

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 19 August 2020.