Sparse Grids for Uniform and Normal Weights
Heiss and Winschel

SPARSE_GRID_HW is a FORTRAN77 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 FORTRAN77 version of the library is only partially complete. Completion of the translation has been held up by the fact that FORTRAN77 does not "officially" support allocatable arrays, and so the sizes of certain arrays must be determined and allocated in advance.

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 FORTRAN routine 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 FORTRAN77 version and a FORTRAN90 version and a MATLAB version

Related Data and Programs:

GRID_DISPLAY, a MATLAB library which can display a 2D or 3D grid or sparse grid.

NINT_EXACTNESS_MIXED, a FORTRAN90 program which measures the polynomial exactness of a multidimensional quadrature rule based on a mixture of 1D quadrature rule factors.

PRODUCT_RULE, a FORTRAN90 program which constructs a product quadrature rule from identical 1D factor rules.

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

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

SANDIA_SPARSE, a FORTRAN90 library which computes the points and weights of a Smolyak sparse grid, based on a variety of 1-dimensional quadrature rules.

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_HERMITE, a FORTRAN90 library which creates sparse grids based on Gauss-Hermite rules.

SPINTERP, a MATLAB library which carries out piecewise multilinear hierarchical sparse grid interpolation; an earlier version of this software is ACM TOMS Algorithm 847, by Andreas Klimke;


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


Source Code:

Examples and Tests:

List of Routines:

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

Last revised on 26 February 2014.