sandia_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.
sandia_sgmga is a variant of the SGMGA library. It has the same capabilities as that library, but it uses a different interface to the SANDIA_RULES routines which compute points and weights of quadrater rules. Instead of passing the parameters needed by some of those rules as function arguments, these values are made available indirectly. This library implements that indirect storage using a function called parameter, which must therefore be supplied by the user as part of every program that calls the library. Refer to the source code of the example programs to see how parameter is defined and used.
sandia_sgmga calls routines from the SANDIA_RULES and SANDIA_RULES2 libraries. Source code or compiled copies of those libraries must be available when a program wishes to use the sandia_sgmga library.
Name | Abbreviation | Interval | Weight function |
---|---|---|---|
Clenshaw-Curtis | CC | [-1,+1] | 1 |
Fejer Type 2 | F2 | [-1,+1] | 1 |
Gauss Patterson | GP | [-1,+1] | 1 |
Gauss-Legendre | GL | [-1,+1] | 1 |
Gauss-Hermite | GH | (-oo,+oo) | e-x*x |
Generalized Gauss-Hermite | GGH | (-oo,+oo) | |x|alpha e-x*x |
Gauss-Laguerre | LG | [0,+oo) | e-x |
Generalized Gauss-Laguerre | GLG | [0,+oo) | xalpha e-x |
Gauss-Jacobi | GJ | [-1,+1] | (1-x)alpha (1+x)beta |
Hermite Genz-Keister | HGK | (-oo,+oo) | e-x*x |
In the sparse grid setting, for any 1D quadrature rule, it is necessary to select a sequence of rules of increasing order (number of points), indexed by a variable we will call the "level". Thus, although the Clenshaw Curtis rule can be set up for any, a common procedure in sparse grids is to choose select the rules of order 1, 3, 5, 9, 17, 33, ..., assigning these the levels 0, 1, 2, 3, 4, 5 and so forth. The relationship between level (L) and order (O) will be called the growth rule.
The details of growth rules vary somewhat, depending on whether there is nesting to take advantage of, whether the user wants to economize as much as possible in the number of points added, and so on. For each dimension, the user must specify a growth rule appropriate for the chosen quadrature rule. We provide a number of predefined growth rules that are suitable.
Here are the names of the growth rule functions, with a brief comment on their behavior and use. These growth rule functions are available in the sandia_rules library where their details may be examined.
Growth Rule | Discussion |
---|---|
level_to_order_exp_cc() | Clenshaw Curtis rule. Fast growth is exponential |
level_to_order_exp_f2() | Fejer Type 2 rule. Fast growth is exponential |
level_to_order_exp_gauss() | Gaussian rules. Fast growth is exponential, O=2^(L+1)-1 |
level_to_order_exp_hgk() | Genz-Keister rules for Hermite weight; |
level_to_order_linear_nn() | Linear growth for a non-nested rule; |
level_to_order_linear_wn() | Linear growth for a weakly-nested rule (typically, an abscissas at 0 is common); |
Each growth rule has "slow", "moderate" and "fast" settings. A scalar quantity GROWTH selects the rule order O for level L from the three growth options for each 1D rule. In the case of exponentially growing rules, the slow and moderate growth rules choose O indirectly, by imposing a requirement on P, the degree of precision of the rule.
Value | Name | Meaning |
---|---|---|
0 | Slow | O=L+1 for linear rules, P=2*L+1 for exponential |
1 | Moderate | O=2*L+1 for linear rules, P=4*L+1 for exponential |
2 | Full | O=2*L+1 for linear rules, O = next rule in sequence for exponential |
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
sandia_sgmga is available in a C++ version.
nint_exactness_mixed, a C++ program which measures the polynomial exactness of a multidimensional quadrature rule based on a mixture of 1D quadrature rule factors.
quad_rule, a C++ library which defines quadrature rules for various intervals and weight functions.
sandia_rules, a C++ library which produces 1D quadrature rules of Chebyshev, Clenshaw Curtis, Fejer 2, Gegenbauer, generalized Hermite, generalized Laguerre, Hermite, Jacobi, Laguerre, Legendre and Patterson types.
sandia_rules2, a C++ library which contains a very small selection of functions which serve as an interface between SANDIA_SGMG or sandia_sgmga and SANDIA_RULES.
sandia_sgmg, a C++ library which creates a sparse grid dataset based on a mixed set of 1D factor rules, and experiments with the use of a linear growth rate for the quadrature rules. This is a version of SPARSE_GRID_MIXED_GROWTH that uses a different procedure for supplying the parameters needed to evaluate certain quadrature rules.
sandia_sparse, a C++ library which computes the points and weights of a Smolyak sparse grid, based on a variety of 1-dimensional quadrature rules.
SGMG, a C++ library which creates a sparse grid dataset based on a mixed set of 1D factor rules, and experiments with the use of a linear growth rate for the quadrature rules.
SGMGA, a C++ 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_DISPLAY, a MATLAB program which can display a 2D or 3D sparse grid.
SPARSE_GRID_MIXED, a C++ library which creates sparse grids based on a mix of 1D rules.