10 December 2024 09:53:25 AM hn_io_test(): C version Test hb_io(). TEST01 HB_HEADER_READ reads the header of an HB file. Reading the file 'rua_32.txt'. TITLE = "1Real unsymmetric assembled matrix based on IBM32". TOTCRD = 36 PTRCRD = 3 INDCRD = 8 VALCRD = 13 RHSCRD = 12 KEY = "RUA_32". MXTYPE = "RUA". RHSTYP = "FGX". NROW = 32 NCOL = 32 NNZERO = 126 NELTVL = 0 NRHS = 1 NRHSIX = 0 PTRFMT = "(16I5)". INDFMT = "(16I5)". VALFMT = "(10F7.1)". RHSFMT = "(10F7.1)". TEST01 HB_HEADER_READ reads the header of an HB file. Reading the file 'rse_5.txt'. TITLE = "1Real symmetic unassembled finite element matrix". TOTCRD = 4 PTRCRD = 1 INDCRD = 1 VALCRD = 2 RHSCRD = 0 KEY = "RSE_5". MXTYPE = "RSE". RHSTYP = "(null)". NROW = 5 NCOL = 5 NNZERO = 0 NELTVL = 15 NRHS = 0 NRHSIX = 0 PTRFMT = "(16I5)". INDFMT = "(16I5)". VALFMT = "(10F7.1)". RHSFMT = "(10F7.1)". TEST02 HB_HEADER_WRITE writes the header of an HB file. Writing the file 'rua_32_header.txt'. TEST03 HB_STRUCTURE_READ reads the structure of an HB file. Reading the file 'rua_32.txt'. Reading the header. Reading the structure. '1Real unsymmetric assembled matrix based on IBM32' KEY = 'RUA_32'. NROW = 32 NCOL = 32 NNZERO = 126 NELTVL = 0 Column Begin End ---------------------------------------- 1 1 6 1 2 3 4 7 26 2 7 11 1 2 9 21 28 3 12 17 2 3 6 8 9 29 4 18 21 3 4 5 12 5 22 25 3 5 23 27 6 26 28 1 6 16 7 29 33 3 7 14 21 31 8 34 38 1 8 12 17 27 9 39 45 7 9 10 13 19 23 27 10 46 52 1 10 11 21 23 25 27 ---------------------------------------- TEST03 HB_STRUCTURE_READ reads the structure of an HB file. Reading the file 'rse_5.txt'. Reading the header. Reading the structure. '1Real symmetic unassembled finite element matrix' KEY = 'RSE_5'. NROW = 5 NCOL = 5 NNZERO = 0 NELTVL = 15 Column Begin End ---------------------------------------- ---------------------------------------- I haven't thought about how to print an unassembled matrix yet! TEST04 HB_STRUCTURE_WRITE writes the structure of an HB file. Writing the file 'rua_32_structure.txt' TEST05 HB_VALUES_READ reads the values of an HB file. Reading the file 'rua_32.txt' Reading the header. Reading the structure. Reading the values. '1Real unsymmetric assembled matrix based on IBM32' KEY = 'RUA_32' NROW = 32 NCOL = 32 NNZERO = 126 NELTVL = 0 Column Begin End ---------------------------------------- 1 1 6 101 102 103 104 107 126 2 7 11 201 202 209 221 228 3 12 17 302 303 306 308 309 329 4 18 21 403 404 405 412 5 22 25 503 505 523 527 Skipping intermediate columns...) 32 124 126 3224 3228 3232 ---------------------------------------- TEST05 HB_VALUES_READ reads the values of an HB file. Reading the file 'rse_5.txt' Reading the header. Reading the structure. Reading the values. '1Real symmetic unassembled finite element matrix' KEY = 'RSE_5' NROW = 5 NCOL = 5 NNZERO = 0 NELTVL = 15 Column Begin End ---------------------------------------- ---------------------------------------- I haven't thought about how to print an unassembled matrix yet! TEST06 HB_VALUES_WRITE writes the values of an HB file. Writing the file 'rua_32_values.txt' TEST07 HB_RHS_READ reads right hand sides from an HB file. HB_GUESS_READ reads starting guesses from an HB file. HB_EXACT_READ reads exact solutions from an HB file. Reading the file 'rua_32.txt' Reading the header. Reading the structure. Reading the values. Reading the right hand side. Done reading the right hand side. Part of RHS Col: 0 Row 0: 101 1: 102 2: 103 3: 104 4: 107 Reading the starting guesses. Part of GUESS Col: 0 Row 0: 1 1: 1 2: 1 3: 1 4: 1 Reading the exact solutions. Part of EXACT Col: 0 Row 0: 1 1: 2 2: 3 3: 4 4: 5 TEST08 HB_RHS_WRITE writes the right hand sides to an HB file. HB_GUESS_WRITE writes starting guesses to an HB file. HB_EXACT_WRITE writes exact solutions to an HB file. Writing the file 'rua_32_rhs.txt' TEST09 HB_FILE_READ reads all the data in an HB file. HB_FILE_MODULE is the module that stores the data. Reading the file 'rua_32.txt' TITLE = "1Real unsymmetric assembled matrix based on IBM32". TOTCRD = 36 PTRCRD = 3 INDCRD = 8 VALCRD = 13 RHSCRD = 12 KEY = "RUA_32". MXTYPE = "RUA". RHSTYP = "FGX". NROW = 32 NCOL = 32 NNZERO = 126 NELTVL = 0 NRHS = 1 NRHSIX = 0 PTRFMT = "(16I5)". INDFMT = "(16I5)". VALFMT = "(10F7.1)". RHSFMT = "(10F7.1)". Column Begin End ---------------------------------------- 1 1 6 1 2 3 4 7 26 2 7 11 1 2 9 21 28 3 12 17 2 3 6 8 9 29 4 18 21 3 4 5 12 5 22 25 3 5 23 27 6 26 28 1 6 16 7 29 33 3 7 14 21 31 8 34 38 1 8 12 17 27 9 39 45 7 9 10 13 19 23 27 10 46 52 1 10 11 21 23 25 27 ---------------------------------------- Column Begin End ---------------------------------------- 1 1 6 101 102 103 104 107 126 2 7 11 201 202 209 221 228 3 12 17 302 303 306 308 309 329 4 18 21 403 404 405 412 5 22 25 503 505 523 527 Skipping intermediate columns...) 32 124 126 3224 3228 3232 ---------------------------------------- Part of RHS Col: 0 Row 0: 101 1: 102 2: 103 3: 104 4: 107 Part of GUESS Col: 0 Row 0: 1 1: 1 2: 1 3: 1 4: 1 Part of EXACT Col: 0 Row 0: 1 1: 2 2: 3 3: 4 4: 5 TEST10 HB_FILE_WRITE writes an HB file. Writing the file 'rua_32_file.txt' TEST11 HB_MATVEC_A_MEM multiplies a matrix times a vector. This particular version assumes: * the matrix is in A format (assembled), * the matrix and vectors can fit in memory, * the matrix and multiplicand have been read into memory before the routine is called. For this example, the first vector X is zero except for a 1 in row 10. This means A*X should return column 10 of A. The second vector X is all 1's. A*X should be the sum of the entries of each row. The product vectors A*X Col: 0 1 Row 0: 1001 4606 1: 0 5512 2: 0 8424 3: 0 3816 4: 0 6520 5: 0 6430 6: 0 1721 7: 0 3124 8: 0 4236 9: 1010 3730 10: 1011 5644 11: 0 7860 12: 0 7952 13: 0 5242 14: 0 5145 15: 0 5964 16: 0 7868 17: 0 8072 18: 0 2838 19: 0 5360 20: 1021 6405 21: 0 6466 22: 1023 7815 23: 0 12120 24: 1025 3550 25: 0 9830 26: 1027 8962 27: 0 6284 28: 0 4387 29: 0 4860 30: 0 3862 31: 0 8296 Writing the file 'rua_32_ax.txt' TEST12 HB_VECMAT_A_MEM multiplies a vector times a matrix. This particular version assumes: * the matrix is in A format (assembled), * the matrix and vectors can fit in memory, * the matrix and multiplicand have been read into memory before the routine is called. For this example, the first vector X is zero except for a 1 in row 10. This means A'*X should return row 10 of A. The second vector X is all 1's. A'*X should be the sum of the entries of each column. The product vectors A'*X Col: 0 1 Row 0: 0 643 1: 0 1061 2: 0 1857 3: 0 1624 4: 0 2058 5: 0 1823 6: 0 3576 7: 0 4065 8: 910 6408 9: 1010 7118 10: 0 5575 11: 0 3642 12: 0 2624 13: 0 2817 14: 0 4537 15: 0 4842 16: 0 5137 17: 1810 9084 18: 0 5746 19: 0 6044 20: 0 6356 21: 0 4433 22: 0 9263 23: 0 7262 24: 0 12588 25: 0 10479 26: 0 10882 27: 0 5637 28: 0 14596 29: 0 12082 30: 0 9358 31: 0 9684 Writing the file 'rua_32_xa.txt' hb_io_test(): Normal end of execution. 10 December 2024 09:53:25 AM