25 October 2010 5:12:05.834 PM LATTICE_RULE_PRB FORTRAN90 version Test the LATTICE_RULE library. 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 0.553091 4 3 1.000000 0.579554 0.420446 5 5 1.000000 0.762059 0.237941 6 8 1.000000 0.830249 0.169751 7 13 1.000000 0.904672 0.095328 8 21 1.000000 0.933352 0.066648 9 34 1.000000 0.962800 0.037200 10 55 1.000000 0.974212 0.025788 11 89 1.000000 0.985652 0.014348 12 144 1.000000 0.990092 0.009908 13 233 1.000000 0.994496 0.005504 14 377 1.000000 0.996205 0.003795 15 610 1.000000 0.997893 0.002107 16 987 1.000000 0.998549 0.001451 17 1597 1.000000 0.999195 0.000805 18 2584 1.000000 0.999445 0.000555 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 1.093988 0.093988 4 3 1.000000 1.010940 0.010940 5 5 1.000000 1.020891 0.020891 6 8 1.000000 0.992019 0.007981 7 13 1.000000 1.004223 0.004223 8 21 1.000000 0.994979 0.005021 9 34 1.000000 1.000864 0.000864 10 55 1.000000 0.997742 0.002258 11 89 1.000000 1.000193 0.000193 12 144 1.000000 0.999079 0.000921 13 233 1.000000 1.000050 0.000050 14 377 1.000000 0.999638 0.000362 15 610 1.000000 1.000015 0.000015 16 987 1.000000 0.999860 0.000140 17 1597 1.000000 1.000005 0.000005 18 2584 1.000000 0.999946 0.000054 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 1.093988 0.093988 4 3 1.000000 1.055240 0.055240 5 5 1.000000 1.020891 0.020891 6 8 1.000000 1.010708 0.010708 7 13 1.000000 1.004223 0.004223 8 21 1.000000 1.002212 0.002212 9 34 1.000000 1.000864 0.000864 10 55 1.000000 1.000510 0.000510 11 89 1.000000 1.000193 0.000193 12 144 1.000000 1.000136 0.000136 13 233 1.000000 1.000050 0.000050 14 377 1.000000 1.000042 0.000042 15 610 1.000000 1.000015 0.000015 16 987 1.000000 1.000014 0.000014 17 1597 1.000000 1.000005 0.000005 18 2584 1.000000 1.000005 0.000005 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 0.005544 4 3 1.000000 0.999689 0.000311 5 5 1.000000 1.110427 0.110427 6 8 1.000000 1.062375 0.062375 7 13 1.000000 1.033491 0.033491 8 21 1.000000 1.015904 0.015904 9 34 1.000000 1.007314 0.007314 10 55 1.000000 1.003248 0.003248 11 89 1.000000 1.001418 0.001418 12 144 1.000000 1.000608 0.000608 13 233 1.000000 1.000258 0.000258 14 377 1.000000 1.000108 0.000108 15 610 1.000000 1.000045 0.000045 16 987 1.000000 1.000019 0.000019 17 1597 1.000000 1.000008 0.000008 18 2584 1.000000 1.000003 0.000003 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 0.571163 4 3 1.000000 1.202250 0.202250 5 5 1.000000 1.104584 0.104584 6 8 1.000000 1.047741 0.047741 7 13 1.000000 1.002023 0.002023 8 21 1.000000 1.001297 0.001297 9 34 1.000000 1.000048 0.000048 10 55 1.000000 1.000061 0.000061 11 89 1.000000 1.000000 0.000000 12 144 1.000000 1.000003 0.000003 13 233 1.000000 1.000000 0.000000 14 377 1.000000 1.000000 0.000000 15 610 1.000000 1.000000 0.000000 16 987 1.000000 1.000000 0.000000 17 1597 1.000000 1.000000 0.000000 18 2584 1.000000 1.000000 0.000000 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 0.787635 4 3 1.000000 1.222003 0.222003 5 5 1.000000 1.050162 0.050162 6 8 1.000000 1.031257 0.031257 7 13 1.000000 0.997689 0.002311 8 21 1.000000 1.000829 0.000829 9 34 1.000000 0.999971 0.000029 10 55 1.000000 1.000047 0.000047 11 89 1.000000 0.999998 0.000002 12 144 1.000000 1.000003 0.000003 13 233 1.000000 1.000000 0.000000 14 377 1.000000 1.000000 0.000000 15 610 1.000000 1.000000 0.000000 16 987 1.000000 1.000000 0.000000 17 1597 1.000000 1.000000 0.000000 18 2584 1.000000 1.000000 0.000000 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 M EXACT ESTIMATE ERROR 1 5 1.000000 0.760192 0.239808 2 13 1.000000 0.957115 0.042885 3 23 1.000000 1.016074 0.016074 4 37 1.000000 1.045954 0.045954 5 47 1.000000 1.056536 0.056536 6 61 1.000000 1.065578 0.065578 7 73 1.000000 1.070590 0.070590 8 89 1.000000 1.075183 0.075183 9 103 1.000000 1.078039 0.078039 10 113 1.000000 1.079647 0.079647 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 0.160699 53 1 2 1.000000 1.060990 0.060990 53 1 3 1.000000 1.030924 0.030924 53 1 4 1.000000 1.007034 0.007034 53 1 5 1.000000 1.002994 0.002994 53 1 6 1.000000 1.008962 0.008962 53 1 7 1.000000 0.989136 0.010864 53 1 8 1.000000 0.991666 0.008334 53 1 9 1.000000 1.009447 0.009447 53 1 10 1.000000 0.984278 0.015722 53 1 11 1.000000 0.992941 0.007059 53 1 12 1.000000 0.982027 0.017973 53 1 13 1.000000 0.943609 0.056391 53 1 14 1.000000 0.988858 0.011142 53 1 15 1.000000 0.961547 0.038453 53 1 16 1.000000 0.984685 0.015315 53 1 17 1.000000 0.956489 0.043511 53 1 18 1.000000 1.033181 0.033181 53 1 19 1.000000 0.989046 0.010954 53 1 20 1.000000 0.992422 0.007578 53 1 21 1.000000 0.947847 0.052153 53 1 22 1.000000 0.969229 0.030771 53 1 23 1.000000 0.975920 0.024080 53 1 24 1.000000 0.958501 0.041499 53 1 25 1.000000 0.956891 0.043109 53 1 26 1.000000 0.892870 0.107130 53 1 27 1.000000 1.064199 0.064199 53 1 28 1.000000 0.995337 0.004663 53 1 29 1.000000 0.993437 0.006563 53 1 30 1.000000 0.975887 0.024113 53 1 31 1.000000 0.982584 0.017416 53 1 32 1.000000 1.004630 0.004630 53 1 33 1.000000 0.959544 0.040456 53 1 34 1.000000 0.962793 0.037207 53 1 35 1.000000 0.920861 0.079139 53 1 36 1.000000 0.995744 0.004256 53 1 37 1.000000 0.967209 0.032791 53 1 38 1.000000 0.990532 0.009468 53 1 39 1.000000 0.962977 0.037023 53 1 40 1.000000 1.009396 0.009396 53 1 41 1.000000 0.969779 0.030221 53 1 42 1.000000 0.958991 0.041009 53 1 43 1.000000 0.967607 0.032393 53 1 44 1.000000 0.942910 0.057090 53 1 45 1.000000 0.960280 0.039720 53 1 46 1.000000 0.962918 0.037082 53 1 47 1.000000 0.943370 0.056630 53 1 48 1.000000 0.949423 0.050577 53 1 49 1.000000 0.945882 0.054118 53 1 50 1.000000 0.922956 0.077044 53 1 51 1.000000 0.895767 0.104233 53 1 52 1.000000 0.811426 0.188574 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.000000 4 3 1.000000 0.579554 0.420446 5 5 1.000000 0.760192 0.239808 6 8 1.000000 0.745448 0.254552 7 13 1.000000 0.957115 0.042885 8 21 1.000000 1.008645 0.008645 9 34 1.000000 1.008523 0.008523 10 55 1.000000 1.062260 0.062260 11 89 1.000000 1.075183 0.075183 12 144 1.000000 1.075288 0.075288 13 233 1.000000 1.088207 0.088207 14 377 1.000000 1.091296 0.091296 15 610 1.000000 1.091330 0.091330 16 987 1.000000 1.094392 0.094392 17 1597 1.000000 1.095124 0.095124 18 2584 1.000000 1.095132 0.095132 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 K M EXACT ESTIMATE ERROR 3 2 1.000000 1.220921 0.220921 4 3 1.000000 1.048856 0.048856 5 5 1.000000 1.019957 0.019957 6 8 1.000000 1.017478 0.017478 7 13 1.000000 1.005253 0.005253 8 21 1.000000 1.003643 0.003643 9 34 1.000000 1.003465 0.003465 10 55 1.000000 1.002785 0.002785 11 89 1.000000 1.002694 0.002694 12 144 1.000000 1.002684 0.002684 13 233 1.000000 1.002646 0.002646 14 377 1.000000 1.002641 0.002641 15 610 1.000000 1.002641 0.002641 16 987 1.000000 1.002639 0.002639 17 1597 1.000000 1.002638 0.002638 18 2584 1.000000 1.002638 0.002638 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 K M EXACT ESTIMATE ERROR 3 2 1.000000 0.000000 1.000000 4 3 1.000000 0.999689 0.000311 5 5 1.000000 1.101893 0.101893 6 8 1.000000 0.997195 0.002805 7 13 1.000000 1.064038 0.064038 8 21 1.000000 1.057889 0.057889 9 34 1.000000 1.051019 0.051019 10 55 1.000000 1.054574 0.054574 11 89 1.000000 1.054223 0.054223 12 144 1.000000 1.053839 0.053839 13 233 1.000000 1.054037 0.054037 14 377 1.000000 1.054017 0.054017 15 610 1.000000 1.053996 0.053996 16 987 1.000000 1.054007 0.054007 17 1597 1.000000 1.054006 0.054006 18 2584 1.000000 1.054005 0.054005 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 1.111435 0.111435 1000 1.000000 1.039086 0.039086 10000 1.000000 1.004121 0.004121 100000 1.000000 0.998015 0.001985 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 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 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.00000 0.00000 2 0.694444E-02 0.618056 3 0.138889E-01 0.236111 4 0.208333E-01 0.854167 5 0.277778E-01 0.472222 6 0.347222E-01 0.902778E-01 7 0.416667E-01 0.708333 8 0.486111E-01 0.326389 9 0.555556E-01 0.944444 10 0.625000E-01 0.562500 11 0.694444E-01 0.180556 12 0.763889E-01 0.798611 13 0.833333E-01 0.416667 14 0.902778E-01 0.347222E-01 15 0.972222E-01 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.694444E-01 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.138889E-01 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.486111E-01 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.833333E-01 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.277778E-01 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.625000E-01 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.694444E-02 91 0.625000 0.625000 92 0.631944 0.243056 93 0.638889 0.861111 94 0.645833 0.479167 95 0.652778 0.972222E-01 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.416667E-01 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.763889E-01 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.208333E-01 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.555556E-01 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_PRB Normal end of execution. 25 October 2010 5:12:06.415 PM