lattice_rule_test 11-Feb-2019 15:56:36 lattice_rule_test MATLAB version Test lattice_rule. LATTICE_RULE_TEST01 FIBONACCI_LATTICE_Q applies a Fibonacci lattice rule to integrate a function over the unit square. These Fibonacci rules are only available in 2D. The spatial dimension DIM_NUM = 2 K M EXACT ESTIMATE ERROR 3 2 1.000000 0.446909 5.530914e-01 4 3 1.000000 0.579554 4.204462e-01 5 5 1.000000 0.762059 2.379409e-01 6 8 1.000000 0.830249 1.697507e-01 7 13 1.000000 0.904672 9.532787e-02 8 21 1.000000 0.933352 6.664773e-02 9 34 1.000000 0.962800 3.719982e-02 10 55 1.000000 0.974212 2.578824e-02 11 89 1.000000 0.985652 1.434808e-02 12 144 1.000000 0.990092 9.908297e-03 13 233 1.000000 0.994496 5.504474e-03 14 377 1.000000 0.996205 3.794537e-03 15 610 1.000000 0.997893 2.106574e-03 16 987 1.000000 0.998549 1.451040e-03 17 1597 1.000000 0.999195 8.053118e-04 18 2584 1.000000 0.999445 5.545202e-04 LATTICE_RULE_TEST02 FIBONACCI_LATTICE_T applies a symmetric Fibonacci lattice rule --------- to integrate a function over the unit square. These Fibonacci rules are only available in 2D.= The spatial dimension DIM_NUM = 2 K M EXACT ESTIMATE ERROR 3 2 1.000000 0.446909 5.530914e-01 4 3 1.000000 0.579554 4.204462e-01 5 5 1.000000 0.762059 2.379409e-01 6 8 1.000000 0.830249 1.697507e-01 7 13 1.000000 0.904672 9.532787e-02 8 21 1.000000 0.933352 6.664773e-02 9 34 1.000000 0.962800 3.719982e-02 10 55 1.000000 0.974212 2.578824e-02 11 89 1.000000 0.985652 1.434808e-02 12 144 1.000000 0.990092 9.908297e-03 13 233 1.000000 0.994496 5.504474e-03 14 377 1.000000 0.996205 3.794537e-03 15 610 1.000000 0.997893 2.106574e-03 16 987 1.000000 0.998549 1.451040e-03 17 1597 1.000000 0.999195 8.053118e-04 18 2584 1.000000 0.999445 5.545202e-04 LATTICE_RULE_TEST03 FIBONACCI_LATTICE_B applies an optimal Fibonacci lattice rule ------- to integrate a function over the unit square. These Fibonacci rules are only available in 2D. The spatial dimension DIM_NUM = 2 K M EXACT ESTIMATE ERROR 3 2 1.000000 0.446909 5.530914e-01 4 3 1.000000 0.579554 4.204462e-01 5 5 1.000000 0.762059 2.379409e-01 6 8 1.000000 0.830249 1.697507e-01 7 13 1.000000 0.904672 9.532787e-02 8 21 1.000000 0.933352 6.664773e-02 9 34 1.000000 0.962800 3.719982e-02 10 55 1.000000 0.974212 2.578824e-02 11 89 1.000000 0.985652 1.434808e-02 12 144 1.000000 0.990092 9.908297e-03 13 233 1.000000 0.994496 5.504474e-03 14 377 1.000000 0.996205 3.794537e-03 15 610 1.000000 0.997893 2.106574e-03 16 987 1.000000 0.998549 1.451040e-03 17 1597 1.000000 0.999195 8.053118e-04 18 2584 1.000000 0.999445 5.545202e-04 LATTICE_RULE_TEST04 FIBONACCI_LATTICE_Q1 applies a Fibonacci lattice rule to integrate a function over the unit square. A nonlinear coordinate transformation is applied. These Fibonacci rules are only available in 2D. The spatial dimension DIM_NUM = 2 K M EXACT ESTIMATE ERROR 3 2 1.000000 1.005544 5.544437e-03 4 3 1.000000 0.999689 3.109315e-04 5 5 1.000000 1.110427 1.104273e-01 6 8 1.000000 1.062375 6.237528e-02 7 13 1.000000 1.033491 3.349101e-02 8 21 1.000000 1.015904 1.590427e-02 9 34 1.000000 1.007314 7.313868e-03 10 55 1.000000 1.003248 3.248174e-03 11 89 1.000000 1.001418 1.417980e-03 12 144 1.000000 1.000608 6.082856e-04 13 233 1.000000 1.000258 2.580455e-04 14 377 1.000000 1.000108 1.083183e-04 15 610 1.000000 1.000045 4.511364e-05 16 987 1.000000 1.000019 1.865663e-05 17 1597 1.000000 1.000008 7.671221e-06 18 2584 1.000000 1.000003 3.138114e-06 LATTICE_RULE_TEST05 FIBONACCI_LATTICE_Q2 applies a Fibonacci lattice rule to integrate a function over the unit square. A nonlinear coordinate transformation is applied. These Fibonacci rules are only available in 2D. The spatial dimension DIM_NUM = 2 K M EXACT ESTIMATE ERROR 3 2 1.000000 1.571163 5.711632e-01 4 3 1.000000 1.202250 2.022497e-01 5 5 1.000000 1.104584 1.045838e-01 6 8 1.000000 1.047741 4.774133e-02 7 13 1.000000 1.002023 2.023026e-03 8 21 1.000000 1.001297 1.297083e-03 9 34 1.000000 1.000048 4.835884e-05 10 55 1.000000 1.000061 6.147685e-05 11 89 1.000000 1.000000 3.056390e-07 12 144 1.000000 1.000003 3.025015e-06 13 233 1.000000 1.000000 4.990474e-08 14 377 1.000000 1.000000 1.577330e-07 15 610 1.000000 1.000000 4.528132e-09 16 987 1.000000 1.000000 8.511838e-09 17 1597 1.000000 1.000000 2.964125e-10 18 2584 1.000000 1.000000 4.674185e-10 LATTICE_RULE_TEST06 FIBONACCI_LATTICE_Q3 applies a Fibonacci lattice rule to integrate a function over the unit square. A nonlinear coordinate transformation is applied. These Fibonacci rules are only available in 2D. The spatial dimension DIM_NUM = 2 K M EXACT ESTIMATE ERROR 3 2 1.000000 1.787635 7.876346e-01 4 3 1.000000 1.222003 2.220034e-01 5 5 1.000000 1.050162 5.016247e-02 6 8 1.000000 1.031257 3.125671e-02 7 13 1.000000 0.997689 2.311129e-03 8 21 1.000000 1.000829 8.294076e-04 9 34 1.000000 0.999971 2.884616e-05 10 55 1.000000 1.000047 4.672840e-05 11 89 1.000000 0.999998 1.587487e-06 12 144 1.000000 1.000003 2.602494e-06 13 233 1.000000 1.000000 8.833584e-08 14 377 1.000000 1.000000 1.450382e-07 15 610 1.000000 1.000000 4.921387e-09 16 987 1.000000 1.000000 8.082874e-09 17 1597 1.000000 1.000000 2.742464e-10 18 2584 1.000000 1.000000 4.504463e-10 LATTICE_RULE_TEST07 LATTICE applies a lattice rule to integrate a function over the unit hypercube. The spatial dimension DIM_NUM = 2 The lattice rule order M will vary. The lattice generator vector: 1 1 2 2 I M EXACT ESTIMATE ERROR 1 5 1.000000 0.760192 2.398078e-01 2 13 1.000000 0.957115 4.288469e-02 3 23 1.000000 1.016074 1.607433e-02 4 37 1.000000 1.045954 4.595445e-02 5 47 1.000000 1.056536 5.653614e-02 6 61 1.000000 1.065578 6.557783e-02 7 73 1.000000 1.070590 7.058956e-02 8 89 1.000000 1.075183 7.518326e-02 9 103 1.000000 1.078039 7.803859e-02 10 113 1.000000 1.079647 7.964715e-02 LATTICE_RULE_TEST08 LATTICE applies a lattice rule to integrate a function over the unit hypercube. The spatial dimension DIM_NUM = 2 The lattice rule order M is fixed at 53 The lattice generator vector Z will vary. M Z(1) Z(2) EXACT ESTIMATE ERROR 53 1 1 1.000000 1.160699 1.606990e-01 53 1 2 1.000000 1.060990 6.098964e-02 53 1 3 1.000000 1.030924 3.092355e-02 53 1 4 1.000000 1.007034 7.034133e-03 53 1 5 1.000000 1.002994 2.993813e-03 53 1 6 1.000000 1.008962 8.962211e-03 53 1 7 1.000000 0.989136 1.086436e-02 53 1 8 1.000000 0.991666 8.334306e-03 53 1 9 1.000000 1.009447 9.447495e-03 53 1 10 1.000000 0.984278 1.572192e-02 53 1 11 1.000000 0.992941 7.059098e-03 53 1 12 1.000000 0.982027 1.797255e-02 53 1 13 1.000000 0.943609 5.639061e-02 53 1 14 1.000000 0.988858 1.114157e-02 53 1 15 1.000000 0.961547 3.845288e-02 53 1 16 1.000000 0.984685 1.531469e-02 53 1 17 1.000000 0.956489 4.351148e-02 53 1 18 1.000000 1.033181 3.318068e-02 53 1 19 1.000000 0.989046 1.095425e-02 53 1 20 1.000000 0.992422 7.578166e-03 53 1 21 1.000000 0.947847 5.215291e-02 53 1 22 1.000000 0.969229 3.077120e-02 53 1 23 1.000000 0.975920 2.408029e-02 53 1 24 1.000000 0.958501 4.149878e-02 53 1 25 1.000000 0.956891 4.310919e-02 53 1 26 1.000000 0.892870 1.071301e-01 53 1 27 1.000000 1.064199 6.419864e-02 53 1 28 1.000000 0.995337 4.662618e-03 53 1 29 1.000000 0.993437 6.563027e-03 53 1 30 1.000000 0.975887 2.411343e-02 53 1 31 1.000000 0.982584 1.741584e-02 53 1 32 1.000000 1.004630 4.629864e-03 53 1 33 1.000000 0.959544 4.045583e-02 53 1 34 1.000000 0.962793 3.720709e-02 53 1 35 1.000000 0.920861 7.913924e-02 53 1 36 1.000000 0.995744 4.256061e-03 53 1 37 1.000000 0.967209 3.279134e-02 53 1 38 1.000000 0.990532 9.467639e-03 53 1 39 1.000000 0.962977 3.702263e-02 53 1 40 1.000000 1.009396 9.396158e-03 53 1 41 1.000000 0.969779 3.022093e-02 53 1 42 1.000000 0.958991 4.100916e-02 53 1 43 1.000000 0.967607 3.239340e-02 53 1 44 1.000000 0.942910 5.709018e-02 53 1 45 1.000000 0.960280 3.972012e-02 53 1 46 1.000000 0.962918 3.708191e-02 53 1 47 1.000000 0.943370 5.662998e-02 53 1 48 1.000000 0.949423 5.057660e-02 53 1 49 1.000000 0.945882 5.411779e-02 53 1 50 1.000000 0.922956 7.704364e-02 53 1 51 1.000000 0.895767 1.042335e-01 53 1 52 1.000000 0.811426 1.885735e-01 LATTICE_RULE_TEST085 LATTICE is a lattice rule for periodic functions. However, we apply it to a nonperiodic function just to see how it does. The spatial dimension DIM_NUM = 2 The lattice generator vector: 1 1 2 2 K M EXACT ESTIMATE ERROR 3 2 1.000000 0.000000 1.000000e+00 4 3 1.000000 0.579554 4.204462e-01 5 5 1.000000 0.760192 2.398078e-01 6 8 1.000000 0.745448 2.545515e-01 7 13 1.000000 0.957115 4.288469e-02 8 21 1.000000 1.008645 8.645009e-03 9 34 1.000000 1.008523 8.523065e-03 10 55 1.000000 1.062260 6.226049e-02 11 89 1.000000 1.075183 7.518326e-02 12 144 1.000000 1.075288 7.528812e-02 13 233 1.000000 1.088207 8.820672e-02 14 377 1.000000 1.091296 9.129640e-02 15 610 1.000000 1.091330 9.132955e-02 16 987 1.000000 1.094392 9.439191e-02 17 1597 1.000000 1.095124 9.512351e-02 18 2584 1.000000 1.095132 9.513179e-02 LATTICE_RULE_TEST09 LATTICE_NP0 applies a lattice rule to a nonperiodic function by reflecting the function about the midpoint and averaging. The spatial dimension DIM_NUM = 2 The lattice generator vector: 1 1 2 2 M EXACT ESTIMATE ERROR 2 1.000000 1.220921 2.209212e-01 3 1.000000 1.048856 4.885598e-02 5 1.000000 1.019957 1.995732e-02 8 1.000000 1.017478 1.747847e-02 13 1.000000 1.005253 5.253032e-03 21 1.000000 1.003643 3.642565e-03 34 1.000000 1.003465 3.465166e-03 55 1.000000 1.002785 2.784894e-03 89 1.000000 1.002694 2.694300e-03 144 1.000000 1.002684 2.684427e-03 233 1.000000 1.002646 2.646484e-03 377 1.000000 1.002641 2.641435e-03 610 1.000000 1.002641 2.640884e-03 987 1.000000 1.002639 2.638770e-03 1597 1.000000 1.002638 2.638489e-03 2584 1.000000 1.002638 2.638458e-03 LATTICE_RULE_TEST10 LATTICE_NP1 applies a lattice rule to a nonperiodic function using a nonlinear transformation, to integrate a function over the unit square. The spatial dimension DIM_NUM = 2 The lattice generator vector: 1 1 2 2 M EXACT ESTIMATE ERROR 2 1.000000 0.000000 1.000000e+00 3 1.000000 0.999689 3.109315e-04 5 1.000000 1.101893 1.018931e-01 8 1.000000 0.997195 2.804576e-03 13 1.000000 1.064038 6.403783e-02 21 1.000000 1.057889 5.788897e-02 34 1.000000 1.051019 5.101900e-02 55 1.000000 1.054574 5.457401e-02 89 1.000000 1.054223 5.422259e-02 144 1.000000 1.053839 5.383924e-02 233 1.000000 1.054037 5.403702e-02 377 1.000000 1.054017 5.401742e-02 610 1.000000 1.053996 5.399605e-02 987 1.000000 1.054007 5.400707e-02 1597 1.000000 1.054006 5.400598e-02 2584 1.000000 1.054005 5.400479e-02 LATTICE_RULE_TEST11 MONTE_CARLO applies a Monte Carlo scheme to estimate the integral of a function over the unit hypercube. The spatial dimension DIM_NUM = 2 M EXACT ESTIMATE ERROR 100 1.000000 0.994672 5.328346e-03 1000 1.000000 1.012975 1.297514e-02 10000 1.000000 1.003861 3.861270e-03 100000 1.000000 0.999300 6.995806e-04 LATTICE_RULE_TEST12 LATTICE_PRINT prints out the lattice generated by a single generator vector. The spatial dimension DIM_NUM = 2 The generator vector: 1 1 2 3 The total lattice: 1 0 0 2 1 3 3 2 6 4 3 1 5 4 4 6 5 7 7 6 2 8 7 5 LATTICE_RULE_TEST13 FIND_Z20 finds the optimal lattice generator Z with Fourier coefficient smoothness ALPHA = 2, and copy exponent 0, for a rank 1 "method of good lattice points" rule. The spatial dimension DIM_NUM = 2 M Z(1) Z(2) (M = Fibonacci) 2 1 1 3 1 1 5 1 2 8 1 3 13 1 5 21 1 8 34 1 10 55 1 21 (M = 2**K) 4 1 2 8 1 3 16 1 6 32 1 14 64 1 27 128 1 54 256 1 94 512 1 198 1024 1 298 (M = 3*2**K) 6 1 2 12 1 5 24 1 10 48 1 14 96 1 22 192 1 73 384 1 146 768 1 225 1536 1 674 3072 1 849 (M = Prime) 113 1 35 173 1 64 229 1 94 281 1 109 349 1 135 409 1 169 463 1 179 541 1 200 LATTICE_RULE_TEST14 FIBONACCI_LATTICE_Q_NODES... The spatial dimension DIM_NUM = 2 The Fibonacci index K = 12 The Fibonacci value M = 144 The Fibonacci lattice nodes: Row: 1 2 Col 1 0.000000 0.000000 2 0.006944 0.618056 3 0.013889 0.236111 4 0.020833 0.854167 5 0.027778 0.472222 6 0.034722 0.090278 7 0.041667 0.708333 8 0.048611 0.326389 9 0.055556 0.944444 10 0.062500 0.562500 11 0.069444 0.180556 12 0.076389 0.798611 13 0.083333 0.416667 14 0.090278 0.034722 15 0.097222 0.652778 16 0.104167 0.270833 17 0.111111 0.888889 18 0.118056 0.506944 19 0.125000 0.125000 20 0.131944 0.743056 21 0.138889 0.361111 22 0.145833 0.979167 23 0.152778 0.597222 24 0.159722 0.215278 25 0.166667 0.833333 26 0.173611 0.451389 27 0.180556 0.069444 28 0.187500 0.687500 29 0.194444 0.305556 30 0.201389 0.923611 31 0.208333 0.541667 32 0.215278 0.159722 33 0.222222 0.777778 34 0.229167 0.395833 35 0.236111 0.013889 36 0.243056 0.631944 37 0.250000 0.250000 38 0.256944 0.868056 39 0.263889 0.486111 40 0.270833 0.104167 41 0.277778 0.722222 42 0.284722 0.340278 43 0.291667 0.958333 44 0.298611 0.576389 45 0.305556 0.194444 46 0.312500 0.812500 47 0.319444 0.430556 48 0.326389 0.048611 49 0.333333 0.666667 50 0.340278 0.284722 51 0.347222 0.902778 52 0.354167 0.520833 53 0.361111 0.138889 54 0.368056 0.756944 55 0.375000 0.375000 56 0.381944 0.993056 57 0.388889 0.611111 58 0.395833 0.229167 59 0.402778 0.847222 60 0.409722 0.465278 61 0.416667 0.083333 62 0.423611 0.701389 63 0.430556 0.319444 64 0.437500 0.937500 65 0.444444 0.555556 66 0.451389 0.173611 67 0.458333 0.791667 68 0.465278 0.409722 69 0.472222 0.027778 70 0.479167 0.645833 71 0.486111 0.263889 72 0.493056 0.881944 73 0.500000 0.500000 74 0.506944 0.118056 75 0.513889 0.736111 76 0.520833 0.354167 77 0.527778 0.972222 78 0.534722 0.590278 79 0.541667 0.208333 80 0.548611 0.826389 81 0.555556 0.444444 82 0.562500 0.062500 83 0.569444 0.680556 84 0.576389 0.298611 85 0.583333 0.916667 86 0.590278 0.534722 87 0.597222 0.152778 88 0.604167 0.770833 89 0.611111 0.388889 90 0.618056 0.006944 91 0.625000 0.625000 92 0.631944 0.243056 93 0.638889 0.861111 94 0.645833 0.479167 95 0.652778 0.097222 96 0.659722 0.715278 97 0.666667 0.333333 98 0.673611 0.951389 99 0.680556 0.569444 100 0.687500 0.187500 101 0.694444 0.805556 102 0.701389 0.423611 103 0.708333 0.041667 104 0.715278 0.659722 105 0.722222 0.277778 106 0.729167 0.895833 107 0.736111 0.513889 108 0.743056 0.131944 109 0.750000 0.750000 110 0.756944 0.368056 111 0.763889 0.986111 112 0.770833 0.604167 113 0.777778 0.222222 114 0.784722 0.840278 115 0.791667 0.458333 116 0.798611 0.076389 117 0.805556 0.694444 118 0.812500 0.312500 119 0.819444 0.930556 120 0.826389 0.548611 121 0.833333 0.166667 122 0.840278 0.784722 123 0.847222 0.402778 124 0.854167 0.020833 125 0.861111 0.638889 126 0.868056 0.256944 127 0.875000 0.875000 128 0.881944 0.493056 129 0.888889 0.111111 130 0.895833 0.729167 131 0.902778 0.347222 132 0.909722 0.965278 133 0.916667 0.583333 134 0.923611 0.201389 135 0.930556 0.819444 136 0.937500 0.437500 137 0.944444 0.055556 138 0.951389 0.673611 139 0.958333 0.291667 140 0.965278 0.909722 141 0.972222 0.527778 142 0.979167 0.145833 143 0.986111 0.763889 144 0.993056 0.381944 lattice_rule_test Normal end of execution. 11-Feb-2019 15:56:46 diary off