iohb.h

Go to the documentation of this file.
00001 /*@HEADER
00002 // ***********************************************************************
00003 // 
00004 //       Ifpack: Object-Oriented Algebraic Preconditioner Package
00005 //                 Copyright (2002) Sandia Corporation
00006 // 
00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00008 // license for use of this work by or on behalf of the U.S. Government.
00009 // 
00010 // This library is free software; you can redistribute it and/or modify
00011 // it under the terms of the GNU Lesser General Public License as
00012 // published by the Free Software Foundation; either version 2.1 of the
00013 // License, or (at your option) any later version.
00014 //  
00015 // This library is distributed in the hope that it will be useful, but
00016 // WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 // Lesser General Public License for more details.
00019 //  
00020 // You should have received a copy of the GNU Lesser General Public
00021 // License along with this library; if not, write to the Free Software
00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00023 // USA
00024 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 
00025 // 
00026 // ***********************************************************************
00027 //@HEADER
00028 */
00029 
00030 #ifndef IOHB_H
00031 #define IOHB_H
00032 
00033 #include<stdio.h>
00034 #include<stdlib.h>
00035 #include<malloc.h>
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039 
00040 int readHB_info(const char* filename, int* M, int* N, int* nz, char** Type, 
00041                                                       int* Nrhs);
00042 
00043 int readHB_header(FILE* in_file, char* Title, char* Key, char* Type, 
00044                     int* Nrow, int* Ncol, int* Nnzero, int* Nrhs,
00045                     char* Ptrfmt, char* Indfmt, char* Valfmt, char* Rhsfmt, 
00046                     int* Ptrcrd, int* Indcrd, int* Valcrd, int* Rhscrd, 
00047                     char *Rhstype);
00048 
00049 int readHB_mat_double(const char* filename, int colptr[], int rowind[], 
00050                                                                  double val[]);
00051 
00052 int readHB_newmat_double(const char* filename, int* M, int* N, int* nonzeros, 
00053                          int** colptr, int** rowind, double** val);
00054 
00055 int readHB_aux_double(const char* filename, const char AuxType, double b[]);
00056 
00057 int readHB_newaux_double(const char* filename, const char AuxType, double** b);
00058 
00059 int writeHB_mat_double(const char* filename, int M, int N, 
00060                         int nz, const int colptr[], const int rowind[], 
00061                         const double val[], int Nrhs, const double rhs[], 
00062                         const double guess[], const double exact[],
00063                         const char* Title, const char* Key, const char* Type, 
00064                         char* Ptrfmt, char* Indfmt, char* Valfmt, char* Rhsfmt,
00065                         const char* Rhstype);
00066 
00067 int readHB_mat_char(const char* filename, int colptr[], int rowind[], 
00068                                            char val[], char* Valfmt);
00069 
00070 int readHB_newmat_char(const char* filename, int* M, int* N, int* nonzeros, int** colptr, 
00071                           int** rowind, char** val, char** Valfmt);
00072 
00073 int readHB_aux_char(const char* filename, const char AuxType, char b[]);
00074 
00075 int readHB_newaux_char(const char* filename, const char AuxType, char** b, char** Rhsfmt);
00076 
00077 int writeHB_mat_char(const char* filename, int M, int N, 
00078                         int nz, const int colptr[], const int rowind[], 
00079                         const char val[], int Nrhs, const char rhs[], 
00080                         const char guess[], const char exact[], 
00081                         const char* Title, const char* Key, const char* Type, 
00082                         char* Ptrfmt, char* Indfmt, char* Valfmt, char* Rhsfmt,
00083                         const char* Rhstype);
00084 
00085 int ParseIfmt(char* fmt, int* perline, int* width);
00086 
00087 int ParseRfmt(char* fmt, int* perline, int* width, int* prec, int* flag);
00088 
00089 void IOHBTerminate(char* message);
00090 #ifdef __cplusplus
00091 }
00092 #endif
00093 
00094 #endif

Generated on Thu Sep 18 12:37:22 2008 for Ifpack Package Browser (Single Doxygen Collection) by doxygen 1.3.9.1