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