SMOLPACK
Multidimensional Quadrature Using Sparse Grids


SMOLPACK is a C library of routines, using double precision arithmetic, which can estimate the integral of a function over a hypercube using a sparse grid.

An interactive test program is also provided. The user can specify the input to this program as part of the commandline, or wait to enter the data interactively.

Usage:
smolpack_interactive fnum dim k seed bs
fnum
the test function f(x) to be integrated.
1 <= fnum <= 7
dim
the spatial dimension,
1 <= dim < 40
k
the number of stages. Generally a "small" number like 4 or 8;
1 <= k
seed
a seed for the random number generator. Should not be zero!
bs
the "basic sequence", that is, the one dimensional quadrature rule that is used to build the multidimensional quadrature rule. The two choices are:

Output from the program includes the exact and approximate integral values, the error, and, if requested, the number of quadrature points (function evaluations) and the number of quadrature weights that needed to be computed. Note that, because of symmetry in the quadrature rule, the number of quadrature weights computed will generally be much lower than the number of quadrature points.

Test Functions

SMOLPACK_INTERACTIVE allows the user to choose a test function to be integrated. The first six test functions come from the standard test suite of Genz. In the description, M denotes the spatial dimension, R is a randomly chosen parameter, C is a randomly chosen scaling vector, and X0 is a randomly chosen displacement vector.

  1. f(x) = cos ( 2 * pi * r + sum ( c(1:m) * x(1:m) ) ),
    Genz "Oscillatory";
  2. f(x) = 1 / product ( c(1:m)^2 + (x(1:m) - x0(1:m))^2),
    Genz "Product Peak";
  3. f(x) = 1 / ( 1 + sum ( c(1:m) * x(1:m) ) )^(d+1),
    Genz "Corner Peak";
  4. f(x) = exp(-sum(c(1:m)^2 * ( x(1:m) - x0(1:m))^2 ) ),
    Genz "Gaussian";
  5. f(x) = exp ( - sum ( c(1:m) * abs ( x(1:m) - x0(1:m) ) ) ),
    Genz "Continuous";
  6. f(x) = exp(sum(c(1:m)*x(1:m)) for x(1:2) <= x0(1:2), 0 otherwise,
    Genz "Discontinuous";
  7. f(x) = exp(sum( x(1:m));

Author:

Knut Petras

Related Programs:

CC_DISPLAY is a library of MATLAB routines which can compute and display Clenshaw Curtis grids in two dimensions, as well as sparse grids formed from sums of Clenshaw Curtis grids.

CLENSHAW_CURTIS is a MATLAB library which can set up a Clenshaw Curtis quadrature grid in multiple dimensions.

QUADRATURE_RULES is a dataset directory of files that define quadrature rules; a number of examples of sparse grid quadrature rules are included.

SPARSE_GRID_CC is a dataset directory of files containing the abscissas of sparse grids based on a Clenshaw Curtis rule.

SPARSE_GRID_DISPLAY is a library of MATLAB routines which can display a 2D or 3D sparse grid.

SPARSE_GRID_F1 is a dataset directory of files containing the abscissas of sparse grids based on a Fejer Type 1 rule.

SPARSE_GRID_F2 is a dataset directory of files containing the abscissas of sparse grids based on a Fejer Type 2 rule.

SPARSE_GRID_GP is a dataset directory of files containing the abscissas of sparse grids based on a Gauss Patterson rule.

SPARSE_GRID_NCC is a dataset directory of files containing the abscissas of sparse grids based on a Newton Cotes closed rule.

SPARSE_GRID_NCO is a dataset directory of files containing the abscissas of sparse grids based on a Newton Cotes open rule.

SPARSE_GRID_NCOH is a dataset directory of files containing the abscissas of sparse grids based on a Newton Cotes open half rule.

SPINTERP is an executable MATLAB program which uses sparse grids to carry out multilinear hierarchical interpolation.

TESTPACK is a C library of routines which defines the Genz test integrand functions.

TEST_NINT is a FORTRAN90 library of routines which defines a number of test integrand functions for multidimensional integration.

Reference:

  1. Alan Genz,
    A Package for Testing Multiple Integration Subroutines,
    in Numerical Integration: Recent Developments, Software and Applications,
    edited by Patrick Keast, Graeme Fairweather,
    Reidel, 1987, pages 337-340,
    ISBN: 9027725144,
    LC: QA299.3.N38
  2. Erich Novak, Klaus Ritter,
    High dimensional integration of smooth functions over cubes,
    Numerische Mathematik,
    Volume 75, Number 1, November 1996, pages 79-97.
  3. Erich Novak, Klaus Ritter,
    Simple Cubature Formulas with High Polynomial Exactness,
    Constructive Approximation,
    Volume 15, Number 4, December 1999, pages 499-522.
  4. Knut Petras,
    Fast Calculation of Coefficients in the Smolyak Algorithm,
    Numerical Algorithms,
    Volume 26, Number 2, February 2001, pages 93-109.
  5. 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.
  6. Sergey Smolyak,
    Quadrature and Interpolation Formulas for Tensor Products of Certain Classes of Functions,
    Doklady Akademii Nauk SSSR,
    Volume 4, 1963, pages 240-243.

Source Code:

Examples and Tests:

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


Last revised on 30 April 2007.