# SGMG Sparse Grids from Mixed 1D Rules

SGMG is a dataset directory which contains some examples of sparse grids in which different 1D quadrature rules may be used for each spatial dimension.

These sparse grids are different from those stored in the SPARSE_GRID_MIXED dataset directory. These sparse grids have a variation in the way the 1D rules grow with the level. Essentially, the original rule was "exponential" in every case. Roughly speaking, the next 1D level used twice as many points.

In the SGMG family, however, the default growth rate depends on the rule. Thus:

• exponential growth rate is reserved, by default, for "CC", "F2" and "GP" rules. linear growth rate for other rules (
• linear growth rate of 2*L+1, where L is the level, is reserved for "GL", "GH", "GGH", "LG", "GLG", "GJ" and "GW" rules.

The following list includes 1D quadrature rules that may be specified as factors. A few rules are not yet supported.

• CC, Clenshaw-Curtis:
defined on [-1,+1], with w(x)=1,
a closed, fully nested rule.
• F2, Fejer Type 2:
defined on (-1,+1), with w(x)=1,
an open, fully nested rule.
• GP, Gauss Patterson:
defined on (-1,+1), with w(x)=1,
a family of the midpoint rule, the 3 point Gauss Legendre rule, and then successive Patterson refinements,
an open, fully nested rule.
• GL, Gauss Legendre:
defined on (-1,+1), with w(x)=1,
an open, weakly nested rule.
• GH, Gauss Hermite:
defined on (-oo,+oo), with w(x)=exp(-x*x),
an open, weakly nested rule.
• GGH, Generalized Gauss Hermite:
defined on (-oo,+oo), with w(x)=|x|^alpha * exp(-x*x),
an open, weakly nested rule.
• LG, Gauss Laguerre:
defined on (0,+oo) with w(x)=exp(-x),
an open, non-nested rule.
• GLG, Generalized Gauss Laguerre:
defined on (0,+oo) with w(x)=x^alpha * exp(-x),
an open, non-nested rule.
• GJ, Gauss Jacobi:
defined on [-1,+1] with w(x)=(1-x)^alpha (1+x)^beta
an open, non-nested rule.
• GW, Golub Welsch:
a rule defined by the user based on the Golub-Welsch algorithm,
with points and weights supplied by external routines,
presumably an open, non-nested rule.
(not supported yet)

Each sparse grid is stored using the "weighted quadrature rule" format, that is, as 5 files:

• an "N" or "number of parameters" file, which lists the number of parameters (such as ALPHA and BETA) for each dimension;
• an "P" or "parameter" file, which lists all the parameter values in one list;
• an "R" or "region" file, which lists two points that bound the region;
• a "W" or "weight" file, which lists the weight for each abscissa;
• an "X" or "abscissa" file, which lists the abscissas of the rule.

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

### Example:

The "R" file stores two points that define the "corners" of the region. Here is the R file for a 2D rule based on 1D rules that both are defined in [-1,+1].

``````
-1.000000     -1.000000
1.000000     +1.000000
``````
In cases where one or both endpoints are infinite, the infinite value is suggested by using the value 1.0E+30.

Here is the text of a "W" file, which stores the weights of rule:

``````
-0.444444
1.111111
1.111111
1.111111
1.111111
``````

Here is the text of an "X" file storing the abscissas of a rule of dimension 2:

``````
0.000000      0.000000
-0.774596      0.000000
0.774596      0.000000
0.000000     -0.774596
0.000000      0.774596
``````

### Related Data and Programs:

QUADRATURE_RULES, a dataset directory which contains quadrature rules for 1D intervals, 2D rectangles or multidimensional rectangular regions, stored as a file of abscissas, a file of weights, and a file of region limits.

SGMG, a C++ library which constructs a multidimensional sparse grid from mixed 1D factors and with a choice of exponential and linear growth rates.

SGMGA, a dataset directory which contains SGMGA files (Sparse Grid Mixed Growth Anisotropic), that is, multidimensional Smolyak sparse grids based on a mixture of 1D rules, and with a choice of exponential and linear growth rates for the 1D rules and anisotropic weights for the dimensions.

SPARSE_GRID_CC, a dataset directory which contains multidimensional Smolyak sparse grids based on the 1D Clenshaw Curtis rule;

SPARSE_GRID_DISPLAY, a MATLAB program which reads a file of points on a sparse grid, displays the grid and saves the image in a PNG file;

SPARSE_GRID_F2, a dataset directory which contains multidimensional Smolyak sparse grids based on the 1D Fejer type 2 rule;

SPARSE_GRID_GL, a dataset directory which contains multidimensional Smolyak sparse grids based on the 1D Gauss-Legendre rule;

SPARSE_GRID_GP, a dataset directory which contains multidimensional Smolyak sparse grids based on the 1D Gauss-Patterson rule;

SPARSE_GRID_HERMITE, a dataset directory which contains multidimensional Smolyak sparse grids based on the 1D Gauss-Hermite rule;

SPARSE_GRID_MIXED, a dataset directory which contains multidimensional Smolyak sparse grids based on a mixed set of 1D factor rules.

SPARSE_GRID_NCC, a dataset directory which contains multidimensional Smolyak sparse grids based on the 1D Newton Cotes Closed rule;

SPARSE_GRID_NCO, a dataset directory which contains multidimensional Smolyak sparse grids based on the 1D Newton Cotes Open rule;

SPARSE_GRIDS_DISPLAY, a MATLAB program which reads two files of sparse grids, displays the first with hollow blue dots, the second with red dots.

### Sample Files:

SGMG_D2_L2_CCXCC is a sparse grid in 2D, at level 2, whose 1D factors are [Clenshaw Curtis, Clenshaw Curtis]

SGMG_D2_L2_CCXGL is a sparse grid in 2D, at level 2, whose 1D factors are [Clenshaw Curtis, Gauss Legendre]

SGMG_D2_L2_CCXGLG is a sparse grid in 2D, at level 2, whose 1D factors are [Clenshaw Curtis, Generalized Gauss Laguerre (alpha = 1.5)].

SGMG_D2_L2_CCXLG is a sparse grid in 2D, at level 2, whose 1D factors are [Clenshaw Curtis, Gauss Laguerre]

SGMG_D2_L2_F2XGJ is a sparse grid in 2D, at level 2, whose 1D factors are [Fejer Type 2, Gauss Jacobi (alpha = 0.5, beta = 1.5) ]

SGMG_D2_L2_GGHXGL is a sparse grid in 2D, at level 2, whose 1D factors are [Generalized Gauss Hermite ( alpha = 2 ), Gauss Legendre]

SGMG_D2_L3_CCXGP is a sparse grid in 2D, at level 3, whose 1D factors are [Clenshaw Curtis, Gauss Patterson]

SGMG_D3_L2_CCXF2XGH is a sparse grid in 3D, at level 2, whose 1D factors are [Clenshaw Curtis, Fejer Type 2, Gauss Hermite]

You can go up one level to the DATASETS page.

Last revised on 26 July 2010.