07-Jan-2022 21:42:25 hermite_product_polynomial_test(): MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2 Test hermite_product_polynomial(). HERMITE_PRODUCT_POLYNOMIAL_TEST01: COMP_NEXT_GRLEX is given a composition, and computes the next composition in grlex order. Rank Sum Components 1 0: 0 0 2 1: 0 1 3 1: 1 0 4 2: 0 2 5 2: 1 1 6 2: 2 0 7 3: 0 3 8 3: 1 2 9 3: 2 1 10 3: 3 0 11 4: 0 4 12 4: 1 3 13 4: 2 2 14 4: 3 1 15 4: 4 0 16 5: 0 5 17 5: 1 4 18 5: 2 3 19 5: 3 2 20 5: 4 1 COMP_UNRANK_GRLEX is given a rank and returns the corresponding set of multinomial exponents. Rank Sum Components 17 5: 1 4 19 5: 3 2 3 1: 1 0 19 5: 3 2 13 4: 2 2 COMP_RANDOM_GRLEX randomly selects a composition between given lower and upper ranks. Rank Sum Components 6 2: 2 0 9 3: 2 1 13 4: 2 2 20 5: 4 1 20 5: 4 1 COMP_RANK_GRLEX returns the rank of a given composition. Rank Sum Components 15 4: 4 0 148 16: 11 5 HERMITE_PRODUCT_POLYNOMIAL_TEST015: HEP_COEFFICIENTS computes the coefficients and exponents of the Hermite polynomial He(n,x). He(1,x) = + 1 * x^(1). He(2,x) = - 1 * x^(0) + 1 * x^(2). He(3,x) = - 3 * x^(1) + 1 * x^(3). He(4,x) = + 3 * x^(0) - 6 * x^(2) + 1 * x^(4). He(5,x) = + 15 * x^(1) - 10 * x^(3) + 1 * x^(5). HERMITE_PRODUCT_POLYNOMIAL_TEST02: HEP_VALUES stores values of the Hermite polynomial He(o,x). HEP_VALUE evaluates a Hermite polynomial. Tabulated Computed O X He(O,X) He(O,X) Error 0 5.000000 1 1 0 1 5.000000 5 5 0 2 5.000000 24 24 0 3 5.000000 110 110 0 4 5.000000 478 478 0 5 5.000000 1950 1950 0 6 5.000000 7360 7360 0 7 5.000000 25100 25100 0 8 5.000000 73980 73980 0 9 5.000000 169100 169100 0 10 5.000000 179680 179680 0 11 5.000000 -792600 -792600 0 12 5.000000 -5.93948e+06 -5.93948e+06 0 5 0.000000 0 0 0 5 0.500000 6.28125 6.28125 0 5 1.000000 6 6 0 5 3.000000 18 18 0 5 10.000000 90150 90150 0 HERMITE_PRODUCT_POLYNOMIAL_TEST03: HePP_VALUE evaluates a Hermite product polynomial. POLYNOMIAL_VALUE evaluates a polynomial. Evaluate at X = ( -0.684774, 0.941186, 0.914334 ) Rank I1 I2 I3: He(I1,X1)*He(I2,X2)*He(I3,X3) P(X1,X2,X3) 1 0 0 0 1 1 2 0 0 1 0.914334 0.914334 3 0 1 0 0.941186 0.941186 4 1 0 0 -0.684774 -0.684774 5 0 0 2 -0.163994 -0.163994 6 0 1 1 0.860558 0.860558 7 0 2 0 -0.11417 -0.11417 8 1 0 1 -0.626112 -0.626112 9 1 1 0 -0.644499 -0.644499 10 2 0 0 -0.531085 -0.531085 11 0 0 3 -1.97861 -1.97861 12 0 1 2 -0.154348 -0.154348 13 0 2 1 -0.104389 -0.104389 14 0 3 0 -1.98983 -1.98983 15 1 0 2 0.112298 0.112298 16 1 1 1 -0.589288 -0.589288 17 1 2 0 0.0781804 0.0781804 18 2 0 1 -0.485589 -0.485589 19 2 1 0 -0.499849 -0.499849 20 3 0 0 1.73322 1.73322 HERMITE_PRODUCT_POLYNOMIAL_TEST04: HEPP_TO_POLYNOMIAL is given a Hermite product polynomial and determines its polynomial representation. Using spatial dimension M = 2: HePP #1 = He(0,X)*He(0,Y) = + 1 * x^(0,0). HePP #2 = He(0,X)*He(1,Y) = + 1 * x^(0,1). HePP #3 = He(1,X)*He(0,Y) = + 1 * x^(1,0). HePP #4 = He(0,X)*He(2,Y) = - 1 * x^(0,0) + 1 * x^(0,2). HePP #5 = He(1,X)*He(1,Y) = + 1 * x^(1,1). HePP #6 = He(2,X)*He(0,Y) = - 1 * x^(0,0) + 1 * x^(2,0). HePP #7 = He(0,X)*He(3,Y) = - 3 * x^(0,1) + 1 * x^(0,3). HePP #8 = He(1,X)*He(2,Y) = - 1 * x^(1,0) + 1 * x^(1,2). HePP #9 = He(2,X)*He(1,Y) = - 1 * x^(0,1) + 1 * x^(2,1). HePP #10 = He(3,X)*He(0,Y) = - 3 * x^(1,0) + 1 * x^(3,0). HePP #11 = He(0,X)*He(4,Y) = + 3 * x^(0,0) - 6 * x^(0,2) + 1 * x^(0,4). hermite_product_polynomial_test(): Normal end of execution. 07-Jan-2022 21:42:25