21 January 2020 08:59:41 AM
SQUARE_INTEGRALS_TEST
C version
Test the SQUARE_INTEGRALS library.
SQUARE01_MONOMIAL_INTEGRAL_TEST
SQUARE01_MONOMIAL_INTEGRAL returns the integral of a monomial
over the unit square.
Compare exact and estimated integrals
over the interior of the unit square in 2D.
Number of sample points is 4192
Ex Ey MC-Estimate Exact Error
5 3 0.0407015 0.0416667 9.65e-04
0 3 0.24772 0.25 2.28e-03
3 3 0.0617648 0.0625 7.35e-04
7 2 0.0409558 0.0416667 7.11e-04
3 6 0.0347451 0.0357143 9.69e-04
3 4 0.0490791 0.05 9.21e-04
5 3 0.0407015 0.0416667 9.65e-04
4 0 0.205635 0.2 5.64e-03
2 7 0.0408387 0.0416667 8.28e-04
6 7 0.0167397 0.0178571 1.12e-03
1 3 0.124093 0.125 9.07e-04
2 4 0.065838 0.0666667 8.29e-04
4 1 0.10114 0.1 1.14e-03
0 3 0.24772 0.25 2.28e-03
7 6 0.0166817 0.0178571 1.18e-03
2 1 0.167784 0.166667 1.12e-03
7 1 0.0630248 0.0625 5.25e-04
2 5 0.0546923 0.0555556 8.63e-04
6 1 0.0721531 0.0714286 7.24e-04
5 0 0.172018 0.166667 5.35e-03
SQUARESYM_MONOMIAL_INTEGRAL_TEST
SQUARESYM_MONOMIAL_INTEGRAL returns the integral of a monomial
over the symmetric unit square.
Compare exact and estimated integrals
over the interior of the unit square in 2D.
Number of sample points is 4192
Ex Ey MC-Estimate Exact Error
5 3 -0.000604423 0 6.04e-04
0 3 -0.00170693 0 1.71e-03
3 3 -0.00135924 0 1.36e-03
7 2 -0.00717992 0 7.18e-03
3 6 -0.00633502 0 6.34e-03
3 4 -0.00632412 0 6.32e-03
5 3 -0.000604423 0 6.04e-04
4 0 0.830138 0.8 3.01e-02
2 7 -0.00639541 0 6.40e-03
6 7 -0.0059758 0 5.98e-03
1 3 -0.000682644 0 6.83e-04
2 4 0.265918 0.266667 7.49e-04
4 1 -0.0244943 0 2.45e-02
0 3 -0.00170693 0 1.71e-03
7 6 -0.00531321 0 5.31e-03
2 1 -0.025342 0 2.53e-02
7 1 -0.00227777 0 2.28e-03
2 5 -0.00856214 0 8.56e-03
6 1 -0.022297 0 2.23e-02
5 0 -0.000949718 0 9.50e-04
SQUARE_INTEGRALS_TEST
Normal end of execution.
21 January 2020 08:59:41 AM