08-Jan-2022 10:31:09 tetrahedron_keast_rule_test(): MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2 Test tetrahedron_keast_rule(). TETRAHEDRON_KEAST_RULE_TEST01 KEAST_RULE_NUM returns the number of rules; KEAST_DEGREE returns the degree of a rule; KEAST_ORDER_NUM returns the order of a rule. Number of available rules = 10 Rule Degree Order 1 0 1 2 1 4 3 2 5 4 3 10 5 4 11 6 4 14 7 5 15 8 6 24 9 7 31 10 8 45 TETRAHEDRON_KEAST_RULE_TEST02 KEAST_RULE returns the points and weights of a Keast rule for the tetrahedron. In this test, we simply check that the weights sum to 1. Number of available rules = 10 Rule Sum of weights 1 1.000000e+00 2 1.000000e+00 3 1.000000e+00 4 1.000000e+00 5 1.000000e+00 6 1.000000e+00 7 1.000000e+00 8 1.000000e+00 9 1.000000e+00 10 1.000000e+00 TETRAHEDRON_KEAST_RULE_TEST025 KEAST_RULE returns the points and weights of a Keast rule for the tetrahedron. In this test, we simply check that, for each quadrature point, the barycentric coordinates sum to 1. Rule Suborder Sum of coordinates 1 1 1.000000e+00 2 1 1.000000e+00 3 2 1.000000e+00 1.000000e+00 4 2 1.000000e+00 1.000000e+00 5 3 1.000000e+00 1.000000e+00 1.000000e+00 6 3 1.000000e+00 1.000000e+00 1.000000e+00 7 4 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 8 4 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 9 6 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 10 7 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 TETRAHEDRON_KEAST_RULE_TEST03 KEAST_RULE returns the points and weights of a Keast rule for the tetrahedron. In this test, we simply check that, for each quadrature point, the barycentric coordinates sum to 1. Rule Suborder Sum of coordinates 1 1 1.000000e+00 2 1 1.000000e+00 3 2 1.000000e+00 1.000000e+00 4 2 1.000000e+00 1.000000e+00 5 3 1.000000e+00 1.000000e+00 1.000000e+00 6 3 1.000000e+00 1.000000e+00 1.000000e+00 7 4 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 8 4 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 9 6 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 10 7 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 TETRAHEDRON_KEAST_RULE_TEST04 TETRAHEDRON_REFERENCE_TO_PHYSICAL transforms a rule on the unit (reference) tetrahedron to a rule on an arbitrary (physical) tetrahedron. The reference tetrahedron: 1 0.000000 0.000000 0.000000 2 1.000000 0.000000 0.000000 3 0.000000 1.000000 0.000000 4 0.000000 0.000000 1.000000 Rule 2 for reference tetrahedron with volume = 0.166667 X Y Z W 1 0.585410 0.138197 0.138197 0.250000 2 0.138197 0.138197 0.138197 0.250000 3 0.138197 0.138197 0.585410 0.250000 4 0.138197 0.585410 0.138197 0.250000 The physical tetrahedron: 1 1.000000 2.000000 3.000000 2 2.000000 2.000000 3.000000 3 1.000000 3.000000 3.000000 4 1.000000 2.000000 9.000000 Rule 2 for physical tetrahedron with volume = 1.000000 X Y Z W 1 0.585410 0.138197 0.138197 0.250000 2 0.138197 0.138197 0.138197 0.250000 3 0.138197 0.138197 0.585410 0.250000 4 0.138197 0.585410 0.138197 0.250000 TETRAHEDRON_KEAST_RULE_TEST05 Demonstrate the KEAST rules on a sequence of monomial integrands X^A Y^B Z^C on the unit tetrahedron. Rule Order Quad F(X,Y,Z) = X^0 * Y^0 * Z^0 1 1 1.000000 2 4 1.000000 3 5 1.000000 4 10 1.000000 5 11 1.000000 6 14 1.000000 7 15 1.000000 8 24 1.000000 9 31 1.000000 10 45 1.000000 F(X,Y,Z) = X^1 * Y^0 * Z^0 1 1 0.250000 2 4 0.250000 3 5 0.250000 4 10 0.250000 5 11 0.250000 6 14 0.250000 7 15 0.250000 8 24 0.250000 9 31 0.250000 10 45 0.250000 F(X,Y,Z) = X^0 * Y^1 * Z^0 1 1 0.250000 2 4 0.250000 3 5 0.250000 4 10 0.250000 5 11 0.250000 6 14 0.250000 7 15 0.250000 8 24 0.250000 9 31 0.250000 10 45 0.250000 F(X,Y,Z) = X^0 * Y^0 * Z^1 1 1 0.250000 2 4 0.250000 3 5 0.250000 4 10 0.250000 5 11 0.250000 6 14 0.250000 7 15 0.250000 8 24 0.250000 9 31 0.250000 10 45 0.250000 F(X,Y,Z) = X^2 * Y^0 * Z^0 1 1 0.062500 2 4 0.100000 3 5 0.100000 4 10 0.100000 5 11 0.100000 6 14 0.100000 7 15 0.100000 8 24 0.100000 9 31 0.100000 10 45 0.100000 F(X,Y,Z) = X^1 * Y^1 * Z^0 1 1 0.062500 2 4 0.050000 3 5 0.050000 4 10 0.050000 5 11 0.050000 6 14 0.050000 7 15 0.050000 8 24 0.050000 9 31 0.050000 10 45 0.050000 F(X,Y,Z) = X^0 * Y^2 * Z^0 1 1 0.062500 2 4 0.100000 3 5 0.100000 4 10 0.100000 5 11 0.100000 6 14 0.100000 7 15 0.100000 8 24 0.100000 9 31 0.100000 10 45 0.100000 F(X,Y,Z) = X^1 * Y^0 * Z^1 1 1 0.062500 2 4 0.050000 3 5 0.050000 4 10 0.050000 5 11 0.050000 6 14 0.050000 7 15 0.050000 8 24 0.050000 9 31 0.050000 10 45 0.050000 F(X,Y,Z) = X^0 * Y^1 * Z^1 1 1 0.062500 2 4 0.050000 3 5 0.050000 4 10 0.050000 5 11 0.050000 6 14 0.050000 7 15 0.050000 8 24 0.050000 9 31 0.050000 10 45 0.050000 F(X,Y,Z) = X^0 * Y^0 * Z^2 1 1 0.062500 2 4 0.100000 3 5 0.100000 4 10 0.100000 5 11 0.100000 6 14 0.100000 7 15 0.100000 8 24 0.100000 9 31 0.100000 10 45 0.100000 F(X,Y,Z) = X^3 * Y^0 * Z^0 1 1 0.015625 2 4 0.052135 3 5 0.050000 4 10 0.050000 5 11 0.050000 6 14 0.050000 7 15 0.050000 8 24 0.050000 9 31 0.050000 10 45 0.050000 F(X,Y,Z) = X^2 * Y^1 * Z^0 1 1 0.015625 2 4 0.015955 3 5 0.016667 4 10 0.016667 5 11 0.016667 6 14 0.016667 7 15 0.016667 8 24 0.016667 9 31 0.016667 10 45 0.016667 F(X,Y,Z) = X^1 * Y^2 * Z^0 1 1 0.015625 2 4 0.015955 3 5 0.016667 4 10 0.016667 5 11 0.016667 6 14 0.016667 7 15 0.016667 8 24 0.016667 9 31 0.016667 10 45 0.016667 F(X,Y,Z) = X^0 * Y^3 * Z^0 1 1 0.015625 2 4 0.052135 3 5 0.050000 4 10 0.050000 5 11 0.050000 6 14 0.050000 7 15 0.050000 8 24 0.050000 9 31 0.050000 10 45 0.050000 F(X,Y,Z) = X^2 * Y^0 * Z^1 1 1 0.015625 2 4 0.015955 3 5 0.016667 4 10 0.016667 5 11 0.016667 6 14 0.016667 7 15 0.016667 8 24 0.016667 9 31 0.016667 10 45 0.016667 F(X,Y,Z) = X^1 * Y^1 * Z^1 1 1 0.015625 2 4 0.009045 3 5 0.008333 4 10 0.008333 5 11 0.008333 6 14 0.008333 7 15 0.008333 8 24 0.008333 9 31 0.008333 10 45 0.008333 F(X,Y,Z) = X^0 * Y^2 * Z^1 1 1 0.015625 2 4 0.015955 3 5 0.016667 4 10 0.016667 5 11 0.016667 6 14 0.016667 7 15 0.016667 8 24 0.016667 9 31 0.016667 10 45 0.016667 F(X,Y,Z) = X^1 * Y^0 * Z^2 1 1 0.015625 2 4 0.015955 3 5 0.016667 4 10 0.016667 5 11 0.016667 6 14 0.016667 7 15 0.016667 8 24 0.016667 9 31 0.016667 10 45 0.016667 F(X,Y,Z) = X^0 * Y^1 * Z^2 1 1 0.015625 2 4 0.015955 3 5 0.016667 4 10 0.016667 5 11 0.016667 6 14 0.016667 7 15 0.016667 8 24 0.016667 9 31 0.016667 10 45 0.016667 F(X,Y,Z) = X^0 * Y^0 * Z^3 1 1 0.015625 2 4 0.052135 3 5 0.050000 4 10 0.050000 5 11 0.050000 6 14 0.050000 7 15 0.050000 8 24 0.050000 9 31 0.050000 10 45 0.050000 TETRAHEDRON_KEAST_RULE_TEST06 KEAST_RULE returns the points and weights of a Keast rule for the tetrahedron. In this test, we simply print a rule. Rule index = 10 Rule degree = 8 Rule order = 45 I W X Y Z 1 -0.235962 0.250000 0.250000 0.250000 2 0.024488 0.617587 0.127471 0.127471 3 0.024488 0.127471 0.127471 0.127471 4 0.024488 0.127471 0.127471 0.617587 5 0.024488 0.127471 0.617587 0.127471 6 0.003949 0.903764 0.032079 0.032079 7 0.003949 0.032079 0.032079 0.032079 8 0.003949 0.032079 0.032079 0.903764 9 0.003949 0.032079 0.903764 0.032079 10 0.026306 0.450223 0.049777 0.049777 11 0.026306 0.049777 0.450223 0.049777 12 0.026306 0.049777 0.049777 0.450223 13 0.026306 0.049777 0.450223 0.450223 14 0.026306 0.450223 0.049777 0.450223 15 0.026306 0.450223 0.450223 0.049777 16 0.082980 0.316270 0.183730 0.183730 17 0.082980 0.183730 0.316270 0.183730 18 0.082980 0.183730 0.183730 0.316270 19 0.082980 0.183730 0.316270 0.316270 20 0.082980 0.316270 0.183730 0.316270 21 0.082980 0.316270 0.316270 0.183730 22 0.025443 0.022918 0.231901 0.231901 23 0.025443 0.231901 0.022918 0.231901 24 0.025443 0.231901 0.231901 0.022918 25 0.025443 0.513280 0.231901 0.231901 26 0.025443 0.231901 0.513280 0.231901 27 0.025443 0.231901 0.231901 0.513280 28 0.025443 0.231901 0.022918 0.513280 29 0.025443 0.022918 0.513280 0.231901 30 0.025443 0.513280 0.231901 0.022918 31 0.025443 0.231901 0.513280 0.022918 32 0.025443 0.022918 0.231901 0.513280 33 0.025443 0.513280 0.022918 0.231901 34 0.013432 0.730313 0.037970 0.037970 35 0.013432 0.037970 0.730313 0.037970 36 0.013432 0.037970 0.037970 0.730313 37 0.013432 0.193746 0.037970 0.037970 38 0.013432 0.037970 0.193746 0.037970 39 0.013432 0.037970 0.037970 0.193746 40 0.013432 0.037970 0.730313 0.193746 41 0.013432 0.730313 0.193746 0.037970 42 0.013432 0.193746 0.037970 0.730313 43 0.013432 0.037970 0.193746 0.730313 44 0.013432 0.730313 0.037970 0.193746 45 0.013432 0.193746 0.730313 0.037970 tetrahedron_keast_rule_test(): Normal end of execution. 08-Jan-2022 10:31:09