31 July 2014 10:58:21.149 AM SIMPLEX_GRID_TEST: FORTRAN77 version Test the SIMPLEX_GRID library. TEST01: SIMPLEX_GRID_SIZE counts the points in a regular grid with N+1 points on a side, in an M-dimensional simplex. M: 0 1 2 3 4 5 N: 0: 1 1 1 1 1 1 1: 1 2 3 4 5 6 2: 1 3 6 10 15 21 3: 1 4 10 20 35 56 4: 1 5 15 35 70 126 5: 1 6 21 56 126 252 6: 1 7 28 84 210 462 7: 1 8 36 120 330 792 8: 1 9 45 165 495 1287 9: 1 10 55 220 715 2002 10: 1 11 66 286 1001 3003 TEST02: SIMPLEX_GRID_INDEX_NEXT lists, one by one, the indices of a simplex grid that uses N+1 points on a side, in an M-dimensional simplex. #: 1 2 3 (*) 0: 0 0 0 ( 3) 1: 0 0 1 ( 2) 2: 0 0 2 ( 1) 3: 0 0 3 ( 0) 4: 0 1 0 ( 2) 5: 0 1 1 ( 1) 6: 0 1 2 ( 0) 7: 0 2 0 ( 1) 8: 0 2 1 ( 0) 9: 0 3 0 ( 0) 10: 1 0 0 ( 2) 11: 1 0 1 ( 1) 12: 1 0 2 ( 0) 13: 1 1 0 ( 1) 14: 1 1 1 ( 0) 15: 1 2 0 ( 0) 16: 2 0 0 ( 1) 17: 2 0 1 ( 0) 18: 2 1 0 ( 0) 19: 3 0 0 ( 0) TEST03: SIMPLEX_GRID_INDEX_SAMPLE returns a randomly selected index of a simplex grid that uses N+1 points on a side, in an M-dimensional simplex. #: 1 2 3 (*) 1: 0 1 1 ( 1) 2: 1 0 2 ( 0) 3: 0 1 2 ( 0) 4: 1 0 2 ( 0) 5: 3 0 0 ( 0) 6: 0 1 0 ( 2) 7: 0 0 3 ( 0) 8: 0 0 3 ( 0) 9: 2 0 0 ( 1) 10: 0 1 1 ( 1) 11: 0 0 0 ( 3) 12: 1 0 2 ( 0) 13: 2 1 0 ( 0) 14: 1 1 1 ( 0) 15: 2 0 0 ( 1) 16: 1 0 0 ( 2) 17: 0 0 2 ( 1) 18: 1 2 0 ( 0) 19: 1 0 0 ( 2) 20: 0 2 0 ( 1) TEST04: SIMPLEX_GRID_INDEX_TO_POINT returns the physical point corresponding to a grid index of a simplex grid that that uses N+1 points on a side, in an M-dimensional simplex. Simplex vertices: Row 1 2 Col 1: 20.0000 0.00000 2: 30.0000 40.0000 3: 10.0000 20.0000 Choosing random simplex indices to convert: #: 1 2 3 X Y 1: 1 4 0 28.0000 32.0000 2: 0 0 5 10.0000 20.0000 3: 1 2 2 20.0000 24.0000 4: 3 2 0 24.0000 16.0000 5: 0 5 0 30.0000 40.0000 6: 0 1 4 14.0000 24.0000 7: 2 1 2 18.0000 16.0000 8: 4 1 0 22.0000 8.0000 9: 1 4 0 28.0000 32.0000 10: 1 2 2 20.0000 24.0000 TEST05: SIMPLEX_GRID_INDEX_ALL returns all the indices of a simplex grid that uses N+1 points on a side, in an M-dimensional simplex. Transposed Simplex Grid Index Matrix: Row 1 2 3 4 Col 1: 0 0 0 3 2: 0 0 1 2 3: 0 0 2 1 4: 0 0 3 0 5: 0 1 0 2 6: 0 1 1 1 7: 0 1 2 0 8: 0 2 0 1 9: 0 2 1 0 10: 0 3 0 0 11: 1 0 0 2 12: 1 0 1 1 13: 1 0 2 0 14: 1 1 0 1 15: 1 1 1 0 16: 1 2 0 0 17: 2 0 0 1 18: 2 0 1 0 19: 2 1 0 0 20: 3 0 0 0 TEST06: SIMPLEX_GRID_INDEX_TO_POINT returns the physical point corresponding to a grid index of a simplex grid that that uses N+1 points on a side, in an M-dimensional simplex. Simplex vertices: Row 1 2 Col 1: 20.0000 0.00000 2: 30.0000 40.0000 3: 10.0000 20.0000 Grid Point Coordinates: Row 1 2 Col 1: 10.0000 20.0000 2: 14.0000 24.0000 3: 18.0000 28.0000 4: 22.0000 32.0000 5: 26.0000 36.0000 6: 30.0000 40.0000 7: 12.0000 16.0000 8: 16.0000 20.0000 9: 20.0000 24.0000 10: 24.0000 28.0000 11: 28.0000 32.0000 12: 14.0000 12.0000 13: 18.0000 16.0000 14: 22.0000 20.0000 15: 26.0000 24.0000 16: 16.0000 8.00000 17: 20.0000 12.0000 18: 24.0000 16.0000 19: 18.0000 4.00000 20: 22.0000 8.00000 21: 20.0000 0.00000 SIMPLEX_GRID_TEST: Normal end of execution. 31 July 2014 10:58:21.150 AM