sgmga, a C code which implements a family of sparse grid rules. These rules are "mixed", in that a different 1D quadrature rule can be specified for each dimension. Moreover, each 1D quadrature rule comes in a family of increasing size whose growth rate (typically linear or exponential) is chosen by the user. Finally, the user may also specify different weights for each dimension, resulting in anisotropic rules.
The code calls many routines from the SANDIA_RULES() library. Source code or compiled copies of both libraries must be available when a program wishes to use SGMGA().
Index | Name | Abbreviation | Default Growth Rule | Interval | Weight function |
---|---|---|---|---|---|
1 | Clenshaw-Curtis | CC | Moderate Exponential | [-1,+1] | 1 |
2 | Fejer Type 2 | F2 | Moderate Exponential | [-1,+1] | 1 |
3 | Gauss Patterson | GP | Moderate Exponential | [-1,+1] | 1 |
4 | Gauss-Legendre | GL | Moderate Linear | [-1,+1] | 1 |
5 | Gauss-Hermite | GH | Moderate Linear | (-oo,+oo) | e-x*x |
6 | Generalized Gauss-Hermite | GGH | Moderate Linear | (-oo,+oo) | |x|alpha e-x*x |
7 | Gauss-Laguerre | LG | Moderate Linear | [0,+oo) | e-x |
8 | Generalized Gauss-Laguerre | GLG | Moderate Linear | [0,+oo) | xalpha e-x |
9 | Gauss-Jacobi | GJ | Moderate Linear | [-1,+1] | (1-x)alpha (1+x)beta |
10 | Golub-Welsch | GW | Moderate Linear | ? | ? |
11 | Hermite Genz-Keister | HGK | Moderate Exponential | (-oo,+oo) | e-x*x |
For a given family, a growth rule can be prescribed, which determines the orders O of the sequence of rules selected from the family. The selected rules are indexed by L, which starts at 0. The polynomial precision P of the rule is sometimes used to determine the appropriate order O.
Index | Name | Order Formula |
---|---|---|
0 | Default | "DF", moderate exponential or moderate linear |
1 | "SL", Slow linear | O=L+1 |
2 | "SO", Slow Linear Odd | O=1+2*((L+1)/2) |
3 | "ML", Moderate Linear | O=2L+1 |
4 | "SE", Slow Exponential | select smallest exponential order O so that 2L+1 <= P |
5 | "ME", Moderate Exponential | select smallest exponential order O so that 4L+1 <= P |
6 | "FE", Full Exponential | O=2^L+1 for Clenshaw Curtis, O=2^(L+1)-1 otherwise. |
A version of the sparse grid library is available in https://tasmanian.ornl.gov, the TASMANIAN library, available from Oak Ridge National Laboratory.
The computer code and data files made available on this web page are distributed under the MIT license
sgmga is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version.
QUADRULE, a C code which defines quadrature rules for various intervals and weight functions.
SANDIA_RULES, a C code which produces 1D quadrature rules of Chebyshev, Clenshaw Curtis, Fejer 2, Gegenbauer, generalized Hermite, generalized Laguerre, Hermite, Jacobi, Laguerre, Legendre and Patterson types.
SGMGA, a dataset directory which contains SGMGA files (Sparse Grid Mixed Growth Anisotropic), that is, multidimensional Smolyak sparse grids based on a mixture of 1D rules, and with a choice of exponential and linear growth rates for the 1D rules and anisotropic weights for the dimensions.
SMOLPACK, a C code 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_HW, a C code 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.