# sandia_rules2

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.

### Languages:

sandia_rules2 is available in a C++ version.

### Related Data and Programs:

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.

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.

### Reference:

1. Milton Abramowitz, Irene Stegun,
Handbook of Mathematical Functions,
National Bureau of Standards, 1964,
ISBN: 0-486-61272-4,
LC: QA47.A34.
2. William Cody,
An Overview of Software Development for Special Functions,
in Numerical Analysis Dundee, 1975,
edited by GA Watson,
Lecture Notes in Mathematics 506,
Springer, 1976.
3. Philip Davis, Philip Rabinowitz,
Methods of Numerical Integration,
Second Edition,
Dover, 2007,
ISBN: 0486453391,
LC: QA299.3.D28.
Fully symmetric interpolatory rules for multiple integrals over infinite regions with Gaussian weight,
Journal of Computational and Applied Mathematics,
Volume 71, 1996, pages 299-309.
5. John Hart, Ward Cheney, Charles Lawson, Hans Maehly, Charles Mesztenyi, John Rice, Henry Thatcher, Christoph Witzgall,
Computer Approximations,
Wiley, 1968,
LC: QA297.C64.
6. Knut Petras,
Smolyak Cubature of Given Polynomial Degree with Few Nodes for Increasing Dimension,
Numerische Mathematik,
Volume 93, Number 4, February 2003, pages 729-753.
7. Arthur Stroud, Don Secrest,