16 October 2011 12:11:45 PM SGMGA_WEIGHT_PRB C++ version Test the SGMGA_WEIGHT function. SGMGA_WEIGHT_TESTS Call SGMGA_WEIGHT_TEST with various arguments. All tests will use a point equality tolerance of 1.49012e-08 SGMGA_WEIGHT_TEST Compute the weights of a sparse grid. Each sparse grid is of spatial dimension DIM_NUM, and is made up of product grids of levels up to LEVEL_MAX. IMPORTANCE: 1 1 LEVEL_WEIGHT: 1 1 Dimension Rule Growth rate Parameters 0 1 6 1 1 6 As a simple test, sum these weights. They should sum to exactly 4 Level Weight sum Expected sum Difference 0 4 4 0 1 4 4 0 2 4 4 0 SGMGA_WEIGHT_TEST Compute the weights of a sparse grid. Each sparse grid is of spatial dimension DIM_NUM, and is made up of product grids of levels up to LEVEL_MAX. IMPORTANCE: 1 2 LEVEL_WEIGHT: 1 0.5 Dimension Rule Growth rate Parameters 0 1 6 1 1 6 As a simple test, sum these weights. They should sum to exactly 4 Level Weight sum Expected sum Difference 0 4 4 0 1 4 4 0 2 4 4 0 SGMGA_WEIGHT_TEST Compute the weights of a sparse grid. Each sparse grid is of spatial dimension DIM_NUM, and is made up of product grids of levels up to LEVEL_MAX. IMPORTANCE: 1 1 1 LEVEL_WEIGHT: 1 1 1 Dimension Rule Growth rate Parameters 0 1 6 1 1 6 2 1 6 As a simple test, sum these weights. They should sum to exactly 8 Level Weight sum Expected sum Difference 0 8 8 0 1 8 8 0 2 8 8 4.44089e-15 SGMGA_WEIGHT_TEST Compute the weights of a sparse grid. Each sparse grid is of spatial dimension DIM_NUM, and is made up of product grids of levels up to LEVEL_MAX. IMPORTANCE: 1 2 3 LEVEL_WEIGHT: 1 0.5 0.333333 Dimension Rule Growth rate Parameters 0 1 6 1 1 6 2 1 6 As a simple test, sum these weights. They should sum to exactly 8 Level Weight sum Expected sum Difference 0 8 8 0 1 8 8 0 2 8 8 0 SGMGA_WEIGHT_TEST Compute the weights of a sparse grid. Each sparse grid is of spatial dimension DIM_NUM, and is made up of product grids of levels up to LEVEL_MAX. IMPORTANCE: 1 2 LEVEL_WEIGHT: 1 0.5 Dimension Rule Growth rate Parameters 0 1 6 1 3 6 As a simple test, sum these weights. They should sum to exactly 4 Level Weight sum Expected sum Difference 0 4 4 0 1 4 4 0 2 4 4 0 SGMGA_WEIGHT_TEST Compute the weights of a sparse grid. Each sparse grid is of spatial dimension DIM_NUM, and is made up of product grids of levels up to LEVEL_MAX. IMPORTANCE: 1 2 LEVEL_WEIGHT: 1 0.5 Dimension Rule Growth rate Parameters 0 1 6 1 4 3 As a simple test, sum these weights. They should sum to exactly 4 Level Weight sum Expected sum Difference 0 4 4 8.88178e-16 1 4 4 8.88178e-16 2 4 4 2.66454e-15 SGMGA_WEIGHT_TEST Compute the weights of a sparse grid. Each sparse grid is of spatial dimension DIM_NUM, and is made up of product grids of levels up to LEVEL_MAX. IMPORTANCE: 1 2 LEVEL_WEIGHT: 1 0.5 Dimension Rule Growth rate Parameters 0 1 6 1 7 3 As a simple test, sum these weights. They should sum to exactly 2 Level Weight sum Expected sum Difference 0 2 2 0 1 2 2 0 2 2 2 4.44089e-16 SGMGA_WEIGHT_TEST Compute the weights of a sparse grid. Each sparse grid is of spatial dimension DIM_NUM, and is made up of product grids of levels up to LEVEL_MAX. IMPORTANCE: 1 2 LEVEL_WEIGHT: 1 0.5 Dimension Rule Growth rate Parameters 0 1 6 1 8 3 1.5 As a simple test, sum these weights. They should sum to exactly 2.65868 Level Weight sum Expected sum Difference 0 2.65868 2.65868 4.44089e-16 1 2.65868 2.65868 8.88178e-16 2 2.65868 2.65868 4.44089e-16 SGMGA_WEIGHT_TEST Compute the weights of a sparse grid. Each sparse grid is of spatial dimension DIM_NUM, and is made up of product grids of levels up to LEVEL_MAX. IMPORTANCE: 1 2 LEVEL_WEIGHT: 1 0.5 Dimension Rule Growth rate Parameters 0 2 6 1 9 3 0.5 1.5 As a simple test, sum these weights. They should sum to exactly 3.14159 Level Weight sum Expected sum Difference 0 3.14159 3.14159 4.44089e-16 1 3.14159 3.14159 0 2 3.14159 3.14159 3.55271e-15 SGMGA_WEIGHT_TEST Compute the weights of a sparse grid. Each sparse grid is of spatial dimension DIM_NUM, and is made up of product grids of levels up to LEVEL_MAX. IMPORTANCE: 1 2 LEVEL_WEIGHT: 1 0.5 Dimension Rule Growth rate Parameters 0 6 3 2 1 10 4 As a simple test, sum these weights. They should sum to exactly 1.5708 Level Weight sum Expected sum Difference 0 1.5708 1.5708 0 1 1.5708 1.5708 2.22045e-16 2 1.5708 1.5708 4.44089e-16 SGMGA_WEIGHT_TEST Compute the weights of a sparse grid. Each sparse grid is of spatial dimension DIM_NUM, and is made up of product grids of levels up to LEVEL_MAX. IMPORTANCE: 1 2 LEVEL_WEIGHT: 1 0.5 Dimension Rule Growth rate Parameters 0 1 6 1 1 6 As a simple test, sum these weights. They should sum to exactly 4 Level Weight sum Expected sum Difference 0 4 4 0 1 4 4 0 2 4 4 0 3 4 4 0 4 4 4 0 5 4 4 8.88178e-16 SGMGA_WEIGHT_TEST Compute the weights of a sparse grid. Each sparse grid is of spatial dimension DIM_NUM, and is made up of product grids of levels up to LEVEL_MAX. IMPORTANCE: 1 2 3 LEVEL_WEIGHT: 1 0.5 0.333333 Dimension Rule Growth rate Parameters 0 1 6 1 4 3 2 5 3 As a simple test, sum these weights. They should sum to exactly 7.08982 Level Weight sum Expected sum Difference 0 7.08982 7.08982 2.66454e-15 1 7.08982 7.08982 1.77636e-15 2 7.08982 7.08982 7.10543e-15 SGMGA_WEIGHT_TEST Compute the weights of a sparse grid. Each sparse grid is of spatial dimension DIM_NUM, and is made up of product grids of levels up to LEVEL_MAX. IMPORTANCE: 1 2 3 LEVEL_WEIGHT: 1 0.5 0.333333 Dimension Rule Growth rate Parameters 0 1 6 1 11 3 2 11 3 Because this rule includes Golub-Welsch components, we do not try to compute the exact weight sum. Level Weight sum Expected sum Difference 0 7.08982 0 7.08982 1 7.08982 0 7.08982 2 7.08982 0 7.08982 SGMGA_WEIGHT_TEST Compute the weights of a sparse grid. Each sparse grid is of spatial dimension DIM_NUM, and is made up of product grids of levels up to LEVEL_MAX. IMPORTANCE: 1 0 1 LEVEL_WEIGHT: 1 0 1 Dimension Rule Growth rate Parameters 0 1 6 1 1 6 2 1 6 As a simple test, sum these weights. They should sum to exactly 8 Level Weight sum Expected sum Difference 0 8 8 0 1 8 8 0 2 8 8 0 3 8 8 1.77636e-15 SGMGA_WEIGHT_PRB Normal end of execution. 16 October 2011 12:11:45 PM