15 September 2021 8:27:05.951 AM LAGRANGE_ND_TEST FORTRAN90 version. Test the LAGRANGE_ND library. TEST01 MONO_BETWEEN_ENUM can enumerate the number of monomials in D variables, of total degree between N1 and N2. Using spatial dimension D = 3 N2: 0 1 2 3 4 5 6 7 8 N1 +------------------------------------------------------ 0 | 1 4 10 20 35 56 84 120 165 1 | 0 3 9 19 34 55 83 119 164 2 | 0 0 6 16 31 52 80 116 161 3 | 0 0 0 10 25 46 74 110 155 4 | 0 0 0 0 15 36 64 100 145 5 | 0 0 0 0 0 21 49 85 130 6 | 0 0 0 0 0 0 28 64 109 7 | 0 0 0 0 0 0 0 36 81 8 | 0 0 0 0 0 0 0 0 45 TEST02 MONO_TOTAL_ENUM can enumerate the number of monomials in D variables, of total degree N. N: 0 1 2 3 4 5 6 7 8 D +------------------------------------------------------ 1 | 1 1 1 1 1 1 1 1 1 2 | 1 2 3 4 5 6 7 8 9 3 | 1 3 6 10 15 21 28 36 45 4 | 1 4 10 20 35 56 84 120 165 5 | 1 5 15 35 70 126 210 330 495 6 | 1 6 21 56 126 252 462 792 1287 7 | 1 7 28 84 210 462 924 1716 3003 8 | 1 8 36 120 330 792 1716 3432 6435 TEST03 MONO_UPTO_ENUM can enumerate the number of monomials in D variables, of total degree 0 up to N. N: 0 1 2 3 4 5 6 7 8 D +------------------------------------------------------ 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 TEST04 MONO_BETWEEN_NEXT_GRLEX can list the monomials in D variables, of total degree N between N1 and N2, one at a time. We start the process with (0,0,...,0,N1). The process ends with (N2,0,...,0,0) Let D = 3 N1 = 2 N2 = 3 1: 0 0 2 2: 0 1 1 3: 0 2 0 4: 1 0 1 5: 1 1 0 6: 2 0 0 7: 0 0 3 8: 0 1 2 9: 0 2 1 10: 0 3 0 11: 1 0 2 12: 1 1 1 13: 1 2 0 14: 2 0 1 15: 2 1 0 16: 3 0 0 TEST05 LAGRANGE_COMPLETE determines the Lagrange interpolating polynomials L(x) for ND points in D dimensions, assuming that the number of points exactly coincides with R = Pi(D,N), the number of monomials of degree N or less As a special demonstration, this code runs in 1D Spatial dimension D = 1 Maximum degree N = 4 Number of monomials R = 5 Number of data points ND = 5 Data points XD: Row 1 Col 1: 0.00000 2: 1.00000 3: 2.00000 4: 3.00000 5: 4.00000 Lagrange polynomials for XD data points: P( 1)(x) = + 1.00000 * x^( 0) - 2.08333 * x^( 1) + 1.45833 * x^( 2) - 0.416667 * x^( 3) + 0.416667E-01 * x^( 4). P( 2)(x) = + 4.00000 * x^( 1) - 4.33333 * x^( 2) + 1.50000 * x^( 3) - 0.166667 * x^( 4). P( 3)(x) = - 3.00000 * x^( 1) + 4.75000 * x^( 2) - 2.00000 * x^( 3) + 0.250000 * x^( 4). P( 4)(x) = + 1.33333 * x^( 1) - 2.33333 * x^( 2) + 1.16667 * x^( 3) - 0.166667 * x^( 4). P( 5)(x) = - 0.250000 * x^( 1) + 0.458333 * x^( 2) - 0.250000 * x^( 3) + 0.416667E-01 * x^( 4). Frobenius norm of Lagrange matrix error = 0.825619E-14 TEST06 LAGRANGE_COMPLETE determines the Lagrange interpolating polynomials L(x) for ND points in D dimensions, assuming that the number of points exactly coincides with R = Pi(D,N), the number of monomials of degree N or less The data points are the grid nodes of a triangle. Spatial dimension D = 2 Maximum degree N = 2 Number of monomials R = 6 Number of data points ND = 6 Data points XD: Row 1 2 Col 1: 0.00000 0.00000 2: 1.00000 0.00000 3: 2.00000 0.00000 4: 0.00000 1.00000 5: 1.00000 1.00000 6: 0.00000 2.00000 Lagrange polynomials for XD data points: P( 1)(x) = + 1.00000 * x^( 0, 0) - 1.50000 * x^( 0, 1) - 1.50000 * x^( 1, 0) + 0.500000 * x^( 0, 2) + 1.00000 * x^( 1, 1) + 0.500000 * x^( 2, 0). P( 2)(x) = + 2.00000 * x^( 1, 0) - 1.00000 * x^( 1, 1) - 1.00000 * x^( 2, 0). P( 3)(x) = - 0.500000 * x^( 1, 0) + 0.500000 * x^( 2, 0). P( 4)(x) = + 2.00000 * x^( 0, 1) - 1.00000 * x^( 0, 2) - 1.00000 * x^( 1, 1). P( 5)(x) = + 1.00000 * x^( 1, 1). P( 6)(x) = - 0.500000 * x^( 0, 1) + 0.500000 * x^( 0, 2). Frobenius norm of Lagrange matrix error = 0.00000 TEST07 LAGRANGE_COMPLETE determines the Lagrange interpolating polynomials L(x) for ND points in D dimensions, assuming that the number of points exactly coincides with R = Pi(D,N), the number of monomials of degree N or less The data points are the grid nodes of a tetrahedron. Spatial dimension D = 3 Maximum degree N = 2 Number of monomials R = 10 Number of data points ND = 10 Data points XD: Row 1 2 3 Col 1: 0.00000 0.00000 0.00000 2: 1.00000 0.00000 0.00000 3: 2.00000 0.00000 0.00000 4: 0.00000 1.00000 0.00000 5: 1.00000 1.00000 0.00000 6: 0.00000 2.00000 0.00000 7: 0.00000 0.00000 1.00000 8: 1.00000 0.00000 1.00000 9: 0.00000 1.00000 1.00000 10: 0.00000 0.00000 2.00000 Lagrange polynomials for XD data points: P( 1)(x) = + 1.00000 * x^( 0, 0, 0) - 1.50000 * x^( 0, 0, 1) - 1.50000 * x^( 0, 1, 0) - 1.50000 * x^( 1, 0, 0) + 0.500000 * x^( 0, 0, 2) + 1.00000 * x^( 0, 1, 1) + 0.500000 * x^( 0, 2, 0) + 1.00000 * x^( 1, 0, 1) + 1.00000 * x^( 1, 1, 0) + 0.500000 * x^( 2, 0, 0). P( 2)(x) = + 2.00000 * x^( 1, 0, 0) - 1.00000 * x^( 1, 0, 1) - 1.00000 * x^( 1, 1, 0) - 1.00000 * x^( 2, 0, 0). P( 3)(x) = - 0.500000 * x^( 1, 0, 0) + 0.500000 * x^( 2, 0, 0). P( 4)(x) = + 2.00000 * x^( 0, 1, 0) - 1.00000 * x^( 0, 1, 1) - 1.00000 * x^( 0, 2, 0) - 1.00000 * x^( 1, 1, 0). P( 5)(x) = + 1.00000 * x^( 1, 1, 0). P( 6)(x) = - 0.500000 * x^( 0, 1, 0) + 0.500000 * x^( 0, 2, 0). P( 7)(x) = + 2.00000 * x^( 0, 0, 1) - 1.00000 * x^( 0, 0, 2) - 1.00000 * x^( 0, 1, 1) - 1.00000 * x^( 1, 0, 1). P( 8)(x) = + 1.00000 * x^( 1, 0, 1). P( 9)(x) = + 1.00000 * x^( 0, 1, 1). P(10)(x) = - 0.500000 * x^( 0, 0, 1) + 0.500000 * x^( 0, 0, 2). Frobenius norm of Lagrange matrix error = 0.00000 TEST08 LAGRANGE_PARTIAL determines the Lagrange interpolating polynomials L(x) for ND points in D dimensions, assuming that the number of points is less than or equal to R = Pi(D,N), the number of monomials of degree N or less For this example, the data points are the same as those used by the level 1 Clenshaw Curtis sparse grid in 2D. Spatial dimension D = 2 Maximum degree N = 2 Number of monomials R = 6 Number of data points ND = 5 Data points XD: Row 1 2 Col 1: 0.00000 0.00000 2: -1.00000 0.00000 3: 1.00000 0.00000 4: 0.00000 -1.00000 5: 0.00000 1.00000 Lagrange polynomials for XD data points: P( 1)(x) = + 1.00000 * x^( 0, 0) - 1.00000 * x^( 0, 2) - 1.00000 * x^( 2, 0). P( 2)(x) = - 0.500000 * x^( 1, 0) + 0.500000 * x^( 2, 0). P( 3)(x) = + 0.500000 * x^( 1, 0) + 0.500000 * x^( 2, 0). P( 4)(x) = - 0.500000 * x^( 0, 1) + 0.500000 * x^( 0, 2). P( 5)(x) = + 0.500000 * x^( 0, 1) + 0.500000 * x^( 0, 2). Frobenius norm of Lagrange matrix error = 0.00000 TEST09 LAGRANGE_PARTIAL determines the Lagrange interpolating polynomials L(x) for ND points in D dimensions, assuming that the number of points is less than or equal to R = Pi(D,N), the number of monomials of degree N or less For this example, the data points are the same as those used by the level 2 Clenshaw Curtis sparse grid in 3D. Spatial dimension D = 3 Maximum degree N = 4 Number of monomials R = 35 Number of data points ND = 25 Data points XD: Row 1 2 3 Col 1: 0.00000 0.00000 0.00000 2: -1.00000 0.00000 0.00000 3: 1.00000 0.00000 0.00000 4: 0.00000 -1.00000 0.00000 5: 0.00000 1.00000 0.00000 6: 0.00000 0.00000 -1.00000 7: 0.00000 0.00000 1.00000 8: -0.707107 0.00000 0.00000 9: 0.707107 0.00000 0.00000 10: -1.00000 -1.00000 0.00000 11: 1.00000 -1.00000 0.00000 12: -1.00000 1.00000 0.00000 13: 1.00000 1.00000 0.00000 14: 0.00000 -0.707107 0.00000 15: 0.00000 0.707107 0.00000 16: -1.00000 0.00000 -1.00000 17: 1.00000 0.00000 -1.00000 18: -1.00000 0.00000 1.00000 19: 1.00000 0.00000 1.00000 20: 0.00000 -1.00000 -1.00000 21: 0.00000 1.00000 -1.00000 22: 0.00000 -1.00000 1.00000 23: 0.00000 1.00000 1.00000 24: 0.00000 0.00000 -0.707107 25: 0.00000 0.00000 0.707107 Lagrange polynomials for XD data points: P( 1)(x) = + 1.00000 * x^( 0, 0, 0) - 3.00000 * x^( 0, 0, 2) - 3.00000 * x^( 0, 2, 0) - 3.00000 * x^( 2, 0, 0) + 2.00000 * x^( 0, 0, 4) + 1.00000 * x^( 0, 2, 2) + 2.00000 * x^( 0, 4, 0) + 1.00000 * x^( 2, 0, 2) + 1.00000 * x^( 2, 2, 0) + 2.00000 * x^( 4, 0, 0). P( 2)(x) = + 0.500000 * x^( 1, 0, 0) - 0.500000 * x^( 2, 0, 0) + 0.500000 * x^( 1, 0, 2) + 0.500000 * x^( 1, 2, 0) - 1.00000 * x^( 3, 0, 0) - 0.500000 * x^( 2, 0, 2) - 0.500000 * x^( 2, 2, 0) + 1.00000 * x^( 4, 0, 0). P( 3)(x) = - 0.500000 * x^( 1, 0, 0) - 0.500000 * x^( 2, 0, 0) - 0.500000 * x^( 1, 0, 2) - 0.500000 * x^( 1, 2, 0) + 1.00000 * x^( 3, 0, 0) - 0.500000 * x^( 2, 0, 2) - 0.500000 * x^( 2, 2, 0) + 1.00000 * x^( 4, 0, 0). P( 4)(x) = + 0.500000 * x^( 0, 1, 0) - 0.500000 * x^( 0, 2, 0) + 0.500000 * x^( 0, 1, 2) - 1.00000 * x^( 0, 3, 0) + 0.500000 * x^( 2, 1, 0) - 0.500000 * x^( 0, 2, 2) + 1.00000 * x^( 0, 4, 0) - 0.500000 * x^( 2, 2, 0). P( 5)(x) = - 0.500000 * x^( 0, 1, 0) - 0.500000 * x^( 0, 2, 0) - 0.500000 * x^( 0, 1, 2) + 1.00000 * x^( 0, 3, 0) - 0.500000 * x^( 2, 1, 0) - 0.500000 * x^( 0, 2, 2) + 1.00000 * x^( 0, 4, 0) - 0.500000 * x^( 2, 2, 0). P( 6)(x) = + 0.500000 * x^( 0, 0, 1) - 0.500000 * x^( 0, 0, 2) - 1.00000 * x^( 0, 0, 3) + 0.500000 * x^( 0, 2, 1) + 0.500000 * x^( 2, 0, 1) + 1.00000 * x^( 0, 0, 4) - 0.500000 * x^( 0, 2, 2) - 0.500000 * x^( 2, 0, 2). P( 7)(x) = - 0.500000 * x^( 0, 0, 1) - 0.500000 * x^( 0, 0, 2) + 1.00000 * x^( 0, 0, 3) - 0.500000 * x^( 0, 2, 1) - 0.500000 * x^( 2, 0, 1) + 1.00000 * x^( 0, 0, 4) - 0.500000 * x^( 0, 2, 2) - 0.500000 * x^( 2, 0, 2). P( 8)(x) = - 1.41421 * x^( 1, 0, 0) + 2.00000 * x^( 2, 0, 0) + 1.41421 * x^( 3, 0, 0) - 2.00000 * x^( 4, 0, 0). P( 9)(x) = + 1.41421 * x^( 1, 0, 0) + 2.00000 * x^( 2, 0, 0) - 1.41421 * x^( 3, 0, 0) - 2.00000 * x^( 4, 0, 0). P(10)(x) = + 0.250000 * x^( 1, 1, 0) - 0.250000 * x^( 1, 2, 0) - 0.250000 * x^( 2, 1, 0) + 0.250000 * x^( 2, 2, 0). P(11)(x) = - 0.250000 * x^( 1, 1, 0) + 0.250000 * x^( 1, 2, 0) - 0.250000 * x^( 2, 1, 0) + 0.250000 * x^( 2, 2, 0). P(12)(x) = - 0.250000 * x^( 1, 1, 0) - 0.250000 * x^( 1, 2, 0) + 0.250000 * x^( 2, 1, 0) + 0.250000 * x^( 2, 2, 0). P(13)(x) = + 0.250000 * x^( 1, 1, 0) + 0.250000 * x^( 1, 2, 0) + 0.250000 * x^( 2, 1, 0) + 0.250000 * x^( 2, 2, 0). P(14)(x) = - 1.41421 * x^( 0, 1, 0) + 2.00000 * x^( 0, 2, 0) + 1.41421 * x^( 0, 3, 0) - 2.00000 * x^( 0, 4, 0). P(15)(x) = + 1.41421 * x^( 0, 1, 0) + 2.00000 * x^( 0, 2, 0) - 1.41421 * x^( 0, 3, 0) - 2.00000 * x^( 0, 4, 0). P(16)(x) = + 0.250000 * x^( 1, 0, 1) - 0.250000 * x^( 1, 0, 2) - 0.250000 * x^( 2, 0, 1) + 0.250000 * x^( 2, 0, 2). P(17)(x) = - 0.250000 * x^( 1, 0, 1) + 0.250000 * x^( 1, 0, 2) - 0.250000 * x^( 2, 0, 1) + 0.250000 * x^( 2, 0, 2). P(18)(x) = - 0.250000 * x^( 1, 0, 1) - 0.250000 * x^( 1, 0, 2) + 0.250000 * x^( 2, 0, 1) + 0.250000 * x^( 2, 0, 2). P(19)(x) = + 0.250000 * x^( 1, 0, 1) + 0.250000 * x^( 1, 0, 2) + 0.250000 * x^( 2, 0, 1) + 0.250000 * x^( 2, 0, 2). P(20)(x) = + 0.250000 * x^( 0, 1, 1) - 0.250000 * x^( 0, 1, 2) - 0.250000 * x^( 0, 2, 1) + 0.250000 * x^( 0, 2, 2). P(21)(x) = - 0.250000 * x^( 0, 1, 1) + 0.250000 * x^( 0, 1, 2) - 0.250000 * x^( 0, 2, 1) + 0.250000 * x^( 0, 2, 2). P(22)(x) = - 0.250000 * x^( 0, 1, 1) - 0.250000 * x^( 0, 1, 2) + 0.250000 * x^( 0, 2, 1) + 0.250000 * x^( 0, 2, 2). P(23)(x) = + 0.250000 * x^( 0, 1, 1) + 0.250000 * x^( 0, 1, 2) + 0.250000 * x^( 0, 2, 1) + 0.250000 * x^( 0, 2, 2). P(24)(x) = - 1.41421 * x^( 0, 0, 1) + 2.00000 * x^( 0, 0, 2) + 1.41421 * x^( 0, 0, 3) - 2.00000 * x^( 0, 0, 4). P(25)(x) = + 1.41421 * x^( 0, 0, 1) + 2.00000 * x^( 0, 0, 2) - 1.41421 * x^( 0, 0, 3) - 2.00000 * x^( 0, 0, 4). Frobenius norm of Lagrange matrix error = 0.522218E-15 TEST10 LAGRANGE_PARTIAL2 determines the Lagrange interpolating polynomials L(x)\n for ND points in D dimensions, assuming that\n the number of points is less than or equal to\n R = Pi(D,N), the number of monomials of degree N or less\n For this example, the data points are the same as those used by the level 2 Clenshaw Curtis sparse grid in 2D. Spatial dimension D = 2 Maximum degree N = 4 Number of monomials R = 15 Number of data points ND = 13 Data points XD: Row 1 2 Col 1: 0.00000 0.00000 2: -1.00000 0.00000 3: 1.00000 0.00000 4: 0.00000 -1.00000 5: 0.00000 1.00000 6: -1.00000 1.00000 7: 1.00000 1.00000 8: -1.00000 -1.00000 9: 1.00000 -1.00000 10: -0.500000 0.00000 11: 0.00000 -0.500000 12: 0.00000 0.500000 13: 0.500000 0.00000 Lagrange polynomials for XD data points: P( 1)(x) = + 1.00000 * x^( 0, 0) - 5.00000 * x^( 0, 2) - 5.00000 * x^( 2, 0) + 4.00000 * x^( 0, 4) + 1.00000 * x^( 2, 2) + 4.00000 * x^( 4, 0). P( 2)(x) = + 0.166667 * x^( 1, 0) - 0.166667 * x^( 2, 0) + 0.500000 * x^( 1, 2) - 0.666667 * x^( 3, 0) - 0.500000 * x^( 2, 2) + 0.666667 * x^( 4, 0). P( 3)(x) = - 0.166667 * x^( 1, 0) - 0.166667 * x^( 2, 0) - 0.500000 * x^( 1, 2) + 0.666667 * x^( 3, 0) - 0.500000 * x^( 2, 2) + 0.666667 * x^( 4, 0). P( 4)(x) = + 0.166667 * x^( 0, 1) - 0.166667 * x^( 0, 2) - 0.666667 * x^( 0, 3) + 0.500000 * x^( 2, 1) + 0.666667 * x^( 0, 4) - 0.500000 * x^( 2, 2). P( 5)(x) = - 0.166667 * x^( 0, 1) - 0.166667 * x^( 0, 2) + 0.666667 * x^( 0, 3) - 0.500000 * x^( 2, 1) + 0.666667 * x^( 0, 4) - 0.500000 * x^( 2, 2). P( 6)(x) = - 0.250000 * x^( 1, 2) + 0.250000 * x^( 2, 1) + 0.250000 * x^( 2, 2) - 0.250000 * x^( 3, 1). P( 7)(x) = + 0.250000 * x^( 1, 2) + 0.250000 * x^( 2, 1) + 0.250000 * x^( 2, 2) + 0.250000 * x^( 3, 1). P( 8)(x) = - 0.250000 * x^( 1, 2) - 0.250000 * x^( 2, 1) + 0.250000 * x^( 2, 2) + 0.250000 * x^( 3, 1). P( 9)(x) = + 0.250000 * x^( 1, 2) - 0.250000 * x^( 2, 1) + 0.250000 * x^( 2, 2) - 0.250000 * x^( 3, 1). P(10)(x) = - 1.33333 * x^( 1, 0) + 2.66667 * x^( 2, 0) + 1.33333 * x^( 3, 0) - 2.66667 * x^( 4, 0). P(11)(x) = - 1.33333 * x^( 0, 1) + 2.66667 * x^( 0, 2) + 1.33333 * x^( 0, 3) - 2.66667 * x^( 0, 4). P(12)(x) = + 1.33333 * x^( 0, 1) + 2.66667 * x^( 0, 2) - 1.33333 * x^( 0, 3) - 2.66667 * x^( 0, 4). P(13)(x) = + 1.33333 * x^( 1, 0) + 2.66667 * x^( 2, 0) - 1.33333 * x^( 3, 0) - 2.66667 * x^( 4, 0). Frobenius norm of Lagrange matrix error = 0.160917E-14 Maximum absolute interpolant error on 11x11 grid = 0.278102E-01 LAGRANGE_ND_TEST11 LAGRANGE_PARTIAL3 determines the Lagrange interpolating polynomials L(x) for ND points in D dimensions, assuming that the number of points is less than or equal to R = Pi(D,N), the number of monomials of degree N or less If LAGRANGE_PARTIAL3 determines that the problem is not well-posed for the given value of N, it increases N until a suitable value is found. For this example, the data points are the same as those used by the level 2 Clenshaw Curtis sparse grid in 2D. Spatial dimension D = 2 Maximum degree N = 10 Number of monomials R = 66 Number of data points ND = 65 Monomial/Legendre option OPTION = 0 Data points XD: Row 1 2 Col 1: 0.00000 0.00000 2: -1.00000 0.00000 3: 1.00000 0.00000 4: 0.00000 -1.00000 5: 0.00000 1.00000 6: -0.707107 0.00000 7: 0.707107 0.00000 8: -1.00000 -1.00000 9: 1.00000 -1.00000 10: -1.00000 1.00000 11: 1.00000 1.00000 12: 0.00000 -0.707107 13: 0.00000 0.707107 14: -0.923880 0.00000 15: -0.382683 0.00000 16: 0.382683 0.00000 17: 0.923880 0.00000 18: -0.707107 -1.00000 19: 0.707107 -1.00000 20: -0.707107 1.00000 21: 0.707107 1.00000 22: -1.00000 -0.707107 23: 1.00000 -0.707107 24: -1.00000 0.707107 25: 1.00000 0.707107 26: 0.00000 -0.923880 27: 0.00000 -0.382683 28: 0.00000 0.382683 29: 0.00000 0.923880 30: -0.980785 0.00000 31: -0.831470 0.00000 32: -0.555570 0.00000 33: -0.195090 0.00000 34: 0.195090 0.00000 35: 0.555570 0.00000 36: 0.831470 0.00000 37: 0.980785 0.00000 38: -0.923880 -1.00000 39: -0.382683 -1.00000 40: 0.382683 -1.00000 41: 0.923880 -1.00000 42: -0.923880 1.00000 43: -0.382683 1.00000 44: 0.382683 1.00000 45: 0.923880 1.00000 46: -0.707107 -0.707107 47: 0.707107 -0.707107 48: -0.707107 0.707107 49: 0.707107 0.707107 50: -1.00000 -0.923880 51: 1.00000 -0.923880 52: -1.00000 -0.382683 53: 1.00000 -0.382683 54: -1.00000 0.382683 55: 1.00000 0.382683 56: -1.00000 0.923880 57: 1.00000 0.923880 58: 0.00000 -0.980785 59: 0.00000 -0.831470 60: 0.00000 -0.555570 61: 0.00000 -0.195090 62: 0.00000 0.195090 63: 0.00000 0.555570 64: 0.00000 0.831470 65: 0.00000 0.980785 LAGRANGE_PARTIAL4 - Warning! VALUE_MAX too small. |value_max| = 0.00000 TOL = 0.100000E-03 LAGRANGE_PARTIAL3 - Increase N to 11 LAGRANGE_PARTIAL4 - Warning! VALUE_MAX too small. |value_max| = 0.00000 TOL = 0.100000E-03 LAGRANGE_PARTIAL3 - Increase N to 12 LAGRANGE_PARTIAL4 - Warning! VALUE_MAX too small. |value_max| = 0.00000 TOL = 0.100000E-03 LAGRANGE_PARTIAL3 - Increase N to 13 LAGRANGE_PARTIAL4 - Warning! VALUE_MAX too small. |value_max| = 0.00000 TOL = 0.100000E-03 LAGRANGE_PARTIAL3 - Increase N to 14 LAGRANGE_PARTIAL4 - Warning! VALUE_MAX too small. |value_max| = 0.00000 TOL = 0.100000E-03 LAGRANGE_PARTIAL3 - Increase N to 15 LAGRANGE_PARTIAL4 - Warning! VALUE_MAX too small. |value_max| = 0.00000 TOL = 0.100000E-03 LAGRANGE_PARTIAL3 - Increase N to 16 LAGRANGE_PARTIAL3 increased N to 16 (First 2) Lagrange polynomials for XD data points: P( 1)(x) = + 1.00000 * x^( 0, 0) - 43.0000 * x^( 0, 2) - 43.0000 * x^( 2, 0) + 546.000 * x^( 0, 4) + 5.82030 * x^( 2, 2) + 546.000 * x^( 4, 0) - 3144.00 * x^( 0, 6) - 3144.00 * x^( 6, 0) + 0.199398E-07 * x^( 0, 7) - 0.319890E-06 * x^( 3, 4) + 0.161841E-07 * x^( 4, 3) + 0.140778E-06 * x^( 5, 2) + 0.199398E-07 * x^( 7, 0) + 9680.00 * x^( 0, 8) + 8.11323 * x^( 2, 6) - 25.0614 * x^( 4, 4) + 8.71048 * x^( 6, 2) + 9680.00 * x^( 8, 0) - 0.526779E-07 * x^( 0, 9) + 0.432694E-06 * x^( 1, 8) - 0.680628E-07 * x^( 2, 7) - 0.526779E-07 * x^( 9, 0) - 17024.0 * x^( 0,10) - 17024.0 * x^(10, 0) + 0.739055E-07 * x^( 0,11) - 0.970507E-07 * x^( 7, 4) + 0.739055E-07 * x^(11, 0) + 17152.0 * x^( 0,12) + 17152.0 * x^(12, 0) - 0.524233E-07 * x^( 0,13) - 0.524233E-07 * x^(13, 0) - 9216.00 * x^( 0,14) + 2.85516 * x^( 4,10) + 9.03162 * x^( 8, 6) - 9216.00 * x^(14, 0) - 0.427520E-06 * x^( 1,14) + 0.626709E-07 * x^( 2,13) + 0.266828E-06 * x^( 3,12) + 2048.00 * x^( 0,16) - 4.06820 * x^( 2,14) - 4.40116 * x^(14, 2) + 2048.00 * x^(16, 0). P( 2)(x) = + 0.499999 * x^( 1, 0) - 0.499999 * x^( 2, 0) + 0.223272 * x^( 1, 2) - 21.0000 * x^( 3, 0) - 0.338400 * x^( 2, 2) + 21.0000 * x^( 4, 0) + 251.999 * x^( 5, 0) - 251.999 * x^( 6, 0) - 5.45774 * x^( 3, 4) + 2.46008 * x^( 5, 2) - 1320.00 * x^( 7, 0) - 4.87061 * x^( 2, 6) + 9.01120 * x^( 4, 4) - 2.34402 * x^( 6, 2) + 1320.00 * x^( 8, 0) + 5.87185 * x^( 1, 8) + 3519.99 * x^( 9, 0) - 3519.99 * x^(10, 0) - 3.56806 * x^( 7, 4) - 4991.99 * x^(11, 0) + 4991.99 * x^(12, 0) + 3583.99 * x^(13, 0) - 8.60461 * x^( 4,10) + 3.47522 * x^( 8, 6) - 3583.99 * x^(14, 0) - 6.07075 * x^( 1,14) + 5.00740 * x^( 3,12) + 2.03394 * x^(13, 2) - 1024.00 * x^(15, 0) + 5.18884 * x^( 2,14) - 2.01762 * x^(14, 2) + 1024.00 * x^(16, 0). Frobenius norm of Lagrange matrix error = 0.652807E-07 Maximum absolute interpolant error on 11x11 grid = 0.592213E-02 LAGRANGE_ND_TEST11 LAGRANGE_PARTIAL3 determines the Lagrange interpolating polynomials L(x) for ND points in D dimensions, assuming that the number of points is less than or equal to R = Pi(D,N), the number of monomials of degree N or less If LAGRANGE_PARTIAL3 determines that the problem is not well-posed for the given value of N, it increases N until a suitable value is found. For this example, the data points are the same as those used by the level 2 Clenshaw Curtis sparse grid in 2D. Spatial dimension D = 2 Maximum degree N = 10 Number of monomials R = 66 Number of data points ND = 65 Monomial/Legendre option OPTION = 1 Data points XD: Row 1 2 Col 1: 0.00000 0.00000 2: -1.00000 0.00000 3: 1.00000 0.00000 4: 0.00000 -1.00000 5: 0.00000 1.00000 6: -0.707107 0.00000 7: 0.707107 0.00000 8: -1.00000 -1.00000 9: 1.00000 -1.00000 10: -1.00000 1.00000 11: 1.00000 1.00000 12: 0.00000 -0.707107 13: 0.00000 0.707107 14: -0.923880 0.00000 15: -0.382683 0.00000 16: 0.382683 0.00000 17: 0.923880 0.00000 18: -0.707107 -1.00000 19: 0.707107 -1.00000 20: -0.707107 1.00000 21: 0.707107 1.00000 22: -1.00000 -0.707107 23: 1.00000 -0.707107 24: -1.00000 0.707107 25: 1.00000 0.707107 26: 0.00000 -0.923880 27: 0.00000 -0.382683 28: 0.00000 0.382683 29: 0.00000 0.923880 30: -0.980785 0.00000 31: -0.831470 0.00000 32: -0.555570 0.00000 33: -0.195090 0.00000 34: 0.195090 0.00000 35: 0.555570 0.00000 36: 0.831470 0.00000 37: 0.980785 0.00000 38: -0.923880 -1.00000 39: -0.382683 -1.00000 40: 0.382683 -1.00000 41: 0.923880 -1.00000 42: -0.923880 1.00000 43: -0.382683 1.00000 44: 0.382683 1.00000 45: 0.923880 1.00000 46: -0.707107 -0.707107 47: 0.707107 -0.707107 48: -0.707107 0.707107 49: 0.707107 0.707107 50: -1.00000 -0.923880 51: 1.00000 -0.923880 52: -1.00000 -0.382683 53: 1.00000 -0.382683 54: -1.00000 0.382683 55: 1.00000 0.382683 56: -1.00000 0.923880 57: 1.00000 0.923880 58: 0.00000 -0.980785 59: 0.00000 -0.831470 60: 0.00000 -0.555570 61: 0.00000 -0.195090 62: 0.00000 0.195090 63: 0.00000 0.555570 64: 0.00000 0.831470 65: 0.00000 0.980785 LAGRANGE_PARTIAL4 - Warning! VALUE_MAX too small. |value_max| = 0.278672E-12 TOL = 0.100000E-03 LAGRANGE_PARTIAL3 - Increase N to 11 LAGRANGE_PARTIAL4 - Warning! VALUE_MAX too small. |value_max| = 0.227790E-11 TOL = 0.100000E-03 LAGRANGE_PARTIAL3 - Increase N to 12 LAGRANGE_PARTIAL4 - Warning! VALUE_MAX too small. |value_max| = 0.532185E-11 TOL = 0.100000E-03 LAGRANGE_PARTIAL3 - Increase N to 13 LAGRANGE_PARTIAL4 - Warning! VALUE_MAX too small. |value_max| = 0.125945E-10 TOL = 0.100000E-03 LAGRANGE_PARTIAL3 - Increase N to 14 LAGRANGE_PARTIAL4 - Warning! VALUE_MAX too small. |value_max| = 0.547795E-11 TOL = 0.100000E-03 LAGRANGE_PARTIAL3 - Increase N to 15 LAGRANGE_PARTIAL4 - Warning! VALUE_MAX too small. |value_max| = 0.112300E-06 TOL = 0.100000E-03 LAGRANGE_PARTIAL3 - Increase N to 16 LAGRANGE_PARTIAL3 increased N to 16 (First 2) Lagrange polynomials for XD data points: P( 1)(x) = + 1.00000 * x^( 0, 0) - 0.249709E-06 * x^( 0, 1) + 0.174656E-07 * x^( 1, 0) - 43.0000 * x^( 0, 2) + 0.744629E-07 * x^( 1, 1) - 43.0000 * x^( 2, 0) + 0.100036E-04 * x^( 0, 3) + 0.337267E-06 * x^( 1, 2) + 0.202290E-06 * x^( 2, 1) - 0.731617E-06 * x^( 3, 0) + 546.000 * x^( 0, 4) - 0.811934E-06 * x^( 1, 3) + 25.0000 * x^( 2, 2) - 0.870465E-06 * x^( 3, 1) + 546.000 * x^( 4, 0) - 0.108383E-03 * x^( 0, 5) - 0.185072E-05 * x^( 1, 4) - 0.439497E-05 * x^( 2, 3) - 0.514465E-06 * x^( 3, 2) - 0.208468E-05 * x^( 4, 1) + 0.872395E-05 * x^( 5, 0) - 3144.00 * x^( 0, 6) + 0.270537E-05 * x^( 1, 5) - 38.0000 * x^( 2, 4) + 0.102326E-04 * x^( 3, 3) - 38.0000 * x^( 4, 2) + 0.381056E-05 * x^( 5, 1) - 3144.00 * x^( 6, 0) + 0.516782E-03 * x^( 0, 7) + 0.287771E-05 * x^( 1, 6) + 0.629096E-04 * x^( 2, 5) + 0.307294E-05 * x^( 3, 4) - 0.508135E-05 * x^( 4, 3) + 0.100094E-05 * x^( 5, 2) + 0.457350E-05 * x^( 6, 1) - 0.452432E-04 * x^( 7, 0) + 9680.00 * x^( 0, 8) - 0.429657E-06 * x^( 1, 7) + 40.0000 * x^( 2, 6) - 0.398968E-04 * x^( 3, 5) + 4.00000 * x^( 4, 4) - 0.277415E-04 * x^( 5, 3) + 40.0000 * x^( 6, 2) - 0.802291E-05 * x^( 7, 1) + 9680.00 * x^( 8, 0) - 0.126293E-02 * x^( 0, 9) - 0.138689E-05 * x^( 1, 8) - 0.250112E-03 * x^( 2, 7) - 0.251918E-05 * x^( 3, 6) + 0.110047E-04 * x^( 4, 5) - 0.720346E-05 * x^( 5, 4) - 0.424032E-06 * x^( 6, 3) + 0.265219E-06 * x^( 7, 2) - 0.222098E-05 * x^( 8, 1) + 0.119055E-03 * x^( 9, 0) - 17024.0 * x^( 0,10) - 0.763646E-05 * x^( 1, 9) - 16.0000 * x^( 2, 8) + 0.590833E-04 * x^( 3, 7) + 0.854914E-04 * x^( 5, 5) + 0.434675E-04 * x^( 7, 3) - 16.0000 * x^( 8, 2) + 0.363641E-05 * x^( 9, 1) - 17024.0 * x^(10, 0) + 0.165145E-02 * x^( 0,11) + 0.444260E-03 * x^( 2, 9) - 0.621779E-05 * x^( 4, 7) + 0.552137E-05 * x^( 5, 6) + 0.466090E-05 * x^( 7, 4) - 0.854883E-06 * x^( 9, 2) - 0.166144E-03 * x^(11, 0) + 17152.0 * x^( 0,12) + 0.897963E-05 * x^( 1,11) - 0.279004E-04 * x^( 3, 9) - 0.129983E-03 * x^( 5, 7) - 0.481481E-04 * x^( 7, 5) - 0.624209E-04 * x^( 9, 3) + 0.148842E-04 * x^(11, 1) + 17152.0 * x^(12, 0) - 0.109929E-02 * x^( 0,13) - 0.371563E-03 * x^( 2,11) - 0.343089E-05 * x^( 7, 6) + 0.117103E-03 * x^(13, 0) - 9216.00 * x^( 0,14) - 0.287809E-05 * x^( 1,13) + 0.613809E-04 * x^( 5, 9) + 0.804658E-04 * x^( 7, 7) - 0.386732E-05 * x^( 9, 5) + 0.558004E-04 * x^(11, 3) - 0.227551E-04 * x^(13, 1) - 9216.00 * x^(14, 0) + 0.292650E-03 * x^( 0,15) + 0.119091E-03 * x^( 2,13) - 0.327887E-04 * x^(15, 0) + 2048.00 * x^( 0,16) - 0.379977E-04 * x^( 7, 9) - 0.178848E-04 * x^(13, 3) + 0.925528E-05 * x^(15, 1) + 2048.00 * x^(16, 0). P( 2)(x) = + 0.312384E-06 * x^( 0, 1) + 0.499999 * x^( 1, 0) - 0.552843E-07 * x^( 0, 2) - 0.771882E-07 * x^( 1, 1) - 0.499999 * x^( 2, 0) - 0.117108E-04 * x^( 0, 3) - 1.18849 * x^( 1, 2) + 0.258171E-06 * x^( 2, 1) - 21.0000 * x^( 3, 0) + 0.325940E-05 * x^( 0, 4) + 0.252334E-05 * x^( 1, 3) - 2.50000 * x^( 2, 2) - 0.129637E-05 * x^( 3, 1) + 21.0000 * x^( 4, 0) + 0.126726E-03 * x^( 0, 5) + 4.12743 * x^( 1, 4) + 0.116326E-04 * x^( 2, 3) + 40.1414 * x^( 3, 2) - 0.407223E-05 * x^( 4, 1) + 251.999 * x^( 5, 0) - 0.386247E-04 * x^( 0, 6) - 0.166063E-04 * x^( 1, 5) + 15.0000 * x^( 2, 4) - 0.115919E-04 * x^( 3, 3) - 7.00000 * x^( 4, 2) + 0.227525E-04 * x^( 5, 1) - 251.999 * x^( 6, 0) - 0.602674E-03 * x^( 0, 7) + 3.85000 * x^( 1, 6) - 0.903712E-04 * x^( 2, 5) - 127.070 * x^( 3, 4) - 0.271047E-05 * x^( 4, 3) - 107.918 * x^( 5, 2) + 0.849992E-05 * x^( 6, 1) - 1320.00 * x^( 7, 0) + 0.189704E-03 * x^( 0, 8) + 0.498673E-04 * x^( 1, 7) - 20.0000 * x^( 2, 6) + 0.430038E-04 * x^( 3, 5) + 2.00000 * x^( 4, 4) + 0.348801E-04 * x^( 5, 3) + 12.0000 * x^( 6, 2) - 0.129695E-03 * x^( 7, 1) + 1320.00 * x^( 8, 0) + 0.146601E-02 * x^( 0, 9) - 8.00000 * x^( 1, 8) + 0.323644E-03 * x^( 2, 7) + 99.7500 * x^( 3, 6) + 0.115218E-05 * x^( 4, 5) + 291.192 * x^( 5, 4) + 0.143801E-05 * x^( 6, 3) + 85.8423 * x^( 7, 2) - 0.503674E-05 * x^( 8, 1) + 3519.99 * x^( 9, 0) - 0.468972E-03 * x^( 0,10) - 0.782678E-04 * x^( 1, 9) + 8.00000 * x^( 2, 8) - 0.633908E-04 * x^( 3, 7) - 0.932051E-04 * x^( 5, 5) - 0.622267E-04 * x^( 7, 3) - 8.00000 * x^( 8, 2) + 0.357012E-03 * x^( 9, 1) - 3519.99 * x^(10, 0) - 0.190686E-02 * x^( 0,11) - 0.565068E-03 * x^( 2, 9) - 0.538766E-06 * x^( 4, 7) - 219.450 * x^( 5, 6) - 185.250 * x^( 7, 4) - 11.3769 * x^( 9, 2) - 4991.99 * x^(11, 0) + 0.615728E-03 * x^( 0,12) + 0.626785E-04 * x^( 1,11) + 0.299345E-04 * x^( 3, 9) + 0.139460E-03 * x^( 5, 7) + 0.544271E-04 * x^( 7, 5) + 0.903059E-04 * x^( 9, 3) - 0.515476E-03 * x^(11, 1) + 4991.99 * x^(12, 0) + 0.126306E-02 * x^( 0,13) + 0.472602E-03 * x^( 2,11) + 135.850 * x^( 7, 6) + 3583.99 * x^(13, 0) - 0.409957E-03 * x^( 0,14) - 0.200800E-04 * x^( 1,13) - 0.658560E-04 * x^( 5, 9) - 0.863322E-04 * x^( 7, 7) + 0.283591E-05 * x^( 9, 5) - 0.781640E-04 * x^(11, 3) + 0.374306E-03 * x^(13, 1) - 3583.99 * x^(14, 0) - 0.334900E-03 * x^( 0,15) - 0.151493E-03 * x^( 2,13) - 1024.00 * x^(15, 0) + 0.108913E-03 * x^( 0,16) + 0.407680E-04 * x^( 7, 9) + 0.250525E-04 * x^(13, 3) - 0.107530E-03 * x^(15, 1) + 1024.00 * x^(16, 0). Frobenius norm of Lagrange matrix error = 0.217646E-05 Maximum absolute interpolant error on 11x11 grid = 0.319860E-01 LAGRANGE_ND_TEST Normal end of execution. 15 September 2021 8:27:06.652 AM