25 October 2012 11:08:04 PM PWL_INTERP_2D_SCATTERED_PRB: C++ version Test PWL_INTERP_2D_SCATTERED. The R8LIB library is needed. This test also needs the TEST_INTERP_2D library. TEST01 R8TRIS2 computes the Delaunay triangulation of a set of nodes in 2D. TRIANGULATION_ORDER3_PRINT Information defining a triangulation. The number of nodes is 9 Node coordinates Row: 0 1 Col 0: 0 0 1: 0 1 2: 0.2 0.5 3: 0.3 0.6 4: 0.4 0.5 5: 0.6 0.4 6: 0.6 0.5 7: 1 0 8: 1 1 The number of triangles is 12 Sets of three nodes are used as vertices of the triangles. For each triangle, the nodes are listed in counterclockwise order. Triangle nodes Row: 0 1 2 Col 0: 1 0 2 1: 2 0 4 2: 1 2 3 3: 3 2 4 4: 5 6 4 5: 4 0 5 6: 6 3 4 7: 8 3 6 8: 5 0 7 9: 6 5 7 10: 6 7 8 11: 1 3 8 On each side of a given triangle, there is either another triangle, or a piece of the convex hull. For each triangle, we list the indices of the three neighbors, or (if negative) the codes of the segments of the convex hull. Triangle neighbors Row: 0 1 2 Col 0: -28 2 3 1: 1 6 4 2: 1 4 12 3: 3 2 7 4: 10 7 6 5: 2 9 5 6: 8 4 5 7: 12 7 11 8: 6 -34 10 9: 5 9 11 10: 10 -38 8 11: 3 8 -3 The number of boundary points is 4 The segments that make up the convex hull can be determined from the negative entries of the triangle neighbor list. # Tri Side N1 N2 1 9 2 0 7 2 11 2 7 8 3 12 3 8 1 4 1 1 1 0 TEST02 PWL_INTERP_2D_SCATTERED_VALUE evaluates a piecewise linear interpolant to scattered data. TRIANGULATION_ORDER3_PRINT Information defining a triangulation. The number of nodes is 9 Node coordinates Row: 0 1 Col 0: 0 0 1: 0 1 2: 0.2 0.5 3: 0.3 0.6 4: 0.4 0.5 5: 0.6 0.4 6: 0.6 0.5 7: 1 0 8: 1 1 The number of triangles is 12 Sets of three nodes are used as vertices of the triangles. For each triangle, the nodes are listed in counterclockwise order. Triangle nodes Row: 0 1 2 Col 0: 1 0 2 1: 2 0 4 2: 1 2 3 3: 3 2 4 4: 5 6 4 5: 4 0 5 6: 6 3 4 7: 8 3 6 8: 5 0 7 9: 6 5 7 10: 6 7 8 11: 1 3 8 On each side of a given triangle, there is either another triangle, or a piece of the convex hull. For each triangle, we list the indices of the three neighbors, or (if negative) the codes of the segments of the convex hull. Triangle neighbors Row: 0 1 2 Col 0: -28 1 2 1: 0 5 3 2: 0 3 11 3: 2 1 6 4: 9 6 5 5: 1 8 4 6: 7 3 4 7: 11 6 10 8: 5 -34 9 9: 4 8 10 10: 9 -38 7 11: 2 7 -3 The number of boundary points is 4 The segments that make up the convex hull can be determined from the negative entries of the triangle neighbor list. # Tri Side N1 N2 1 9 2 0 7 2 11 2 7 8 3 12 3 8 1 4 1 1 1 0 K Xi(K) Yi(K) Zi(K) Z(X,Y) 0 -0.25 -0.25 -0.75 -0.75 1 -0.25 0 -0.25 -0.25 2 -0.25 0.25 0.25 0.25 3 -0.25 0.5 0.75 0.75 4 -0.25 0.75 1.25 1.25 5 0 -0.25 -0.5 -0.5 6 0 0 0 0 7 0 0.25 0.5 0.5 8 0 0.5 1 1 9 0 0.75 1.5 1.5 10 0.25 -0.25 -0.25 -0.25 11 0.25 0 0.25 0.25 12 0.25 0.25 0.75 0.75 13 0.25 0.5 1.25 1.25 14 0.25 0.75 1.75 1.75 15 0.5 -0.25 -1.11022e-16 0 16 0.5 0 0.5 0.5 17 0.5 0.25 1 1 18 0.5 0.5 1.5 1.5 19 0.5 0.75 2 2 20 0.75 -0.25 0.25 0.25 21 0.75 0 0.75 0.75 22 0.75 0.25 1.25 1.25 23 0.75 0.5 1.75 1.75 24 0.75 0.75 2.25 2.25 TEST03 PWL_INTERP_2D_SCATTERED_VALUE evaluates a piecewise linear interpolant to scattered data. Here, we use grid number 2 with 33 scattered points in the unit square on problem 1 RMS error is 0.0646687 K Xi(K) Yi(K) Zi(K) Z(X,Y) 0 0.1 0.1 0.985715 0.985739 1 0.1 0.3 0.895672 0.971628 2 0.1 0.5 0.565345 0.518177 3 0.1 0.7 0.371424 0.341203 4 0.1 0.9 0.261772 0.280498 5 0.3 0.1 0.92578 0.960998 6 0.3 0.3 0.938503 0.983607 7 0.3 0.5 0.648487 0.469049 8 0.3 0.7 0.371602 0.257567 9 0.3 0.9 0.179397 0.217369 10 0.5 0.1 0.547578 0.485502 11 0.5 0.3 0.609005 0.52098 12 0.5 0.5 0.452511 0.325762 13 0.5 0.7 0.217833 0.107956 14 0.5 0.9 0.137999 0.116557 15 0.7 0.1 0.388626 0.361365 16 0.7 0.3 0.580579 0.613637 17 0.7 0.5 0.412738 0.39943 18 0.7 0.7 0.161908 0.150339 19 0.7 0.9 0.102114 0.102114 20 0.9 0.1 0.284776 0.237177 21 0.9 0.3 0.435994 0.456915 22 0.9 0.5 0.284558 0.290384 23 0.9 0.7 0.107884 0.0909708 24 0.9 0.9 0.058301 0.0562593 TEST03 PWL_INTERP_2D_SCATTERED_VALUE evaluates a piecewise linear interpolant to scattered data. Here, we use grid number 2 with 33 scattered points in the unit square on problem 2 RMS error is 0.02106 K Xi(K) Yi(K) Zi(K) Z(X,Y) 0 0.1 0.1 0.114653 0.111111 1 0.1 0.3 0.196091 0.216312 2 0.1 0.5 0.212082 0.222056 3 0.1 0.7 0.220193 0.222218 4 0.1 0.9 0.222216 0.222222 5 0.3 0.1 0.0318699 0.00591044 6 0.3 0.3 0.121983 0.111111 7 0.3 0.5 0.178055 0.216312 8 0.3 0.7 0.204809 0.222056 9 0.3 0.9 0.2222 0.222218 10 0.5 0.1 0.00792509 0.000165784 11 0.5 0.3 0.0595004 0.00591044 12 0.5 0.5 0.138291 0.111111 13 0.5 0.7 0.179391 0.216312 14 0.5 0.9 0.221643 0.222056 15 0.7 0.1 1.0369e-05 4.53313e-06 16 0.7 0.3 0.000215028 0.000165784 17 0.7 0.5 0.0556384 0.00591044 18 0.7 0.7 0.108278 0.111111 19 0.7 0.9 0.216312 0.216312 20 0.9 0.1 1.82113e-06 1.23864e-07 21 0.9 0.3 8.93315e-06 4.53313e-06 22 0.9 0.5 0.00286226 0.000165784 23 0.9 0.7 0.0206284 0.00591044 24 0.9 0.9 0.0946491 0.111111 TEST03 PWL_INTERP_2D_SCATTERED_VALUE evaluates a piecewise linear interpolant to scattered data. Here, we use grid number 2 with 33 scattered points in the unit square on problem 3 RMS error is 0.0338932 K Xi(K) Yi(K) Zi(K) Z(X,Y) 0 0.1 0.1 0.231056 0.235762 1 0.1 0.3 0.139424 0.134319 2 0.1 0.5 0.0694703 0.0386944 3 0.1 0.7 0.0707171 0.0499949 4 0.1 0.9 0.139628 0.156272 5 0.3 0.1 0.292646 0.347807 6 0.3 0.3 0.188885 0.198154 7 0.3 0.5 0.157528 0.0570838 8 0.3 0.7 0.161584 0.0737548 9 0.3 0.9 0.189929 0.230541 10 0.5 0.1 0.250695 0.281028 11 0.5 0.3 0.146144 0.160109 12 0.5 0.5 0.0876122 0.0461237 13 0.5 0.7 0.0907816 0.0595939 14 0.5 0.9 0.176168 0.186277 15 0.7 0.1 0.163027 0.158952 16 0.7 0.3 0.0959934 0.0905593 17 0.7 0.5 0.04448 0.0260881 18 0.7 0.7 0.0368514 0.0337069 19 0.7 0.9 0.10536 0.10536 20 0.9 0.1 0.08711 0.0903046 21 0.9 0.3 0.0490729 0.0514489 22 0.9 0.5 0.0210644 0.0148212 23 0.9 0.7 0.0271814 0.0191497 24 0.9 0.9 0.0631923 0.0598576 TEST03 PWL_INTERP_2D_SCATTERED_VALUE evaluates a piecewise linear interpolant to scattered data. Here, we use grid number 2 with 33 scattered points in the unit square on problem 4 RMS error is 0.0243678 K Xi(K) Yi(K) Zi(K) Z(X,Y) 0 0.1 0.1 0.0700138 0.0659662 1 0.1 0.3 0.114752 0.121103 2 0.1 0.5 0.135393 0.148286 3 0.1 0.7 0.113531 0.121103 4 0.1 0.9 0.0766287 0.0659662 5 0.3 0.1 0.111165 0.121103 6 0.3 0.3 0.215653 0.222326 7 0.3 0.5 0.213759 0.272229 8 0.3 0.7 0.174875 0.222326 9 0.3 0.9 0.124497 0.121103 10 0.5 0.1 0.142782 0.148286 11 0.5 0.3 0.237086 0.272229 12 0.5 0.5 0.263004 0.333333 13 0.5 0.7 0.239624 0.272229 14 0.5 0.9 0.141121 0.148286 15 0.7 0.1 0.116482 0.121103 16 0.7 0.3 0.214506 0.222326 17 0.7 0.5 0.239806 0.272229 18 0.7 0.7 0.220468 0.222326 19 0.7 0.9 0.121103 0.121103 20 0.9 0.1 0.0765729 0.0659662 21 0.9 0.3 0.122401 0.121103 22 0.9 0.5 0.145005 0.148286 23 0.9 0.7 0.115038 0.121103 24 0.9 0.9 0.0667776 0.0659662 TEST03 PWL_INTERP_2D_SCATTERED_VALUE evaluates a piecewise linear interpolant to scattered data. Here, we use grid number 2 with 33 scattered points in the unit square on problem 5 RMS error is 0.0467811 K Xi(K) Yi(K) Zi(K) Z(X,Y) 0 0.1 0.1 0.00107709 0.00051127 1 0.1 0.3 0.00625033 0.00580746 2 0.1 0.5 0.0187764 0.0130546 3 0.1 0.7 0.00670107 0.00580746 4 0.1 0.9 0.0046823 0.00051127 5 0.3 0.1 0.00584873 0.00580746 6 0.3 0.3 0.0695117 0.0659662 7 0.3 0.5 0.0692916 0.148286 8 0.3 0.7 0.0363191 0.0659662 9 0.3 0.9 0.0120761 0.00580746 10 0.5 0.1 0.0263251 0.0130546 11 0.5 0.3 0.0865233 0.148286 12 0.5 0.5 0.134434 0.333333 13 0.5 0.7 0.116602 0.148286 14 0.5 0.9 0.0124872 0.0130546 15 0.7 0.1 0.00680083 0.00580746 16 0.7 0.3 0.0594277 0.0659662 17 0.7 0.5 0.0964641 0.148286 18 0.7 0.7 0.0767905 0.0659662 19 0.7 0.9 0.00580746 0.00580746 20 0.9 0.1 0.00326638 0.00051127 21 0.9 0.3 0.00745175 0.00580746 22 0.9 0.5 0.0210861 0.0130546 23 0.9 0.7 0.00923186 0.00580746 24 0.9 0.9 0.00133446 0.00051127 TEST03 PWL_INTERP_2D_SCATTERED_VALUE evaluates a piecewise linear interpolant to scattered data. Here, we use grid number 2 with 33 scattered points in the unit square on problem 6 RMS error is 0.0180806 K Xi(K) Yi(K) Zi(K) Z(X,Y) 0 0.1 0.1 0.174629 0.185655 1 0.1 0.3 0.256546 0.268195 2 0.1 0.5 0.276174 0.293803 3 0.1 0.7 0.257961 0.268195 4 0.1 0.9 0.152617 0.185655 5 0.3 0.1 0.253097 0.268195 6 0.3 0.3 0.336366 0.342688 7 0.3 0.5 0.33433 0.366097 8 0.3 0.7 0.309426 0.342688 9 0.3 0.9 0.241181 0.268195 10 0.5 0.1 0.276637 0.293803 11 0.5 0.3 0.350058 0.366097 12 0.5 0.5 0.361702 0.388889 13 0.5 0.7 0.347042 0.366097 14 0.5 0.9 0.285614 0.293803 15 0.7 0.1 0.260174 0.268195 16 0.7 0.3 0.337943 0.342688 17 0.7 0.5 0.350714 0.366097 18 0.7 0.7 0.337986 0.342688 19 0.7 0.9 0.268195 0.268195 20 0.9 0.1 0.159405 0.185655 21 0.9 0.3 0.257313 0.268195 22 0.9 0.5 0.281322 0.293803 23 0.9 0.7 0.254542 0.268195 24 0.9 0.9 0.176782 0.185655 TEST03 PWL_INTERP_2D_SCATTERED_VALUE evaluates a piecewise linear interpolant to scattered data. Here, we use grid number 2 with 33 scattered points in the unit square on problem 7 RMS error is 0.791415 K Xi(K) Yi(K) Zi(K) Z(X,Y) 0 0.1 0.1 0.488247 1.00913 1 0.1 0.3 0.0632153 0.448015 2 0.1 0.5 -0.317995 -0.556792 3 0.1 0.7 1.2926 1.35416 4 0.1 0.9 -0.370231 1.22866 5 0.3 0.1 -0.494301 -1.37058 6 0.3 0.3 0.829359 0.503911 7 0.3 0.5 0.847388 2.89615 8 0.3 0.7 -0.105387 -0.437614 9 0.3 0.9 -1.27307 -0.388609 10 0.5 0.1 0.532046 0.956813 11 0.5 0.3 1.85094 1.07756 12 0.5 0.5 0.640226 0.054451 13 0.5 0.7 -0.524298 0.0219413 14 0.5 0.9 -0.766382 -0.743725 15 0.7 0.1 1.23609 1.91299 16 0.7 0.3 1.09328 1.07599 17 0.7 0.5 -0.108921 -1.79665 18 0.7 0.7 -0.209167 0.00815474 19 0.7 0.9 0.638208 0.638208 20 0.9 0.1 0.307289 -0.750052 21 0.9 0.3 0.482362 0.170222 22 0.9 0.5 0.18449 0.76988 23 0.9 0.7 -0.626393 -1.18039 24 0.9 0.9 0.0840376 0.218903 TEST03 PWL_INTERP_2D_SCATTERED_VALUE evaluates a piecewise linear interpolant to scattered data. Here, we use grid number 2 with 33 scattered points in the unit square on problem 8 RMS error is 0.432271 K Xi(K) Yi(K) Zi(K) Z(X,Y) 0 0.1 0.1 0.00383079 0.000587144 1 0.1 0.3 0.255942 0.101871 2 0.1 0.5 0.485336 0.750587 3 0.1 0.7 0.123707 0.101871 4 0.1 0.9 0.0768085 0.000587144 5 0.3 0.1 0.305624 0.135621 6 0.3 0.3 0.316419 0.250573 7 0.3 0.5 0.366885 0.986837 8 0.3 0.7 0.307027 0.250573 9 0.3 0.9 0.351219 0.135621 10 0.5 0.1 0.78198 1.0005 11 0.5 0.3 0.590999 1.203 12 0.5 0.5 0.760116 2.5 13 0.5 0.7 0.741526 1.203 14 0.5 0.9 0.661158 1.0005 15 0.7 0.1 0.220266 0.135621 16 0.7 0.3 0.379462 0.250573 17 0.7 0.5 0.501433 0.986837 18 0.7 0.7 0.348018 0.250573 19 0.7 0.9 0.135621 0.135621 20 0.9 0.1 0.0204279 0.000587144 21 0.9 0.3 0.183789 0.101871 22 0.9 0.5 0.567782 0.750587 23 0.9 0.7 0.228663 0.101871 24 0.9 0.9 0.0273575 0.000587144 TEST03 PWL_INTERP_2D_SCATTERED_VALUE evaluates a piecewise linear interpolant to scattered data. Here, we use grid number 2 with 33 scattered points in the unit square on problem 9 RMS error is 16.7099 K Xi(K) Yi(K) Zi(K) Z(X,Y) 0 0.1 0.1 1.60343 1.0265 1 0.1 0.3 4.63475 5.76296 2 0.1 0.5 5.96603 0 3 0.1 0.7 -4.19368 -8.54182 4 0.1 0.9 -6.16307 -1.86514 5 0.3 0.1 4.53651 5.76296 6 0.3 0.3 26.6637 32.3542 7 0.3 0.5 20.76 0 8 0.3 0.7 -2.49819 -47.9552 9 0.3 0.9 -13.5956 -10.4712 10 0.5 0.1 -8.66549 0 11 0.5 0.3 -5.01485 0 12 0.5 0.5 48.0306 0 13 0.5 0.7 39.8545 -0 14 0.5 0.9 1.16014 -0 15 0.7 0.1 -8.40111 -8.54182 16 0.7 0.3 -38.3621 -47.9552 17 0.7 0.5 15.2015 -0 18 0.7 0.7 65.8221 71.0789 19 0.7 0.9 15.5203 15.5203 20 0.9 0.1 -5.50725 -1.86514 21 0.9 0.3 -11.3124 -10.4712 22 0.9 0.5 -0.424162 -0 23 0.9 0.7 14.311 15.5203 24 0.9 0.9 4.67806 3.38892 TEST03 PWL_INTERP_2D_SCATTERED_VALUE evaluates a piecewise linear interpolant to scattered data. Here, we use grid number 2 with 33 scattered points in the unit square on problem 10 RMS error is 0.294461 K Xi(K) Yi(K) Zi(K) Z(X,Y) 0 0.1 0.1 0.0972076 0.085685 1 0.1 0.3 0.126192 0.164345 2 0.1 0.5 0.0718366 0.024328 3 0.1 0.7 0.167451 0.164345 4 0.1 0.9 0.027923 0.085685 5 0.3 0.1 0.140469 0.19255 6 0.3 0.3 -0.273568 -0.340088 7 0.3 0.5 -0.263735 -0.388822 8 0.3 0.7 -0.038257 -0.340088 9 0.3 0.9 0.061425 0.19255 10 0.5 0.1 -0.0102987 0.150376 11 0.5 0.3 -0.377489 -0.440059 12 0.5 0.5 -0.391768 1 13 0.5 0.7 -0.225001 -0.440059 14 0.5 0.9 0.131697 0.150376 15 0.7 0.1 0.152041 0.19255 16 0.7 0.3 -0.292904 -0.340088 17 0.7 0.5 -0.371475 -0.388822 18 0.7 0.7 -0.308656 -0.340088 19 0.7 0.9 0.19255 0.19255 20 0.9 0.1 0.0478972 0.085685 21 0.9 0.3 0.105951 0.164345 22 0.9 0.5 -0.0216923 0.024328 23 0.9 0.7 0.106565 0.164345 24 0.9 0.9 0.0610088 0.085685 TEST03 PWL_INTERP_2D_SCATTERED_VALUE evaluates a piecewise linear interpolant to scattered data. Here, we use grid number 2 with 33 scattered points in the unit square on problem 11 RMS error is 0.00496802 K Xi(K) Yi(K) Zi(K) Z(X,Y) 0 0.1 0.1 0.1125 0.11 1 0.1 0.3 0.1275 0.13 2 0.1 0.5 0.146875 0.15 3 0.1 0.7 0.169375 0.17 4 0.1 0.9 0.182241 0.19 5 0.3 0.1 0.322857 0.33 6 0.3 0.3 0.39075 0.39 7 0.3 0.5 0.45125 0.45 8 0.3 0.7 0.512917 0.51 9 0.3 0.9 0.565 0.57 10 0.5 0.1 0.551515 0.55 11 0.5 0.3 0.645 0.65 12 0.5 0.5 0.765 0.75 13 0.5 0.7 0.843333 0.85 14 0.5 0.9 0.9525 0.95 15 0.7 0.1 0.773333 0.77 16 0.7 0.3 0.912857 0.91 17 0.7 0.5 1.0425 1.05 18 0.7 0.7 1.1915 1.19 19 0.7 0.9 1.33 1.33 20 0.9 0.1 0.982895 0.99 21 0.9 0.3 1.16773 1.17 22 0.9 0.5 1.35 1.35 23 0.9 0.7 1.52667 1.53 24 0.9 0.9 1.71 1.71 TEST03 PWL_INTERP_2D_SCATTERED_VALUE evaluates a piecewise linear interpolant to scattered data. Here, we use grid number 2 with 33 scattered points in the unit square on problem 12 RMS error is 0.0491764 K Xi(K) Yi(K) Zi(K) Z(X,Y) 0 0.1 0.1 0.416744 0.451126 1 0.1 0.3 0.7905 0.899733 2 0.1 0.5 0.757056 0.808444 3 0.1 0.7 0.533072 0.517891 4 0.1 0.9 0.609041 0.535125 5 0.3 0.1 0.382387 0.365971 6 0.3 0.3 0.741577 0.779003 7 0.3 0.5 0.724366 0.69786 8 0.3 0.7 0.627786 0.495853 9 0.3 0.9 0.684328 0.643537 10 0.5 0.1 0.175482 0.210007 11 0.5 0.3 0.473332 0.463269 12 0.5 0.5 0.558558 0.460375 13 0.5 0.7 0.528007 0.483002 14 0.5 0.9 0.882618 0.845854 15 0.7 0.1 0.0877233 0.0990369 16 0.7 0.3 0.263288 0.24949 17 0.7 0.5 0.386132 0.369136 18 0.7 0.7 0.66276 0.634933 19 0.7 0.9 1.16782 1.16782 20 0.9 0.1 0.0797799 0.0810179 21 0.9 0.3 0.265855 0.261762 22 0.9 0.5 0.560616 0.527383 23 0.9 0.7 0.979735 0.955604 24 0.9 0.9 1.50491 1.51793 TEST03 PWL_INTERP_2D_SCATTERED_VALUE evaluates a piecewise linear interpolant to scattered data. Here, we use grid number 2 with 33 scattered points in the unit square on problem 13 RMS error is 0.164364 K Xi(K) Yi(K) Zi(K) Z(X,Y) 0 0.1 0.1 0.0316114 0.030303 1 0.1 0.3 0.0462236 0.047619 2 0.1 0.5 0.0600301 0.0588235 3 0.1 0.7 0.0464146 0.047619 4 0.1 0.9 0.0353552 0.030303 5 0.3 0.1 0.0450549 0.047619 6 0.3 0.3 0.114177 0.111111 7 0.3 0.5 0.113645 0.2 8 0.3 0.7 0.0812631 0.111111 9 0.3 0.9 0.0520605 0.047619 10 0.5 0.1 0.0663347 0.0588235 11 0.5 0.3 0.131539 0.2 12 0.5 0.5 0.18858 1 13 0.5 0.7 0.172959 0.2 14 0.5 0.9 0.0566457 0.0588235 15 0.7 0.1 0.0469889 0.047619 16 0.7 0.3 0.104986 0.111111 17 0.7 0.5 0.145938 0.2 18 0.7 0.7 0.120601 0.111111 19 0.7 0.9 0.047619 0.047619 20 0.9 0.1 0.0345372 0.030303 21 0.9 0.3 0.0488869 0.047619 22 0.9 0.5 0.06283 0.0588235 23 0.9 0.7 0.0480551 0.047619 24 0.9 0.9 0.0310003 0.030303 PWL_INTERP_2D_SCATTERED_PRB: Normal end of execution. 25 October 2012 11:08:04 PM