Sparse Grids for Uniform and Normal Weights
Heiss and Winschel

SPARSE_GRID_HW is a C library which can compute sparse grids for multidimensional integration, based on 1D rules for the unit interval with unit weight function, or for the real line with the Gauss-Hermite weight function. The original MATLAB code is by Florian Heiss and Viktor Winschel.

The original version of this software, and other information, is available at .

Four built-in 1D families of quadrature rules are supplied, and the user can extend the package by supplying any family of 1D quadrature rules.

The built-in families are identified by a 3-letter key which is also the name of the function that returns members of the family:

The user can build new sparse grids by supplying a 1D quadrature family. Examples provided include:


The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.


SPARSE_GRID_HW is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version

Related Data and Programs:

QUADRULE, a C library which defines quadrature rules for various intervals and weight functions.

SANDIA_RULES, a C library which generates Gauss quadrature rules of various orders and types.

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.


Original MATLAB code by Florian Heiss and Viktor Winschel. C version by John Burkardt.


Source Code:

Examples and Tests:

List of Routines:

You can go up one level to the C source codes.

Last revised on 26 February 2014.