sandia_rules2, a C++ code which contains a special set of interface functions to be used when sandia_sgmg() or sandia_sgmga() wish to call sandia_rules() for quadrature rules.
The environment in which sandia_sgmg() and sandia_sgmga() are used means that it is inconvenient to pass extra parameters that might be needed to define a particular quadrature rule; in particular, the generalized Hermite, generalized Laguerre, and Jacobi quadrature rules require one or two parameters for a complete definition.
These two libraries arrange for the parameters to be available through class mechanisms, so that they do not appear in the parameter list. In an attempt to reproduce that environment, sandia_rules2() supplies the corresponding "parameter free" calling sequences for the quadrature rules. In order to make this scheme actually work, we declare (but do not produce) a function called parameter ( ) which is presumed to be able to return the necessary information.
If a user wishes to test the sandia_rules2() code, it is then necessary to supply a version of the parameter function. An example is exhibited in the test code. It is of little importance that this interface is awkward. We are simply emulating the way the system works elsewhere because we need to make sure that the results are computed correctly!
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 | Hermite Genz-Keister | HGK | Moderate Exponential | (-oo,+oo) | e-x*x |
11 | User-supplied Open Rule | UO | Moderate Linear | ? | ? |
12 | User-supplied Closed Rule | UC | Moderate Linear | ? | ? |
Also included in this library are functions for Newton-Cotes Open ("NCO") and Newton-Cotes Closed ("NCC") rules, which can be used as "User Supplied" rules.
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
sandia_rules2 is available in a C++ version.
chebyshev1_rule, a C++ program which can compute and print a Gauss-Chebyshev type 1 quadrature rule.
chebyshev2_rule, a C++ program which can compute and print a Gauss-Chebyshev type 2 quadrature rule.
gegenbauer_rule, a C++ program which can compute and print a Gauss-Gegenbauer quadrature rule.
gen_hermite_rule, a C++ program which can compute and print a generalized Gauss-Hermite quadrature rule.
gen_laguerre_rule, a C++ program which can compute and print a generalized Gauss-Laguerre quadrature rule.
hermite_rule, a C++ program which can compute and print a Gauss-Hermite quadrature rule.
jacobi_rule, a C++ program which can compute and print a Gauss-Jacobi quadrature rule.
laguerre_rule, a C++ program which can compute and print a Gauss-Laguerre quadrature rule.
legendre_rule, a C++ program which can compute and print a Gauss-Legendre quadrature rule.
quad_rule, a C++ library which defines 1-dimensional quadrature rules.
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_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_sgmga, a C++ library which creates sparse grids based on a mixture of 1D quadrature rules, allowing anisotropic weights for each dimension. This is a version of SGMGA that uses a different procedure for supplying the parameters needed to evaluate certain quadrature rules.
sgmga, a C++ library which creates sparse grids based on a mixture of 1D quadrature rules, allowing anisotropic weights for each dimension.
sparse_grid_mixed, a C++ library which creates a sparse grid dataset based on a mixed set of 1D factor rules.
sparse_grid_mixed_growth, 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.