SPARSE_GRID_MIXED is a MATLAB library which can be used to construct a sparse grid whose factors are possibly distinct 1D quadrature rules.
The 1D quadrature rules are designed to approximate an integral of the form:
Integral ( A < X < B ) F(X) W(X) dXwhere W(X) is a weight function, by the quadrature sum:
Sum ( 1 <= I <= ORDER) F(X(I)) * W(I)where the set of X values are known as abscissas and the set of W values are known as weights.
Note that the letter W, unfortunately, is used to denote both the weight function in the original integral, and the vector of weight values in the quadrature sum.
Index | Name | Abbreviation | Default Growth Rule | Interval | Weight function |
---|---|---|---|---|---|
1 | Clenshaw-Curtis Exponential Growth | CC | Exponential | [-1,+1] | 1 |
2 | Fejer Type 2, Exponential Growth | F2 | Exponential | [-1,+1] | 1 |
3 | Gauss Patterson, Exponential Growth | GP | Exponential | [-1,+1] | 1 |
4 | Gauss-Legendre | GL | Linear | [-1,+1] | 1 |
5 | Gauss-Hermite | GH | Linear | (-oo,+oo) | e^{-x*x} |
6 | Generalized Gauss-Hermite | GGH | Linear | (-oo,+oo) | |x|^{alpha} e^{-x*x} |
7 | Gauss-Laguerre | LG | Linear | [0,+oo) | e^{-x} |
8 | Generalized Gauss-Laguerre | GLG | Linear | [0,+oo) | x^{alpha} e^{-x} |
9 | Gauss-Jacobi | GJ | Linear | [-1,+1] | (1-x)^{alpha} (1+x)^{beta} |
10 | Golub-Welsch | GW | ? | ? | ? |
11 | Clenshaw-Curtis, Slow Exponential Growth | CC_SE | Slow exponential | [-1,+1] | 1 |
12 | Fejer Type 2, Slow Exponential Growth | F2_SE | Slow exponential | [-1,+1] | 1 |
13 | Gauss Patterson, Slow Exponential Growth | GP_SE | Slow exponential | [-1,+1] | 1 |
14 | Clenshaw-Curtis, Moderate Exponential Growth | CC_ME | Moderate exponential | [-1,+1] | 1 |
15 | Fejer Type 2, Moderate Exponential Growth | F2_ME | Moderate exponential | [-1,+1] | 1 |
16 | Gauss Patterson, Moderate Exponential Growth | GP_ME | Moderate exponential | [-1,+1] | 1 |
17 | Clenshaw-Curtis Nested, linear growth | CCN | Linear (2*L+1) | [-1,+1] | 1 |
A sparse grid is a quadrature rule for a multidimensional integral. It is formed by taking a certain linear combination of lower-order product rules. The product rules, in turn, are formed as direct products of 1D quadrature rules. It is common to form a sparse grid in which the 1D component quadrature rules are the same. This package, however, is intended to produce sparse grids based on sums of product rules for which the rule chosen for each spatial dimension may be freely chosen from the set listed above.
These sparse grids are still indexed by a number known as level, and assembled as a sum of low order product rules. As the value of level increases, the point growth becomes more complicated. This is because the 1D rules have somewhat varying point growth patterns to begin with, and the varying levels of nestedness have a dramatic effect on the sparsity of the total grid.
Since a sparse grid is made up of a combination of product grids, it is frequently the case that many of the product grids include the same point. For efficiency, it is usually desirable to merge or consolidate such duplicate points when expressing the resulting sparse grid rule. It is possible to "logically" determine when a duplicate point will be generated; however, this logic changes depending on the specific 1-dimensional rules being used, and the tests can become quite elaborate. Moreover, for rules which include real parameters, the determination of duplication can require a numerical tolerance.
In order to simplify the matter of the detection of duplicate points, the codes presented begin by generating the entire "naive" set of points. Then a user-specified tolerance TOL is used to determine when two points are equal. If the maximum difference between any two components is less than or equal to TOL, the points are declared to be equal.
A reasonable value for TOL might be the square root of the machine precision. Setting TOL to zero means that only points which are identical to the last significant digit are taken to be duplicates. Setting TOL to a negative value means that no duplicate points will be eliminated - in other words, this choice produces the full or "naive" grid.
A version of the sparse grid library is available in http://tasmanian.ornl.gov, the TASMANIAN library, available from Oak Ridge National Laboratory.
The code described and made available on this web page is distributed under the GNU LGPL license.
SPARSE_GRID_MIXED is available in a C++ version and a FORTRAN90 version and a MATLAB version.
GRID_DISPLAY, a MATLAB library which can display a 2D or 3D grid or sparse grid.
NINT_EXACTNESS_MIXED, a MATLAB program which measures the polynomial exactness of a multidimensional quadrature rule based on a mixture of 1D quadrature rule factors.
QUADRULE, a MATLAB library which defines quadrature rules for various intervals and weight functions.
SANDIA_RULES, a MATLAB library which generates Gauss quadrature rules of various orders and types.
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_COMPOSITE, a MATLAB library which creates sparse grids based on 1D composite rules (currently only of order 1).
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_DATASET, a MATLAB program which creates a sparse grid dataset based on a mixture of 1D rules.
SPARSE_GRID_OPEN, a MATLAB library which creates sparse grids based on open rules (Fejer 2, Gauss-Patterson, Newton-Cotes-Open).
SPQUAD, a MATLAB library which computes the points and weights of a sparse grid quadrature rule for a multidimensional integral, based on the Clenshaw-Curtis quadrature rule, by Greg von Winckel.
TOMS847, a MATLAB program which uses sparse grids to carry out multilinear hierarchical interpolation. It is commonly known as SPINTERP, and is by Andreas Klimke.
COMP_NEXT_TESTS tests COMP_NEXT.
PRODUCT_MIXED_WEIGHT_TESTS tests PRODUCT_MIXED_WEIGHT.
SPARSE_GRID_MIXED_INDEX_TESTS tests SPARSE_GRID_MIXED_INDEX.
SPARSE_GRID_MIXED_POINT_TESTS tests SPARSE_GRID_MIXED_POINT.
SPARSE_GRID_MIXED_SIZE_TESTS tests SPARSE_GRID_MIXED_SIZE and SPARSE_GRID_MIXED_SIZE_TOTAL.
SPARSE_GRID_MIXED_SIZE_TABLE makes a point count table.
SPARSE_GRID_MIXED_UNIQUE_INDEX_TESTS tests SPARSE_GRID_MIXED_UNIQUE_INDEX.
SPARSE_GRID_MIXED_WEIGHT_TESTS tests SPARSE_GRID_MIXED_WEIGHT.
SPARSE_GRID_MIXED_WRITE_TESTS tests SPARSE_GRID_MIXED_WRITE.
You can go up one level to the MATLAB source codes.