A Sparse Grid Quadrature Rule

**SPQUAD**
is a MATLAB library which
can compute a sparse grid quadrature rule to estimate a multidimensional integral.
The quadrature rules created by the program are based on the Clenshaw-Curtis rule.
The code is by Greg von Winckel.

The original version of this software is available at the Matlab Central File Exchange: http://www.mathworks.com/matlabcentral/fileexchange/19063-sparse-grid-quadrature/content/spquad.m.

Note that the **spquad()** function, by default, assumes that the integration region
is [-1,+1]^d, where **d** is the spatial dimension. The function includes an optional
argument **bpt**, which is an array allowing the user to specify the lower and upper
endpoints of integration. However, in the experience of the installer, this extra argument
does not seem to have the correct effect, resulting in quadrature rules that are not
correctly shifted to the new domain. A note has been sent to the author asking for
clarification. In the meantime, the user can compute the rule for [-1,+1]^d and use a
simple linear transformation to adjust the points and weights to a nondefault integration region.

No licensing information was given with the text of the file at the Matlab Central File Exchange.

**SPQUAD** is available in
a MATLAB version

SANDIA_SPARSE, a MATLAB library which computes the points and weights of a Smolyak sparse grid, based on a variety of 1-dimensional quadrature rules.

SGMGA, a MATLAB library which creates sparse grids based on a mixture of 1D quadrature rules, allowing anisotropic weights for each dimension.

SMOLPACK, a C library which implements Novak and Ritter's method for estimating the integral of a function over a multidimensional hypercube using sparse grids, by Knut Petras.

SPARSE_GRID_CC, a MATLAB library which can define a multidimensional sparse grid based on a 1D Clenshaw Curtis rule.

SPARSE_GRID_GL, a MATLAB library which creates sparse grids based on Gauss-Legendre rules.

SPARSE_GRID_HERMITE, a MATLAB library which creates sparse grids based on Gauss-Hermite rules.

SPARSE_GRID_HW, a MATLAB library which creates sparse grids based on Gauss-Legendre, Gauss-Hermite, Gauss-Patterson, or a nested variation of Gauss-Hermite rules, by Florian Heiss and Viktor Winschel.

SPARSE_GRID_LAGUERRE, a MATLAB library which creates sparse grids based on Gauss-Laguerre rules.

SPARSE_GRID_MIXED, a MATLAB library which creates a sparse grid dataset based on a mixed set of 1D factor rules.

SPINTERP, a MATLAB library which carries out piecewise multilinear hierarchical sparse grid interpolation; an earlier version of this software is ACM TOMS Algorithm 847, by Andreas Klimke;

Greg von Winckel

- spquad.m returns the points and weights of a sparse grid for dimension D and level K, based on the Clenshaw Curtis rule.

- spquad_test.m calls all the tests.
- spquad_test01.m compares the sparse grid estimate to a Monte Carlo estimate.
- spquad_test02.m prints the size (number of points) for sparse grid rules of a variety of spatial dimensions and levels.
- spquad_test_output.txt the output file;
- fu_integral.m evaluates the exact integral of a test function over [0,1]^D.
- fu_value.m is a test function over [0,1]^D.
- timestamp.m is a script which prints a timestamp;

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