SPARSE_GRID_CLOSED is a FORTRAN90 library which computes the location of points on a sparse grid based on closed one-dimensional quadrature rules.
One way of looking at the construction of sparse grids is to assume that we start out by constructing a (very dense) product grid. We will assume for now that the order, that is, the number of points used in each component grid, is the same for all dimensions. Moreover, we will assume that the order is a power of 2 plus one, so that we have a natural relationship between the order and the logarithm base 2 of the order minus 1:
order = 2level + 1except that for the special case of level=0 we assign order=1. (If we used our formula, then this case would give us order=2 instead.
Thus, if we allow level to grow, the order roughly doubles, as follows:
Level | Order |
---|---|
0 | 1 |
1 | 3 |
2 | 5 |
3 | 9 |
4 | 17 |
5 | 33 |
6 | 65 |
7 | 129 |
8 | 257 |
9 | 513 |
10 | 1025 |
To keep things simple, let us begin by supposing we are selecting points for a grid to be used in an interpolation or quadrature rule. If you successively compute the locations of the points of each level, you will probably see that the points of a level are all included in the grid associated with the next level. (This is not guaranteed for all rules; it's simply a property of the way most such grids are defined!).
This nesting property is very useful. For one thing, it means that when we've computed a grid for one level, and now want to compute a grid for the next level, then all the information associated with the current level (point location, the value of functions at those points) is still useful for the next level, and will save us some computation time as well. This also means that, when we have reached a particular level, all the previous levels are still available to us, with no extra storage. These considerations make it possible, for instance, to do efficient and convenient error estimation.
When we move to a problem whose geometry is two-dimensional or more, we can still take the same approach. However, when working in multidimensional geometry, it is usually not a good idea to form a grid using the product of 1D grids, especially when we are determining the order using the idea of levels. Especially in this case, if we go to the next level in each dimension, the total number of points would increase by a factor of roughly 2 to the spatial dimension. Just a few such steps in, say, 6 dimensions, and we would be far beyond our computational capacity.
Instead, in multidimensions, the idea is to construct a sparse grid, which can be thought of in one of two ways:
(There is still a lot of explaining to do to get from the one-dimensional levels to the N-dimensional levels and the selection of the low-level product grids that sum up to the sparse grid...)
Once the grid indices of the sparse grid points have been selected, there are a variety of schemes for distributing the points. We consider closed quadrature rules, in which the endpoints of the interval are included. The uniform scheme, known as the Newton Cotes Closed rule, is easy to understand. However, it has been observed that greater accuracy and stability can be achieved by arranging the points in a nonuniform way that tends to move points towards the boundary and away from the center. A common scheme for doing this starts with the uniform points on [0,1] and applies the cosine function to arrive at nonuniformly spaced points in [-1,1]. This scheme is known as the Clenshaw Curtis rule.
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
SPARSE_GRID_CLOSED is available in a C++ version and a FORTRAN90 version and a MATLAB version.
QUADRATURE_RULES is a dataset directory which defines quadrature rules; a number of examples of sparse grid quadrature rules are included.
QUADRULE is a FORTRAN90 library which defines quadrature rules for various intervals and weight functions.
SGMGA, a FORTRAN90 library which creates sparse grids based on a mixture of 1D quadrature rules, allowing anisotropic weights for each dimension.
SMOLPACK is a C library which implements Novak and Ritter's method for estimating the integral of a function over a multidimensional hypercube using sparse grids.
SPARSE_GRID_CC, a FORTRAN90 library which creates sparse grids based on Clenshaw-Curtis rules.
SPARSE_GRID_CLOSED_DATASET is a FORTRAN90 program which computes the points and weights of a sparse grid using the Smolyak construction based on 1D Clenshaw Curtis quadrature rules.
SPARSE_GRID_DISPLAY is a MATLAB library which can display a 2D or 3D sparse grid.
SPARSE_GRID_F2 is a dataset directory which contains the abscissas of sparse grids based on a Fejer Type 2 rule.
SPARSE_GRID_GL, a FORTRAN90 library which creates sparse grids based on Gauss-Legendre rules.
SPARSE_GRID_HERMITE, a FORTRAN90 library which creates sparse grids based on Gauss-Hermite rules.
SPARSE_GRID_LAGUERRE, a FORTRAN90 library which creates sparse grids based on Gauss-Laguerre rules.
SPARSE_GRID_MIXED is a FORTRAN90 library which constructs a sparse grid using different rules in each spatial dimension.
SPARSE_GRID_NCC is a dataset directory which contains the abscissas of sparse grids based on a Newton Cotes closed rule.
SPARSE_GRID_NCO is a dataset directory which contains the abscissas of sparse grids based on a Newton Cotes open rule.
SPARSE_GRID_OPEN is a FORTRAN90 library which defines sparse grids based on open nested quadrature rules.
TOMS847 is a MATLAB program which uses sparse grids to carry out multilinear hierarchical interpolation. It is commonly known as SPINTERP, and is by Andreas Klimke.
You can go up one level to the FORTRAN90 source codes.