Newton Cotes Closed

**SPARSE_GRID_NCC**
is a dataset directory which
contains some examples of sparse grids, using the idea of a
level to control the number of points, and assigning point
locations using the Newton Cotes Closed rule.

The file has a simple structure. There are a few initial comment lines, which begin with the "#" character. These can be removed if they are inconvenient. There then follow the coordinates of the points, with each point on a single line, and the coordinates of a point separated by spaces.

The points are ordered to respect the natural nesting of the sparse grids. That is, the file of level 3 points begins by listing the points in the level 2 grid.

To make full use of such a sparse grid, it is also necessary to compute the associated interpolation weights.

Here is the text of a file storing a Newton Cotes Closed rule of level 2.

```
0.500000 0.500000
0.000000 0.500000
1.000000 0.500000
0.500000 0.000000
0.500000 1.000000
0.250000 0.500000
0.750000 0.500000
0.000000 0.000000
0.000000 1.000000
1.000000 0.000000
1.000000 1.000000
0.500000 0.250000
0.500000 0.750000
```

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

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.

SPINTERP, a MATLAB library which uses a sparse grid to perform multilinear hierarchical interpolation, by Andreas Klimke

Some grids in 2D:

- ncc_d2_level0.txt, Newton Cotes Closed rule in 2 dimensions, level 0, in [0,1], 1 point.
- ncc_d2_level1.txt, Newton Cotes Closed rule in 2 dimensions, level 1, in [0,1], 5 points.
- ncc_d2_level2.txt, Newton Cotes Closed rule in 2 dimensions, level 2, in [0,1], 13 points.
- ncc_d2_level3.txt, Newton Cotes Closed rule in 2 dimensions, level 3, in [0,1], 29 points.
- ncc_d2_level4.txt, Newton Cotes Closed rule in 2 dimensions, level 4, in [0,1], 65 points.
- ncc_d2_level5.txt, Newton Cotes Closed rule in 2 dimensions, level 5, in [0,1], 145 points.
- ncc_d2_level6.txt, Newton Cotes Closed rule in 2 dimensions, level 6, in [0,1], 321 points.

**SPARSE_GRID_DISPLAY** can be used to display images
of two dimensional grids, which can be saved in the
PNG format:

- ncc_d2_level0.png,
- ncc_d2_level1.png,
- ncc_d2_level2.png,
- ncc_d2_level3.png,
- ncc_d2_level4.png,
- ncc_d2_level5.png,
- ncc_d2_level6.png,

Some grids in 3D:

- ncc_d3_level0.txt, Newton Cotes Closed rule in 3 dimensions, level 0, in [0,1], 1 point.
- ncc_d3_level1.txt, Newton Cotes Closed rule in 3 dimensions, level 1, in [0,1], 7 points.
- ncc_d3_level2.txt, Newton Cotes Closed rule in 3 dimensions, level 2, in [0,1], 25 points.
- ncc_d3_level3.txt, Newton Cotes Closed rule in 3 dimensions, level 3, in [0,1], 69 points.
- ncc_d3_level4.txt, Newton Cotes Closed rule in 3 dimensions, level 4, in [0,1], 177 points.
- ncc_d3_level5.txt, Newton Cotes Closed rule in 3 dimensions, level 5, in [0,1], 441 points.
- ncc_d3_level6.txt, Newton Cotes Closed rule in 3 dimensions, level 6, in [0,1], 1073 points.

**SPARSE_GRID_DISPLAY** can be used to display images
of 3D grids, which can be saved in the
PNG format:

- ncc_d3_level0.png,
- ncc_d3_level1.png,
- ncc_d3_level2.png,
- ncc_d3_level3.png,
- ncc_d3_level4.png,
- ncc_d3_level5.png,
- ncc_d3_level6.png,

Newton Cotes Closed Sparse Quadrature Rules in 6D, defined on the [-1,1] hypercube:

- ncc_d6_level0_x.txt, the abscissas for the level 0, order 1 sparse rule.
- ncc_d6_level0_w.txt, the weights.
- ncc_d6_level0_r.txt, the region.
- ncc_d6_level1_x.txt, the abscissas for the level 1, order 13 sparse rule.
- ncc_d6_level1_w.txt, the weights.
- ncc_d6_level1_r.txt, the region.
- ncc_d6_level2_x.txt, the abscissas for the level 2, order 85 sparse rule.
- ncc_d6_level2_w.txt, the weights.
- ncc_d6_level2_r.txt, the region.
- ncc_d6_level3_x.txt, the abscissas for the level 3, order 389 sparse rule.
- ncc_d6_level3_w.txt, the weights.
- ncc_d6_level3_r.txt, the region.
- ncc_d6_level4_x.txt, the abscissas for the level 4, order 1457 sparse rule.
- ncc_d6_level4_w.txt, the weights.
- ncc_d6_level4_r.txt, the region.
- ncc_d6_level5_x.txt, the abscissas for the level 5, order 4865 sparse rule.
- ncc_d6_level5_w.txt, the weights. WARNING: these weights had to be computed with QUADRUPLE ACCURACY; otherwise, the computation lost all accuracy.
- ncc_d6_level5_r.txt, the region.

Newton Cotes Closed Sparse Quadrature Rules in 10D, defined on the [-1,1] hypercube:

- ncc_d10_level0_x.txt, the abscissas for the level 0, order 1 sparse rule.
- ncc_d10_level0_w.txt, the weights.
- ncc_d10_level0_r.txt, the region.
- ncc_d10_level1_x.txt, the abscissas for the level 1, order 21 sparse rule.
- ncc_d10_level1_w.txt, the weights.
- ncc_d10_level1_r.txt, the region.
- ncc_d10_level2_x.txt, the abscissas for the level 2, order 221 sparse rule.
- ncc_d10_level2_w.txt, the weights.
- ncc_d10_level2_r.txt, the region.
- ncc_d10_level3_x.txt, the abscissas for the level 3, order 1581 sparse rule.
- ncc_d10_level3_w.txt, the weights.
- ncc_d10_level3_r.txt, the region.
- ncc_d10_level4_x.txt, the abscissas for the level 4, order 8801 sparse rule.
- ncc_d10_level4_w.txt, the weights.
- ncc_d10_level4_r.txt, the region.
- ncc_d10_level5_x.txt, the abscissas for the level 5, order 41265 sparse rule.
- ncc_d10_level5_w.txt, the weights. WARNING: these weights had to be computed with QUADRUPLE ACCURACY; otherwise, the computation lost all accuracy.
- ncc_d10_level5_r.txt, the region.

You can go up one level to the DATASETS page.