Debian Codegraph @

packages/aztecoo/example/azoo_iterate_hb/iohb.h

raw
1 /*
2 //@HEADER
3 // ***********************************************************************
4 //
5 // AztecOO: An Object-Oriented Aztec Linear Solver Package
6 // Copyright (2002) Sandia Corporation
7 //
8 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
9 // license for use of this work by or on behalf of the U.S. Government.
10 //
11 // Redistribution and use in source and binary forms, with or without
12 // modification, are permitted provided that the following conditions are
13 // met:
14 //
15 // 1. Redistributions of source code must retain the above copyright
16 // notice, this list of conditions and the following disclaimer.
17 //
18 // 2. Redistributions in binary form must reproduce the above copyright
19 // notice, this list of conditions and the following disclaimer in the
20 // documentation and/or other materials provided with the distribution.
21 //
22 // 3. Neither the name of the Corporation nor the names of the
23 // contributors may be used to endorse or promote products derived from
24 // this software without specific prior written permission.
25 //
26 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
27 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
30 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 //
38 // Questions? Contact Michael A. Heroux ([email protected])
39 //
40 // ***********************************************************************
41 //@HEADER
42 */
43
44 #ifndef IOHB_H
45 #define IOHB_H
46
47 #include<stdio.h>
48 #include<stdlib.h>
49 #include<malloc.h>
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53
54 int readHB_info(const char* filename, int* M, int* N, int* nz, char** Type,
55 int* Nrhs);
56
57 int readHB_header(FILE* in_file, char* Title, char* Key, char* Type,
58 int* Nrow, int* Ncol, int* Nnzero, int* Nrhs,
59 char* Ptrfmt, char* Indfmt, char* Valfmt, char* Rhsfmt,
60 int* Ptrcrd, int* Indcrd, int* Valcrd, int* Rhscrd,
61 char *Rhstype);
62
63 int readHB_mat_double(const char* filename, int colptr[], int rowind[],
64 double val[]);
65
66 int readHB_newmat_double(const char* filename, int* M, int* N, int* nonzeros,
67 int** colptr, int** rowind, double** val);
68
69 int readHB_aux_double(const char* filename, const char AuxType, double b[]);
70
71 int readHB_newaux_double(const char* filename, const char AuxType, double** b);
72
73 int writeHB_mat_double(const char* filename, int M, int N,
74 int nz, const int colptr[], const int rowind[],
75 const double val[], int Nrhs, const double rhs[],
76 const double guess[], const double exact[],
77 const char* Title, const char* Key, const char* Type,
78 char* Ptrfmt, char* Indfmt, char* Valfmt, char* Rhsfmt,
79 const char* Rhstype);
80
81 int readHB_mat_char(const char* filename, int colptr[], int rowind[],
82 char val[], char* Valfmt);
83
84 int readHB_newmat_char(const char* filename, int* M, int* N, int* nonzeros, int** colptr,
85 int** rowind, char** val, char** Valfmt);
86
87 int readHB_aux_char(const char* filename, const char AuxType, char b[]);
88
89 int readHB_newaux_char(const char* filename, const char AuxType, char** b, char** Rhsfmt);
90
91 int writeHB_mat_char(const char* filename, int M, int N,
92 int nz, const int colptr[], const int rowind[],
93 const char val[], int Nrhs, const char rhs[],
94 const char guess[], const char exact[],
95 const char* Title, const char* Key, const char* Type,
96 char* Ptrfmt, char* Indfmt, char* Valfmt, char* Rhsfmt,
97 const char* Rhstype);
98
99 int ParseIfmt(char* fmt, int* perline, int* width);
100
101 int ParseRfmt(char* fmt, int* perline, int* width, int* prec, int* flag);
102
103 void IOHBTerminate(char* message);
104 #ifdef __cplusplus
105 }
106 #endif
107
108 #endif