forked from johannesgerer/jburkardt-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hb_io.html
386 lines (347 loc) · 10.5 KB
/
hb_io.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
<html>
<head>
<title>
HB_IO - Read and Write HB Matrix Files
</title>
</head>
<body bgcolor="#EEEEEE" link="#CC0000" alink="#FF3300" vlink="#000055">
<h1 align = "center">
HB_IO<br>
Harwell Boeing Sparse Matrix Files<br>
Read and Write Utilities
</h1>
<hr>
<p>
<b>HB_IO</b>
is a C++ library which
reads and writes files in the
Harwell Boeing sparse matrix format.
</p>
<p>
A special feature of <b>HB_IO</b> is the routine <i>HB_FILE_READ</i>,
which can read all the information from an HB file of arbitrary
size.
</p>
<p>
Note that the most common "flavor" of HB file is an assembled
sparse matrix, but that there are some lesser used options,
including storage of the matrix as unassembled finite element
matrices, and corresponding storage of vectors. These secondary
options are less well documented, and are only marginally supported
in this package.
</p>
<h3 align = "center">
Licensing:
</h3>
<p>
The computer code and data files described and made available on this web page
are distributed under
<a href = "../../txt/gnu_lgpl.txt">the GNU LGPL license.</a>
</p>
<h3 align = "center">
Languages:
</h3>
<p>
<b>HB_IO</b> is available in
<a href = "../../c_src/hb_io/hb_io.html">a C version</a> and
<a href = "../../cpp_src/hb_io/hb_io.html">a C++ version</a> and
<a href = "../../f_src/hb_io/hb_io.html">a FORTRAN90 version</a> and
<a href = "../../m_src/hb_io/hb_io.html">a MATLAB version.</a>
</p>
<h3 align = "center">
Related Data and Programs:
</h3>
<p>
<a href = "../../cpp_src/cc_io/cc_io.html">
CC_IO</a>,
a C++ library which
reads and writes sparse linear systems
stored in the Compressed Column (CC) format.
</p>
<p>
<a href = "../../data/hb/hb.html">
HB</a>,
a dataset directory which
contains a collection of sparse matrices in the HB format.
</p>
<p>
<a href = "../../m_src/hb_to_msm/hb_to_msm.html">
HB_TO_MSM</a>,
a MATLAB program which
reads an HB file and converts the matrix to MATLAB's sparse matrix format.
</p>
<p>
<a href = "../../f77_src/hb_to_st/hb_to_st.html">
HB_TO_ST</a>,
a FORTRAN77 program which
converts the sparse matrix information stored in a Harwell-Boeing
file into a sparse triplet file.
</p>
<p>
<a href = "../../datasets/hbsmc/hbsmc.html">
HBSMC</a>,
a dataset directory which
contains the Harwell Boeing Sparse Matrix Collection;
</p>
<p>
<a href = "../../cpp_src/linplus/linplus.html">
LINPLUS</a>,
a C++ library which
includes routines to manipulate matrices stored in the HB sparse matrix
format.
</p>
<p>
<a href = "../../f_src/mm_io/mm_io.html">
MM_IO</a>,
a FORTRAN90 library which
reads and writes matrices in the Matrix Market format.
</p>
<p>
<a href = "../../m_src/msm_to_hb/msm_to_hb.html">
MSM_TO_HB</a>,
a MATLAB program which
takes a matrix in MATLAB's sparse
matrix format and writes it out in the HB format.
</p>
<p>
<a href = "../../cpp_src/st_io/st_io.html">
ST_IO</a>,
a C++ library which
reads and writes sparse linear systems
stored in the Sparse Triplet (ST) format.
</p>
<p>
<a href = "../../c_src/superlu/superlu.html">
SUPERLU</a>,
a C library which
includes routines which can read and write matrices in the HB format.
</p>
<h3 align = "center">
Reference:
</h3>
<p>
<ol>
<li>
Iain Duff, Roger Grimes, John Lewis,<br>
User's Guide for the Harwell-Boeing Sparse Matrix Collection,<br>
October 1992.
</li>
<li>
Iain Duff, Roger Grimes, John Lewis,<br>
Sparse Matrix Test Problems,<br>
ACM Transactions on Mathematical Software,<br>
Volume 15, pages 1-14, March 1989.
</li>
<li>
<a href = "http://math.nist.gov/MatrixMarket/data/Harwell-Boeing/">
http://math.nist.gov/MatrixMarket/data/Harwell-Boeing/</a>
the Matrix Market site.
</li>
</ol>
</p>
<h3 align = "center">
Source Code:
</h3>
<p>
<ul>
<li>
<a href = "hb_io.cpp">hb_io.cpp</a>, the source code.
</li>
<li>
<a href = "hb_io.hpp">hb_io.hpp</a>, an include file.
</li>
<li>
<a href = "hb_io.sh">hb_io.sh</a>,
commands to compile the source code.
</li>
</ul>
</p>
<h3 align = "center">
Examples and Tests:
</h3>
<p>
<ul>
<li>
<a href = "hb_io_prb.cpp">hb_io_prb.cpp</a>,
a sample calling program.
</li>
<li>
<a href = "hb_io_prb.sh">hb_io_prb.sh</a>,
commands to compile and run the sample program.
</li>
<li>
<a href = "hb_io_prb_output.txt">hb_io_prb_output.txt</a>,
the output file.
</li>
</ul>
</p>
<p>
Data files you may copy include:
<ul>
<li>
<a href = "rse_5.txt">rse_5.txt</a>,
a sample HBSMC symmetric unassembled "element" matrix file.
</li>
<li>
<a href = "rua_32.txt">rua_32.txt</a>,
a sample HBSMC unsymmetric assembled sparse matrix file.
</li>
<li>
<a href = "rua_32_file.txt">rua_32_file.txt</a>,
a full version of "rua_32.txt" written by HB_FILE_WRITE.
</li>
<li>
<a href = "rua_32_header.txt">rua_32_header.txt</a>,
the header of "rua_32.txt" written by HB_HEADER_WRITE.
</li>
<li>
<a href = "rua_32_rhs.txt">rua_32_rhs.txt</a>,
the headers, structure, values and right hand side of
"rua_32.txt".
</li>
<li>
<a href = "rua_32_structure.txt">rua_32_structure.txt</a>,
the headers and structure of "rua_32.txt".
</li>
<li>
<a href = "rua_32_values.txt">rua_32_values.txt</a>,
the headers, structure, and values of "rua_32.txt".
</li>
<li>
<a href = "rua_32_ax.txt">rua_32_ax.txt</a>,
a sample HBSMC unsymmetric assembled sparse matrix file,
with exact solutions, and two right hand side vectors
computed from the exact solutions by calling HB_MATVEC_A_MEM.
</li>
</ul>
</p>
<h3 align = "center">
List of Routines:
</h3>
<p>
<ul>
<li>
<b>CH_EQI</b> is true if two characters are equal, disregarding case.
</li>
<li>
<b>CH_IS_DIGIT</b> returns TRUE if a character is a decimal digit.
</li>
<li>
<b>CH_IS_FORMAT_CODE</b> returns TRUE if a character is a FORTRAN format code.
</li>
<li>
<b>CH_TO_DIGIT</b> returns the integer value of a base 10 digit.
</li>
<li>
<b>HB_EXACT_READ</b> reads the exact solution vectors in an HB file.
</li>
<li>
<b>HB_EXACT_WRITE</b> writes the exact solution vectors to an HB file.
</li>
<li>
<b>HB_FILE_READ</b> reads an HB file.
</li>
<li>
<b>HB_FILE_WRITE</b> writes an HB file.
</li>
<li>
<b>HB_GUESS_READ</b> reads the starting guess vectors in an HB file.
</li>
<li>
<b>HB_GUESS_WRITE</b> writes the starting guess vectors to an HB file.
</li>
<li>
<b>HB_HEADER_PRINT</b> prints the header of an HB file.
</li>
<li>
<b>HB_HEADER_READ</b> reads the header of an HB file.
</li>
<li>
<b>HB_HEADER_WRITE</b> writes the header of an HB file.
</li>
<li>
<b>HB_MATVEC_A_MEM</b> multiplies an assembled Harwell Boeing matrix times a vector.
</li>
<li>
<b>HB_RHS_READ</b> reads the right hand side information in an HB file.
</li>
<li>
<b>HB_RHS_WRITE</b> writes the right hand side information to an HB file.
</li>
<li>
<b>HB_STRUCTURE_PRINT</b> prints the structure of an HB matrix.
</li>
<li>
<b>HB_STRUCTURE_READ</b> reads the structure of an HB matrix.
</li>
<li>
<b>HB_STRUCTURE_WRITE</b> writes the structure of an HB matrix.
</li>
<li>
<b>HB_UA_COLUMN_INDEX</b> creates a column index for an unsymmetric assembled matrix.
</li>
<li>
<b>HB_VALUES_PRINT</b> prints the values of an HB matrix.
</li>
<li>
<b>HB_VALUES_READ</b> reads the values of an HB matrix.
</li>
<li>
<b>HB_VALUES_WRITE</b> writes the values of an HB matrix.
</li>
<li>
<b>HB_VECMAT_A_MEM</b> multiplies a vector times an assembled Harwell Boeing matrix.
</li>
<li>
<b>I4_MAX</b> returns the maximum of two I4's.
</li>
<li>
<b>I4_MIN</b> returns the smaller of two I4's.
</li>
<li>
<b>I4VEC_PRINT</b> prints an I4VEC.
</li>
<li>
<b>I4VEC_PRINT_PART</b> prints "part" of an I4VEC.
</li>
<li>
<b>R8MAT_PRINT</b> prints an R8MAT.
</li>
<li>
<b>R8CMAT_PRINT_SOME</b> prints some of an R8CMAT.
</li>
<li>
<b>R8VEC_PRINT</b> prints an R8VEC.
</li>
<li>
<b>R8VEC_PRINT_PART</b> prints "part" of an R8VEC.
</li>
<li>
<b>S_LEN_TRIM</b> returns the length of a string to the last nonblank.
</li>
<li>
<b>S_SUBSTRING</b> returns a substring of a given string.
</li>
<li>
<b>S_TO_FORMAT</b> reads a FORTRAN format from a string.
</li>
<li>
<b>S_TRIM</b> promotes the final null forward through trailing blanks.
</li>
<li>
<b>TIMESTAMP</b> prints the current YMDHMS date as a time stamp.
</li>
</ul>
</p>
<p>
You can go up one level to <a href = "../cpp_src.html">
the C++ source codes</a>.
</p>
<hr>
<i>
Last revised on 21 January 2014.
</i>
<!-- John Burkardt -->
</body>
<!-- Initial HTML skeleton created by HTMLINDEX. -->
</html>