>> sp_level_open ( 2, 2, 4 ) 27-May-2007 12:43:22 SP_LEVEL_OPEN MATLAB version Compute the abscissas and weights of a quadrature rule associated with a sparse grid derived from a Smolyak construction based on an open 1D quadrature rule. Inputs to the program include: DIM_NUM, the spatial dimension. (typically in the range of 2 to 10) LEVEL_MAX, the "level" of the sparse grid. (typically in the range of 0, 1, 2, 3, ... RULE, the 1D quadrature rule 1: Fejer Type 1 ("F1"), 2: Fejer Type 2 ("F2"), 3: Gauss-Patterson ("GP"), 4: Newton-Cotes Open ("NCO"), 5: Newton-Cotes Open Half ("NCOH"); Output from the program includes: A printed table of the abscissas and weights. A set of files defining the quadrature rule: "cc_d?_level?_x.txt", a file of the abscissas; "cc_d?_level?_w.txt", a file of the weights; "cc_d?_level?_r.txt", a file of the ranges. Spatial dimension requested is = 2 The sparse grid level is = 2 The 1D quadrature rule index is = 4 NCO = Newton-Cotes Open. The number of distinct abscissas in the quadrature rule is determined from the spatial dimension DIM_NUM and the level LEVEL_MAX. For the given input, this value will be = 17 Grid index 1 4 4 2 2 4 3 6 4 4 4 2 5 4 6 6 1 4 7 3 4 8 5 4 9 7 4 10 2 2 11 6 2 12 2 6 13 6 6 14 4 1 15 4 3 16 4 5 17 4 7 Grid points: 1 0.000000 0.000000 2 -0.500000 0.000000 3 0.500000 0.000000 4 0.000000 -0.500000 5 0.000000 0.500000 6 -0.750000 0.000000 7 -0.250000 0.000000 8 0.250000 0.000000 9 0.750000 0.000000 10 -0.500000 -0.500000 11 0.500000 -0.500000 12 -0.500000 0.500000 13 0.500000 0.500000 14 0.000000 -0.750000 15 0.000000 -0.250000 16 0.000000 0.250000 17 0.000000 0.750000 Grid weights: 1 -17.7058201058201060 2 -7.5936507936507844 3 -7.5936507936507871 4 -7.5936507936507844 5 -7.5936507936507871 6 1.9470899470899483 7 9.2952380952380835 8 9.2952380952380977 9 1.9470899470899479 10 1.7777777777777770 11 1.7777777777777770 12 1.7777777777777770 13 1.7777777777777770 14 1.9470899470899483 15 9.2952380952380835 16 9.2952380952380977 17 1.9470899470899479 Weights sum to 4.000000 Correct value is 4.000000 Creating X file = "nco_d2_level2_x.txt". Creating W file = "nco_d2_level2_w.txt". Creating R file = "nco_d2_level2_r.txt". SP_LEVEL_OPEN Normal end of execution. 27-May-2007 12:43:24 >>