15 September 2021 8:27:07.616 AM legendre_product_polynomial_test: FORTRAN90 version Test the LEGENDRE_PRODUCT_POLYNOMIAL library. I4_CHOOSE_TEST I4_CHOOSE evaluates C(N,K). N K CNK 0 0 1 1 0 1 1 1 1 2 0 1 2 1 2 2 2 1 3 0 1 3 1 3 3 2 3 3 3 1 4 0 1 4 1 4 4 2 6 4 3 4 4 4 1 I4_UNIFORM_AB_TEST I4_UNIFORM_AB computes pseudorandom values in an interval [A,B]. The lower endpoint A = -100 The upper endpoint B = 200 The initial seed is 123456789 1 -35 2 187 3 149 4 69 5 25 6 -81 7 -23 8 -67 9 -87 10 90 11 -82 12 35 13 20 14 127 15 139 16 -100 17 170 18 5 19 -72 20 -96 I4VEC_PERMUTE_TEST I4VEC_PERMUTE reorders an I4VEC according to a given permutation. Using initial random number seed = 123456789 A, before rearrangement: 1: 2 2: 12 3: 10 4: 7 5: 5 6: 0 7: 3 8: 1 9: 0 10: 8 11: 0 12: 5 Permutation vector P: 1: 5 2: 10 3: 2 4: 4 5: 12 6: 8 7: 7 8: 6 9: 1 10: 9 11: 11 12: 3 A, after rearrangement: 1: 5 2: 8 3: 12 4: 7 5: 5 6: 1 7: 3 8: 0 9: 2 10: 0 11: 0 12: 10 I4VEC_PRINT_TEST I4VEC_PRINT prints an I4VEC The I4VEC: 1: 91 2: 92 3: 93 4: 94 I4VEC_SORT_HEAP_INDEX_A_TEST I4VEC_SORT_HEAP_INDEX_A creates an ascending sort index for an I4VEC. Unsorted array A: 1: 13 2: 58 3: 50 4: 34 5: 25 6: 4 7: 15 8: 6 9: 2 10: 38 11: 3 12: 27 13: 24 14: 46 15: 48 16: 0 17: 54 18: 21 19: 5 20: 0 Index vector INDX: 1: 16 2: 20 3: 9 4: 11 5: 6 6: 19 7: 8 8: 1 9: 7 10: 18 11: 13 12: 5 13: 12 14: 4 15: 10 16: 14 17: 15 18: 3 19: 17 20: 2 I, INDX(I), A(INDX(I)) 1 16 0 2 20 0 3 9 2 4 11 3 5 6 4 6 19 5 7 8 6 8 1 13 9 7 15 10 18 21 11 13 24 12 5 25 13 12 27 14 4 34 15 10 38 16 14 46 17 15 48 18 3 50 19 17 54 20 2 58 I4VEC_SUM_TEST I4VEC_SUM sums the entries of an I4VEC. The vector: 1: 2 2: 10 3: 9 4: 6 5: 4 The vector entries sum to 31 I4VEC_UNIFORM_AB_TEST I4VEC_UNIFORM_AB computes pseudorandom values in an interval [A,B]. The lower endpoint A = -100 The upper endpoint B = 200 The initial seed is 123456789 The random vector: 1: -35 2: 187 3: 149 4: 69 5: 25 6: -81 7: -23 8: -67 9: -87 10: 90 11: -82 12: 35 13: 20 14: 127 15: 139 16: -100 17: 170 18: 5 19: -72 20: -96 R8VEC_PERMUTE_TEST R8VEC_PERMUTE permutes a R8VEC in place. Original array X[] 1: 1.0000000 2: 2.0000000 3: 3.0000000 4: 4.0000000 5: 5.0000000 Permutation vector P[] 1: 2 2: 4 3: 5 4: 1 5: 3 Permuted array X[P[]]: 1: 2.0000000 2: 4.0000000 3: 5.0000000 4: 1.0000000 5: 3.0000000 R8VEC_PRINT_TEST R8VEC_PRINT prints an R8VEC. The R8VEC: 1: 123.45600 2: 0.50000000E-05 3: -1000000.0 4: 3.1415927 R8VEC_UNIFORM_AB_TEST R8VEC_UNIFORM_AB returns a random R8VEC with entries in a given range [ A, B ] For this problem: A = 10.0000 B = 20.0000 Input SEED = 123456789 Random R8VEC: 1: 12.184183 2: 19.563176 3: 18.295092 4: 15.616954 5: 14.153071 6: 10.661187 7: 12.575778 8: 11.099568 9: 10.438290 10: 16.339657 Input SEED = 1361431000 Random R8VEC: 1: 10.617272 2: 14.495390 3: 14.013063 4: 17.546735 5: 17.972870 6: 10.018384 7: 18.975041 8: 13.507523 9: 10.945448 10: 10.136169 Input SEED = 29242052 Random R8VEC: 1: 18.590969 2: 18.408475 3: 11.231039 4: 10.075124 5: 12.603030 6: 19.124837 7: 11.136640 8: 13.516287 9: 18.228873 10: 12.671323 PERM_UNIFORM_TEST PERM_UNIFORM randomly selects a permutation. 3 10 9 7 4 6 8 5 1 2 1 6 2 9 4 3 10 5 8 7 9 1 3 4 6 10 7 2 5 8 7 1 9 2 10 8 4 5 3 6 6 5 7 1 4 9 3 8 10 2 COMP_ENUM_TEST COMP_ENUM counts compositions; 1 1 1 1 1 1 1 1 1 1 1 2 3 4 5 6 7 8 9 10 1 3 6 10 15 21 28 36 45 55 1 4 10 20 35 56 84 120 165 220 1 5 15 35 70 126 210 330 495 715 1 6 21 56 126 252 462 792 1287 2002 1 7 28 84 210 462 924 1716 3003 5005 1 8 36 120 330 792 1716 3432 6435 11440 1 9 45 165 495 1287 3003 6435 12870 24310 1 10 55 220 715 2002 5005 11440 24310 48620 1 11 66 286 1001 3003 8008 19448 43758 92378 COMP_NEXT_GRLEX_TEST A COMP is a composition of an integer N into K parts. Each part is nonnegative. The order matters. COMP_NEXT_GRLEX determines the next COMP in graded lexicographic (grlex) order. Rank: NC COMP ----: -- ------------ 1: 0 = 0 + 0 + 0 ----: -- ------------ 2: 1 = 0 + 0 + 1 3: 1 = 0 + 1 + 0 4: 1 = 1 + 0 + 0 ----: -- ------------ 5: 2 = 0 + 0 + 2 6: 2 = 0 + 1 + 1 7: 2 = 0 + 2 + 0 8: 2 = 1 + 0 + 1 9: 2 = 1 + 1 + 0 10: 2 = 2 + 0 + 0 ----: -- ------------ 11: 3 = 0 + 0 + 3 12: 3 = 0 + 1 + 2 13: 3 = 0 + 2 + 1 14: 3 = 0 + 3 + 0 15: 3 = 1 + 0 + 2 16: 3 = 1 + 1 + 1 17: 3 = 1 + 2 + 0 18: 3 = 2 + 0 + 1 19: 3 = 2 + 1 + 0 20: 3 = 3 + 0 + 0 ----: -- ------------ 21: 4 = 0 + 0 + 4 22: 4 = 0 + 1 + 3 23: 4 = 0 + 2 + 2 24: 4 = 0 + 3 + 1 25: 4 = 0 + 4 + 0 26: 4 = 1 + 0 + 3 27: 4 = 1 + 1 + 2 28: 4 = 1 + 2 + 1 29: 4 = 1 + 3 + 0 30: 4 = 2 + 0 + 2 31: 4 = 2 + 1 + 1 32: 4 = 2 + 2 + 0 33: 4 = 3 + 0 + 1 34: 4 = 3 + 1 + 0 35: 4 = 4 + 0 + 0 ----: -- ------------ 36: 5 = 0 + 0 + 5 37: 5 = 0 + 1 + 4 38: 5 = 0 + 2 + 3 39: 5 = 0 + 3 + 2 40: 5 = 0 + 4 + 1 41: 5 = 0 + 5 + 0 42: 5 = 1 + 0 + 4 43: 5 = 1 + 1 + 3 44: 5 = 1 + 2 + 2 45: 5 = 1 + 3 + 1 46: 5 = 1 + 4 + 0 47: 5 = 2 + 0 + 3 48: 5 = 2 + 1 + 2 49: 5 = 2 + 2 + 1 50: 5 = 2 + 3 + 0 51: 5 = 3 + 0 + 2 52: 5 = 3 + 1 + 1 53: 5 = 3 + 2 + 0 54: 5 = 4 + 0 + 1 55: 5 = 4 + 1 + 0 56: 5 = 5 + 0 + 0 ----: -- ------------ 57: 6 = 0 + 0 + 6 58: 6 = 0 + 1 + 5 59: 6 = 0 + 2 + 4 60: 6 = 0 + 3 + 3 61: 6 = 0 + 4 + 2 62: 6 = 0 + 5 + 1 63: 6 = 0 + 6 + 0 64: 6 = 1 + 0 + 5 65: 6 = 1 + 1 + 4 66: 6 = 1 + 2 + 3 67: 6 = 1 + 3 + 2 68: 6 = 1 + 4 + 1 69: 6 = 1 + 5 + 0 70: 6 = 2 + 0 + 4 71: 6 = 2 + 1 + 3 COMP_RANDOM_GRLEX_TEST A COMP is a composition of an integer N into K parts. Each part is nonnegative. The order matters. COMP_RANDOM_GRLEX selects a random COMP in graded lexicographic (grlex) order between indices RANK1 and RANK2. 28: 4 = 1 + 2 + 1 59: 6 = 0 + 2 + 4 54: 5 = 4 + 0 + 1 43: 5 = 1 + 1 + 3 37: 5 = 0 + 1 + 4 COMP_RANK_GRLEX_TEST A COMP is a composition of an integer N into K parts. Each part is nonnegative. The order matters. COMP_RANK_GRLEX determines the rank of a COMP from its parts. Actual Inferred Test Rank Rank 1 28 28 2 59 59 3 54 54 4 43 43 5 37 37 COMP_UNRANK_GRLEX_TEST A COMP is a composition of an integer N into K parts. Each part is nonnegative. The order matters. COMP_UNRANK_GRLEX determines the parts of a COMP from its rank. Rank: -> NC COMP ----: -- ------------ 1: 0 = 0 + 0 + 0 ----: -- ------------ 2: 1 = 0 + 0 + 1 3: 1 = 0 + 1 + 0 4: 1 = 1 + 0 + 0 ----: -- ------------ 5: 2 = 0 + 0 + 2 6: 2 = 0 + 1 + 1 7: 2 = 0 + 2 + 0 8: 2 = 1 + 0 + 1 9: 2 = 1 + 1 + 0 10: 2 = 2 + 0 + 0 ----: -- ------------ 11: 3 = 0 + 0 + 3 12: 3 = 0 + 1 + 2 13: 3 = 0 + 2 + 1 14: 3 = 0 + 3 + 0 15: 3 = 1 + 0 + 2 16: 3 = 1 + 1 + 1 17: 3 = 1 + 2 + 0 18: 3 = 2 + 0 + 1 19: 3 = 2 + 1 + 0 20: 3 = 3 + 0 + 0 ----: -- ------------ 21: 4 = 0 + 0 + 4 22: 4 = 0 + 1 + 3 23: 4 = 0 + 2 + 2 24: 4 = 0 + 3 + 1 25: 4 = 0 + 4 + 0 26: 4 = 1 + 0 + 3 27: 4 = 1 + 1 + 2 28: 4 = 1 + 2 + 1 29: 4 = 1 + 3 + 0 30: 4 = 2 + 0 + 2 31: 4 = 2 + 1 + 1 32: 4 = 2 + 2 + 0 33: 4 = 3 + 0 + 1 34: 4 = 3 + 1 + 0 35: 4 = 4 + 0 + 0 ----: -- ------------ 36: 5 = 0 + 0 + 5 37: 5 = 0 + 1 + 4 38: 5 = 0 + 2 + 3 39: 5 = 0 + 3 + 2 40: 5 = 0 + 4 + 1 41: 5 = 0 + 5 + 0 42: 5 = 1 + 0 + 4 43: 5 = 1 + 1 + 3 44: 5 = 1 + 2 + 2 45: 5 = 1 + 3 + 1 46: 5 = 1 + 4 + 0 47: 5 = 2 + 0 + 3 48: 5 = 2 + 1 + 2 49: 5 = 2 + 2 + 1 50: 5 = 2 + 3 + 0 51: 5 = 3 + 0 + 2 52: 5 = 3 + 1 + 1 53: 5 = 3 + 2 + 0 54: 5 = 4 + 0 + 1 55: 5 = 4 + 1 + 0 56: 5 = 5 + 0 + 0 ----: -- ------------ 57: 6 = 0 + 0 + 6 58: 6 = 0 + 1 + 5 59: 6 = 0 + 2 + 4 60: 6 = 0 + 3 + 3 61: 6 = 0 + 4 + 2 62: 6 = 0 + 5 + 1 63: 6 = 0 + 6 + 0 64: 6 = 1 + 0 + 5 65: 6 = 1 + 1 + 4 66: 6 = 1 + 2 + 3 67: 6 = 1 + 3 + 2 68: 6 = 1 + 4 + 1 69: 6 = 1 + 5 + 0 70: 6 = 2 + 0 + 4 71: 6 = 2 + 1 + 3 MONO_NEXT_GRLEX_TEST MONO_NEXT_GRLEX returns the next monomial in graded lexicographic order. Let M = 4 0 3 3 2 0 3 4 1 0 3 5 0 0 4 0 4 0 4 1 3 0 4 2 2 1 0 1 0 1 1 0 0 2 0 0 0 0 0 0 3 0 0 1 2 0 0 2 1 0 2 0 1 0 2 1 0 0 3 0 0 1 0 0 2 1 0 1 1 1 0 2 0 1 3 3 0 1 4 0 2 1 4 1 1 1 4 2 0 1 5 0 1 1 5 1 0 3 1 0 0 4 0 0 0 0 0 0 5 0 0 1 4 0 0 2 3 0 0 3 2 3 3 0 0 4 0 0 2 4 0 1 1 4 0 2 0 4 1 0 1 4 1 1 0 1 3 0 1 1 3 1 0 1 4 0 0 2 0 0 3 2 0 1 2 2 0 2 1 3 1 2 2 3 1 3 1 3 1 4 0 3 2 0 3 3 2 1 2 3 2 2 1 3 1 3 2 3 1 4 1 3 1 5 0 3 2 0 4 3 2 1 3 3 2 2 2 0 3 1 0 0 4 0 0 1 0 0 3 1 0 1 2 1 0 2 1 1 0 3 0 MONO_PRINT_TEST MONO_PRINT can print out a monomial. Monomial [5]:x^( 5). Monomial [5]:x^(-5). Monomial [2,1,0,3]:x^( 2, 1, 0, 3). Monomial [17,-3,199]:x^(17,-3,**). MONO_RANK_GRLEX_TEST MONO_RANK_GRLEX returns the rank of a monomial in the sequence of all monomials in M dimensions. Print a monomial sequence with ranks assigned. Let M = 3 N = 4 1 0 0 0 2 0 0 1 3 0 1 0 4 1 0 0 5 0 0 2 6 0 1 1 7 0 2 0 8 1 0 1 9 1 1 0 10 2 0 0 11 0 0 3 12 0 1 2 13 0 2 1 14 0 3 0 15 1 0 2 16 1 1 1 17 1 2 0 18 2 0 1 19 2 1 0 20 3 0 0 21 0 0 4 22 0 1 3 23 0 2 2 24 0 3 1 25 0 4 0 26 1 0 3 27 1 1 2 28 1 2 1 29 1 3 0 30 2 0 2 31 2 1 1 32 2 2 0 33 3 0 1 34 3 1 0 35 4 0 0 Now, given a monomial, retrieve its rank in the sequence: 1 0 0 0 4 1 0 0 2 0 0 1 7 0 2 0 15 1 0 2 24 0 3 1 77 3 2 1 158 5 2 1 MONO_UNRANK_GRLEXT_TEST MONO_UNRANK_GRLEX is given a rank, and returns the corresponding monomial in the sequence of all monomials in M dimensions in grlex order. For reference, print a monomial sequence with ranks. Let M = 3 N = 4 1 0 0 0 2 0 0 1 3 0 1 0 4 1 0 0 5 0 0 2 6 0 1 1 7 0 2 0 8 1 0 1 9 1 1 0 10 2 0 0 11 0 0 3 12 0 1 2 13 0 2 1 14 0 3 0 15 1 0 2 16 1 1 1 17 1 2 0 18 2 0 1 19 2 1 0 20 3 0 0 21 0 0 4 22 0 1 3 23 0 2 2 24 0 3 1 25 0 4 0 26 1 0 3 27 1 1 2 28 1 2 1 29 1 3 0 30 2 0 2 31 2 1 1 32 2 2 0 33 3 0 1 34 3 1 0 35 4 0 0 Now choose random ranks between 1 and 35 8 1 0 1 34 3 1 0 30 2 0 2 20 3 0 0 15 1 0 2 MONO_UPTO_ENUM_TEST MONO_UPTO_ENUM can enumerate the number of monomials in M variables, of total degree 0 up to N. N: 0 1 2 3 4 5 6 7 8 M +------------------------------------------------------ 1 | 1 2 3 4 5 6 7 8 9 2 | 1 3 6 10 15 21 28 36 45 3 | 1 4 10 20 35 56 84 120 165 4 | 1 5 15 35 70 126 210 330 495 5 | 1 6 21 56 126 252 462 792 1287 6 | 1 7 28 84 210 462 924 1716 3003 7 | 1 8 36 120 330 792 1716 3432 6435 8 | 1 9 45 165 495 1287 3003 6435 12870 MONO_UPTO_NEXT_GRLEX_TEST MONO_UPTO_NEXT_GRLEX can list the monomials in M variables, of total degree up to N, one at a time, in graded lexicographic order. We start the process with (0,0,...,0,0). The process ends with (N,0,...,0,0) Let M = 3 N = 4 1 0 0 0 2 0 0 1 3 0 1 0 4 1 0 0 5 0 0 2 6 0 1 1 7 0 2 0 8 1 0 1 9 1 1 0 10 2 0 0 11 0 0 3 12 0 1 2 13 0 2 1 14 0 3 0 15 1 0 2 16 1 1 1 17 1 2 0 18 2 0 1 19 2 1 0 20 3 0 0 21 0 0 4 22 0 1 3 23 0 2 2 24 0 3 1 25 0 4 0 26 1 0 3 27 1 1 2 28 1 2 1 29 1 3 0 30 2 0 2 31 2 1 1 32 2 2 0 33 3 0 1 34 3 1 0 35 4 0 0 MONO_UPTO_RANDOM_TEST MONO_UPTO_RANDOM selects at random a monomial in M dimensions of total degree no greater than N. Let M = 3 N = 4 8 1 0 1 34 3 1 0 30 2 0 2 20 3 0 0 15 1 0 2 MONO_VALUE_TEST MONO_VALUE evaluates a monomial. Let M = 3 N = 6 M(X) = x^( 2, 1, 0). M( 1., 2., 3.) = 2.00000 M( -2., 4., 1.) = 16.0000 M(X) = x^( 4, 2, 0). M( 1., 2., 3.) = 4.00000 M( -2., 4., 1.) = 256.000 M(X) = x^( 2, 0, 4). M( 1., 2., 3.) = 81.0000 M( -2., 4., 1.) = 4.00000 M(X) = x^( 2, 1, 2). M( 1., 2., 3.) = 18.0000 M( -2., 4., 1.) = 16.0000 M(X) = x^( 4, 0, 0). M( 1., 2., 3.) = 1.00000 M( -2., 4., 1.) = 16.0000 POLYNOMIAL_COMPRESS_TEST POLYNOMIAL_COMPRESS compresses a polynomial. Uncompressed P(X) = + 7.00000 * x^( 0, 0, 0) - 5.00000 * x^( 0, 0, 1) + 5.00000 * x^( 0, 0, 1) + 9.00000 * x^( 1, 0, 0) + 11.0000 * x^( 0, 0, 2) + 3.00000 * x^( 0, 0, 2) + 6.00000 * x^( 0, 0, 2) + 0.00000 * x^( 0, 1, 2) - 13.0000 * x^( 3, 0, 1) + 0.100000E-19 * x^( 4, 0, 0). Compressed P(X) = + 7.00000 * x^( 0, 0, 0) + 0.00000 * x^( 0, 0, 1) + 9.00000 * x^( 1, 0, 0) + 20.0000 * x^( 0, 0, 2) - 13.0000 * x^( 3, 0, 1). POLYNOMIAL_PRINT_TEST POLYNOMIAL_PRINT prints a polynomial. P1(X) = + 7.00000 * x^( 0, 0, 0) - 5.00000 * x^( 0, 0, 1) + 9.00000 * x^( 1, 0, 0) + 11.0000 * x^( 0, 0, 2) + 0.00000 * x^( 0, 1, 2) - 13.0000 * x^( 3, 0, 1). POLYNOMIAL_SORT_TEST POLYNOMIAL_SORT sorts a polynomial by exponent index.. Unsorted polynomial: + 0.00000 * x^( 0, 1, 2) + 9.00000 * x^( 1, 0, 0) - 5.00000 * x^( 0, 0, 1) - 13.0000 * x^( 3, 0, 1) + 7.00000 * x^( 0, 0, 0) + 11.0000 * x^( 0, 0, 2). Sorted polynomial: + 7.00000 * x^( 0, 0, 0) - 5.00000 * x^( 0, 0, 1) + 9.00000 * x^( 1, 0, 0) + 11.0000 * x^( 0, 0, 2) + 0.00000 * x^( 0, 1, 2) - 13.0000 * x^( 3, 0, 1). POLYNOMIAL_VALUE_TEST POLYNOMIAL_VALUE evaluates a polynomial. P(X) = + 7.00000 * x^( 0, 0, 0) - 5.00000 * x^( 0, 0, 1) + 9.00000 * x^( 1, 0, 0) + 11.0000 * x^( 0, 0, 2) + 0.00000 * x^( 0, 1, 2) - 13.0000 * x^( 3, 0, 1). P( 1.0000, 2.0000, 3.0000) = 61.0000 P( -2.0000, 4.0000, 1.0000) = 99.0000 LP_COEFFICIENTS_TEST LP_COEFFICIENTS: coefficients of Legendre polynomial P(n,x). P( 0,x) = + 1.00000 * x^( 0). P( 1,x) = + 1.00000 * x^( 1). P( 2,x) = - 0.500000 * x^( 0) + 1.50000 * x^( 2). P( 3,x) = - 1.50000 * x^( 1) + 2.50000 * x^( 3). P( 4,x) = + 0.375000 * x^( 0) - 3.75000 * x^( 2) + 4.37500 * x^( 4). P( 5,x) = + 1.87500 * x^( 1) - 8.75000 * x^( 3) + 7.87500 * x^( 5). P( 6,x) = - 0.312500 * x^( 0) + 6.56250 * x^( 2) - 19.6875 * x^( 4) + 14.4375 * x^( 6). P( 7,x) = - 2.18750 * x^( 1) + 19.6875 * x^( 3) - 43.3125 * x^( 5) + 26.8125 * x^( 7). P( 8,x) = + 0.273438 * x^( 0) - 9.84375 * x^( 2) + 54.1406 * x^( 4) - 93.8438 * x^( 6) + 50.2734 * x^( 8). P( 9,x) = + 2.46094 * x^( 1) - 36.0938 * x^( 3) + 140.766 * x^( 5) - 201.094 * x^( 7) + 94.9609 * x^( 9). P(10,x) = - 0.246094 * x^( 0) + 13.5352 * x^( 2) - 117.305 * x^( 4) + 351.914 * x^( 6) - 427.324 * x^( 8) + 180.426 * x^(10). LP_VALUE_TEST: LP_VALUE evaluates a Legendre polynomial. Tabulated Computed O X L(O,X) L(O,X) Error 0 0.25000000 1.000000000000000 1.000000000000000 0.0 1 0.25000000 0.2500000000000000 0.2500000000000000 0.0 2 0.25000000 -0.4062500000000000 -0.4062500000000000 0.0 3 0.25000000 -0.3359375000000000 -0.3359375000000000 0.0 4 0.25000000 0.1577148437500000 0.1577148437500000 0.0 5 0.25000000 0.3397216796875000 0.3397216796875000 0.0 6 0.25000000 0.2427673339843750E-01 0.2427673339843750E-01 0.0 7 0.25000000 -0.2799186706542969 -0.2799186706542969 0.0 8 0.25000000 -0.1524540185928345 -0.1524540185928345 -.28E-16 9 0.25000000 0.1768244206905365 0.1768244206905365 0.0 10 0.25000000 0.2212002165615559 0.2212002165615559 0.28E-16 3 0.00000000 0.000000000000000 -0.000000000000000 0.0 3 0.10000000 -0.1475000000000000 -0.1475000000000000 0.0 3 0.20000000 -0.2800000000000000 -0.2800000000000000 0.0 3 0.30000000 -0.3825000000000000 -0.3825000000000000 0.0 3 0.40000000 -0.4400000000000000 -0.4399999999999999 -.56E-16 3 0.50000000 -0.4375000000000000 -0.4375000000000000 0.0 3 0.60000000 -0.3600000000000000 -0.3600000000000000 0.56E-16 3 0.70000000 -0.1925000000000000 -0.1925000000000001 0.11E-15 3 0.80000000 0.8000000000000000E-01 0.8000000000000022E-01 -.22E-15 3 0.90000000 0.4725000000000000 0.4725000000000001 -.11E-15 3 1.00000000 1.000000000000000 1.000000000000000 0.0 LP_VALUES_TEST: LP_VALUES stores values of the Legendre polynomial P(o,x). Tabulated O X L(O,X) 0 0.25000000 1.000000000000000 1 0.25000000 0.2500000000000000 2 0.25000000 -0.4062500000000000 3 0.25000000 -0.3359375000000000 4 0.25000000 0.1577148437500000 5 0.25000000 0.3397216796875000 6 0.25000000 0.2427673339843750E-01 7 0.25000000 -0.2799186706542969 8 0.25000000 -0.1524540185928345 9 0.25000000 0.1768244206905365 10 0.25000000 0.2212002165615559 3 0.00000000 0.000000000000000 3 0.10000000 -0.1475000000000000 3 0.20000000 -0.2800000000000000 3 0.30000000 -0.3825000000000000 3 0.40000000 -0.4400000000000000 3 0.50000000 -0.4375000000000000 3 0.60000000 -0.3600000000000000 3 0.70000000 -0.1925000000000000 3 0.80000000 0.8000000000000000E-01 3 0.90000000 0.4725000000000000 3 1.00000000 1.000000000000000 LPP_TO_POLYNOMIAL_TEST: LPP_TO_POLYNOMIAL is given a Legendre product polynomial and determines its polynomial representation. Using spatial dimension M = 2 LPP # 1 = L( 0,X)*L( 0,Y) = + 1.00000 * x^( 0, 0). LPP # 2 = L( 0,X)*L( 1,Y) = + 1.00000 * x^( 0, 1). LPP # 3 = L( 1,X)*L( 0,Y) = + 1.00000 * x^( 1, 0). LPP # 4 = L( 0,X)*L( 2,Y) = - 0.500000 * x^( 0, 0) + 1.50000 * x^( 0, 2). LPP # 5 = L( 1,X)*L( 1,Y) = + 1.00000 * x^( 1, 1). LPP # 6 = L( 2,X)*L( 0,Y) = - 0.500000 * x^( 0, 0) + 1.50000 * x^( 2, 0). LPP # 7 = L( 0,X)*L( 3,Y) = - 1.50000 * x^( 0, 1) + 2.50000 * x^( 0, 3). LPP # 8 = L( 1,X)*L( 2,Y) = - 0.500000 * x^( 1, 0) + 1.50000 * x^( 1, 2). LPP # 9 = L( 2,X)*L( 1,Y) = - 0.500000 * x^( 0, 1) + 1.50000 * x^( 2, 1). LPP #10 = L( 3,X)*L( 0,Y) = - 1.50000 * x^( 1, 0) + 2.50000 * x^( 3, 0). LPP #11 = L( 0,X)*L( 4,Y) = + 0.375000 * x^( 0, 0) - 3.75000 * x^( 0, 2) + 4.37500 * x^( 0, 4). LPP_VALUE_TEST: LPP_VALUE evaluates a Legendre product polynomial. Evaluate at X = -0.563163 0.912635 0.659018 Rank I1 I2 I3: L(I1,X1)*L(I2,X2)*L(I3,X3) P(X1,X2,X3) 1 0 0 0 1.00000 1.00000 2 0 0 1 0.659018 0.659018 3 0 1 0 0.912635 0.912635 4 1 0 0 -0.563163 -0.563163 5 0 0 2 0.151458 0.151458 6 0 1 1 0.601443 0.601443 7 0 2 0 0.749354 0.749354 8 1 0 1 -0.371135 -0.371135 9 1 1 0 -0.513963 -0.513963 10 2 0 0 -0.242705E-01 -0.242705E-01 11 0 0 3 -0.272990 -0.272990 12 0 1 2 0.138226 0.138226 13 0 2 1 0.493838 0.493838 14 0 3 0 0.531388 0.531388 15 1 0 2 -0.852956E-01 -0.852956E-01 16 1 1 1 -0.338711 -0.338711 17 1 2 0 -0.422009 -0.422009 18 2 0 1 -0.159947E-01 -0.159947E-01 19 2 1 0 -0.221501E-01 -0.221501E-01 20 3 0 0 0.398223 0.398223 legendre_product_polynomial_test: Normal end of execution. 15 September 2021 8:27:07.617 AM