Tue Oct 19 17:10:20 2021 simplex_monte_carlo_test(): Python version: 3.6.9 Test simplex_monte_carlo(). i4vec_print_test Python version: 3.6.9 i4vec_print prints an I4VEC. Here is an I4VEC: 0 91 1 92 2 93 3 94 i4vec_print_test: Normal end of execution. i4vec_transpose_print_test Python version: 3.6.9 i4vec_transpose_print prints an I4VEC with 5 entries to a row, and an optional title. My array: 1 2 3 4 5 6 7 8 9 10 11 12 i4vec_transpose_print_test: Normal end of execution. r8mat_print_test Python version: 3.6.9 r8mat_print prints an R8MAT. Here is an R8MAT: Col: 0 1 2 3 4 Row 0 : 11 12 13 14 15 1 : 21 22 23 24 25 2 : 31 32 33 34 35 3 : 41 42 43 44 45 Col: 5 Row 0 : 16 1 : 26 2 : 36 3 : 46 r8mat_print_test: Normal end of execution. r8mat_print_some_test Python version: 3.6.9 r8mat_print_some prints some of an R8MAT. Here is an R8MAT: Col: 3 4 5 Row 0 : 14 15 16 1 : 24 25 26 2 : 34 35 36 r8mat_print_some_test: Normal end of execution. r8mat_transpose_print_test Python version: 3.6.9 r8mat_transpose_print prints an R8MAT. Here is an R8MAT, transposed: Row: 0 1 2 3 Col 0 : 11 21 31 41 1 : 12 22 32 42 2 : 13 23 33 43 r8mat_transpose_print_test: Normal end of execution. r8mat_transpose_print_some_test Python version: 3.6.9 r8mat_transpose_print_some prints some of an R8MAT, transposed. R8MAT, rows 0:2, cols 3:5: Row: 0 1 2 Col 3 : 14 24 34 4 : 15 25 35 5 : 16 26 36 r8mat_transpose_print_some_test: Normal end of execution. r8vec_print_test Python version: 3.6.9 r8vec_print prints an R8VEC. Here is an R8VEC: 0: 123.456 1: 5e-06 2: -1e+06 3: 3.14159 r8vec_print_test: Normal end of execution. simplex_general_sample_test simplex_general_sample computes a Monte Carlo estimate of an integral over the interior of a general simplex in 3D. Simplex vertices: 1 0 0 2 0 0 1 2 0 1 0 3 N 1 X Y Z X^2 XY XZ Y^2 YZ Z^2 1 1 1.3449 0.127366 1.28983 1.80877 0.171295 1.73469 0.0162221 0.16428 1.66365 2 1 1.37819 0.496012 0.233655 1.90312 0.655095 0.324112 0.465759 0.0997855 0.0557759 4 1 1.18217 0.196191 1.18801 1.40285 0.238169 1.36786 0.0725646 0.250872 1.80179 8 1 1.21306 0.429339 0.906997 1.50201 0.511068 1.03825 0.260461 0.342894 1.23628 16 1 1.17394 0.531709 0.731763 1.39544 0.60881 0.820316 0.579253 0.224646 0.84793 32 1 1.25303 0.441836 0.83243 1.61106 0.528673 0.992181 0.331828 0.313265 1.03015 64 1 1.28042 0.485217 0.715804 1.67185 0.594541 0.891659 0.403626 0.268384 0.847605 128 1 1.27252 0.457088 0.753736 1.65102 0.56341 0.923977 0.335679 0.283977 0.889419 256 1 1.24551 0.470387 0.83364 1.58577 0.563804 1.00328 0.355015 0.314704 1.04753 512 1 1.24298 0.496547 0.770343 1.58098 0.595368 0.917227 0.390586 0.314437 0.923117 1024 1 1.24715 0.494074 0.761097 1.59168 0.594424 0.911175 0.393119 0.293268 0.914545 2048 1 1.25042 0.480762 0.773124 1.60253 0.578665 0.924488 0.372316 0.293745 0.959742 4096 1 1.25238 0.501087 0.749484 1.60604 0.601039 0.902629 0.406354 0.300681 0.892 8192 1 1.24858 0.494955 0.742736 1.59662 0.593218 0.890389 0.393052 0.29812 0.881746 16384 1 1.24949 0.500793 0.754385 1.59839 0.600804 0.905404 0.401765 0.300996 0.911187 32768 1 1.24829 0.500643 0.753048 1.59511 0.600306 0.90302 0.400864 0.301749 0.903804 65536 1 1.24928 0.501664 0.752657 1.59801 0.601686 0.902585 0.401989 0.30166 0.905359 simplex_unit_monomial_integral_test Python version: 3.6.9 Estimate monomial integrals using Monte Carlo over the interior of the unit simplex in M dimensions. Number of sample points used is 4192 We randomly choose the exponents. Ex Ey Ez MC-Estimate Exact Error 3 4 4 3.99537e-08 3.96429e-08 3.1e-10 1 2 2 9.99455e-05 9.92063e-05 7.4e-07 1 1 3 0.000147617 0.00014881 1.2e-06 1 4 1 6.81758e-05 6.61376e-05 2e-06 2 4 4 1.84922e-07 1.85e-07 7.8e-11 1 3 1 0.000152195 0.00014881 3.4e-06 2 4 3 6.09305e-07 6.01251e-07 8.1e-09 3 4 0 3.8034e-05 3.96825e-05 1.6e-06 3 3 3 4.54611e-07 4.50938e-07 3.7e-09 2 0 3 0.000298408 0.000297619 7.9e-07 3 3 1 9.97474e-06 9.92063e-06 5.4e-08 0 4 3 3.98967e-05 3.96825e-05 2.1e-07 4 3 3 1.39574e-07 1.3875e-07 8.2e-10 1 1 3 0.000147617 0.00014881 1.2e-06 4 3 0 3.7846e-05 3.96825e-05 1.8e-06 1 3 0 0.00119962 0.00119048 9.1e-06 2 4 3 6.09305e-07 6.01251e-07 8.1e-09 3 0 4 4.02351e-05 3.96825e-05 5.5e-07 3 4 2 6.13553e-07 6.01251e-07 1.2e-08 4 3 4 3.9701e-08 3.96429e-08 5.8e-11 simplex_unit_monomial_integral_test: Normal end of execution. simplex_unit_sample_test00 Python version: 3.6.9 simplex_unit_sample samples the unit simplex in M dimensions. Sample points in the unit simplex. Row: 0 1 2 Col 0 : 0.569461 0.225816 0.0948888 1 : 0.311484 0.164247 0.37896 2 : 0.00554546 0.187277 0.379404 3 : 0.299445 0.318879 0.277015 4 : 0.421252 0.299128 0.205567 5 : 0.270785 0.0266414 0.192111 6 : 0.211299 0.106702 0.367116 7 : 0.285598 0.284305 0.114468 8 : 0.0714227 0.241336 0.593674 9 : 0.306058 0.439571 0.175293 simplex_unit_sample_test00 Normal end of execution. simplex_unit_sample_test01 simplex_unit_sample computes a Monte Carlo estimate of an integral over the interior of the unit simplex in 3D. N 1 X Y Z X^2 XY XZ Y^2 YZ Z^2 1 0.166667 0.0462874 0.00107337 0.0454392 0.0128551 0.0002981 0.0126196 6.9127e-06 0.000292638 0.0123883 2 0.166667 0.0527573 0.0985055 0.00464754 0.0220314 0.0237136 0.00173629 0.0686799 0.00237547 0.000142783 4 0.166667 0.0196841 0.04633 0.0600407 0.00303672 0.0056281 0.00679887 0.0172421 0.0153337 0.0221375 8 0.166667 0.0184294 0.0358289 0.0246096 0.00302032 0.00203672 0.00271959 0.015801 0.00508054 0.00438537 16 0.166667 0.0438263 0.0483193 0.0307467 0.0168593 0.0107919 0.00748799 0.0220732 0.00640125 0.00891558 32 0.166667 0.0365971 0.0402928 0.0550155 0.0128864 0.00642726 0.00999765 0.0180424 0.00880938 0.0275438 64 0.166667 0.0317411 0.0474223 0.0462798 0.0107542 0.00837465 0.00615981 0.0195065 0.0107272 0.0212558 128 0.166667 0.047035 0.043325 0.0393773 0.0204217 0.0099235 0.0086618 0.0175203 0.00778407 0.0158173 256 0.166667 0.0395013 0.0431183 0.0419787 0.0155094 0.00798583 0.00811422 0.0171795 0.00899764 0.0167459 512 0.166667 0.0413673 0.0416538 0.0428228 0.0167979 0.00819558 0.00846974 0.0167169 0.00852672 0.0174302 1024 0.166667 0.0424134 0.0427495 0.0411442 0.0171939 0.00866642 0.00833419 0.0172451 0.00845599 0.0164177 2048 0.166667 0.0420248 0.0433089 0.040618 0.0169419 0.00880023 0.00811117 0.0174309 0.00858109 0.0159195 4096 0.166667 0.0413581 0.0416251 0.0424022 0.0165258 0.00829293 0.00833826 0.0165791 0.00847982 0.0172295 8192 0.166667 0.0421505 0.0412785 0.0421786 0.0169776 0.00838167 0.00856791 0.0163807 0.00838279 0.0170359 16384 0.166667 0.0415223 0.0422327 0.041626 0.0166241 0.00839311 0.00828565 0.0169826 0.00851031 0.016582 32768 0.166667 0.0418346 0.0416156 0.0416507 0.0167307 0.00839368 0.00836763 0.0166445 0.00829945 0.016684 65536 0.166667 0.041579 0.0416722 0.0417702 0.0165763 0.00832556 0.00836352 0.0166539 0.00835248 0.0167168 Exact 0.166667 0.0416667 0.0416667 0.0416667 0.0166667 0.00833333 0.00833333 0.0166667 0.00833333 0.0166667 simplex_unit_sample_test02 simplex_unit_sample computes a Monte Carlo estimate of an integral over the interior of the unit simplex in 6D. N 1 U V^2 V^2W^2 X^4 Y^2Z^2 Z^6 1 0.00138889 0.000184255 7.75503e-05 1.88356e-06 2.01082e-10 1.00959e-08 1.11002e-07 2 0.00138889 7.92392e-05 5.2899e-07 1.54647e-08 4.09967e-07 4.01461e-10 2.4129e-07 4 0.00138889 0.000257156 4.87877e-05 3.08151e-06 2.63679e-06 1.00038e-09 7.57445e-11 8 0.00138889 6.12172e-05 2.91303e-05 8.92708e-07 5.1582e-06 3.86675e-09 3.5009e-07 16 0.00138889 0.000200688 5.27558e-05 7.57964e-07 1.49001e-06 1.77934e-08 1.14543e-06 32 0.00138889 0.000182214 7.45041e-05 1.60071e-06 3.51491e-06 2.49984e-08 4.46719e-06 64 0.00138889 0.000194816 5.23338e-05 1.02779e-06 7.24107e-06 1.27163e-08 2.25261e-07 128 0.00138889 0.000178373 4.82779e-05 7.74168e-07 5.21397e-06 9.26485e-09 3.41081e-06 256 0.00138889 0.000201768 3.97703e-05 9.06032e-07 8.32929e-06 1.71847e-08 1.07876e-06 512 0.00138889 0.00019 5.25043e-05 1.01332e-06 5.4154e-06 1.77208e-08 1.50415e-06 1024 0.00138889 0.000194021 4.44092e-05 9.77654e-07 6.56756e-06 1.75698e-08 1.34937e-06 2048 0.00138889 0.000189847 5.00097e-05 1.22454e-06 6.71309e-06 1.48008e-08 1.72662e-06 4096 0.00138889 0.00019913 4.76013e-05 1.09755e-06 6.98345e-06 1.49721e-08 1.42236e-06 8192 0.00138889 0.000195305 4.99429e-05 1.1458e-06 6.46451e-06 1.7226e-08 1.4944e-06 16384 0.00138889 0.000197358 4.89831e-05 1.11597e-06 6.62616e-06 1.68046e-08 1.4251e-06 32768 0.00138889 0.000198377 4.95575e-05 1.11752e-06 6.81469e-06 1.64641e-08 1.42767e-06 65536 0.00138889 0.000198261 4.9617e-05 1.10938e-06 6.69932e-06 1.69205e-08 1.57614e-06 Exact 0.00138889 0.000198413 4.96032e-05 1.10229e-06 6.61376e-06 1.67014e-08 1.50313e-06 simplex_unit_to_general_test01 simplex_unit_to_general maps points in the unit simplex to a general simplex. Here we consider a simplex in 2D, a triangle. The vertices of the general triangle are: 1.0000 1.0000 3.0000 1.0000 2.0000 5.0000 ( XSI ETA ) ( X Y ) 0.0000 0.0000 1.0000 1.0000 1.0000 0.0000 3.0000 1.0000 0.0000 1.0000 2.0000 5.0000 0.5649 0.0486 2.1783 1.1942 0.8563 0.0139 2.7265 1.0555 0.4059 0.0011 1.8130 1.0046 0.4294 0.2398 2.0986 1.9592 0.0490 0.4080 1.5060 2.6322 0.0254 0.9288 1.9796 4.7153 0.6747 0.0846 2.4341 1.3386 0.5241 0.2135 2.2617 1.8541 0.1195 0.1155 1.3545 1.4621 0.1777 0.4327 1.7881 2.7309 simplex_unit_to_general_test02 simplex_unit_to_general maps points in the unit simplex to a general simplex. Here we consider a simplex in 3D, a tetrahedron. The vertices of the general tetrahedron are: 1.0000 1.0000 1.0000 3.0000 1.0000 1.0000 1.0000 4.0000 1.0000 1.0000 1.0000 5.0000 ( XSI ETA ) ( X Y ) 0.0000 0.0000 0.0000 1.0000 1.0000 1.0000 1.0000 0.0000 0.0000 3.0000 1.0000 1.0000 0.0000 1.0000 0.0000 1.0000 4.0000 1.0000 0.0000 0.0000 1.0000 1.0000 1.0000 5.0000 0.0882 0.4437 0.3925 1.1764 2.3312 2.5701 0.2683 0.0530 0.2744 1.5366 1.1590 2.0976 0.1181 0.7247 0.0964 1.2362 3.1740 1.3858 0.2904 0.3771 0.0347 1.5809 2.1312 1.1387 0.5690 0.1678 0.0218 2.1379 1.5035 1.0872 0.2408 0.0901 0.2822 1.4816 1.2702 2.1287 0.0360 0.4203 0.2126 1.0720 2.2610 1.8505 0.0166 0.4094 0.4470 1.0331 2.2283 2.7878 0.2580 0.1308 0.0921 1.5159 1.3923 1.3685 0.2375 0.4735 0.2162 1.4751 2.4206 1.8647 simplex_unit_volume_test Python version: 3.6.9 simplex_unit_volume returns the volume of the unit simplex in M dimensions. M Volume 1 1 2 0.5 3 0.166667 4 0.0416667 5 0.00833333 6 0.00138889 7 0.000198413 8 2.48016e-05 9 2.75573e-06 simplex_unit_volume_test Normal end of execution. simplex_monte_carlo_test(): Normal end of execution. Tue Oct 19 17:10:29 2021