00001 /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ 00002 /* ******** *** SparseLib++ */ 00003 /* ******* ** *** *** *** */ 00004 /* ***** *** ******** ******** */ 00005 /* ***** *** ******** ******** R. Pozo */ 00006 /* ** ******* *** ** *** *** K. Remington */ 00007 /* ******** ******** A. Lumsdaine */ 00008 /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ 00009 /* */ 00010 /* */ 00011 /* SparseLib++ : Sparse Matrix Library */ 00012 /* */ 00013 /* National Institute of Standards and Technology */ 00014 /* University of Notre Dame */ 00015 /* Authors: R. Pozo, K. Remington, A. Lumsdaine */ 00016 /* */ 00017 /* NOTICE */ 00018 /* */ 00019 /* Permission to use, copy, modify, and distribute this software and */ 00020 /* its documentation for any purpose and without fee is hereby granted */ 00021 /* provided that the above notice appear in all copies and supporting */ 00022 /* documentation. */ 00023 /* */ 00024 /* Neither the Institutions (National Institute of Standards and Technology, */ 00025 /* University of Notre Dame) nor the Authors make any representations about */ 00026 /* the suitability of this software for any purpose. This software is */ 00027 /* provided ``as is'' without expressed or implied warranty. */ 00028 /* */ 00029 /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ 00030 00031 #ifndef ILUPRE_H 00032 #define ILUPRE_H 00033 00034 #include "vecdefs.h" 00035 #include VECTOR_H 00036 #include "comprow_double.h" 00037 #include "compcol_double.h" 00038 00039 00040 class CompCol_ILUPreconditioner_double { 00041 00042 private: 00043 VECTOR_double l_val_; 00044 VECTOR_int l_colptr_; 00045 VECTOR_int l_rowind_; 00046 int l_nz_; 00047 00048 VECTOR_double u_val_; 00049 VECTOR_int u_colptr_; 00050 VECTOR_int u_rowind_; 00051 int u_nz_; 00052 00053 int dim_[2]; 00054 00055 public: 00056 CompCol_ILUPreconditioner_double(const CompCol_Mat_double &A); 00057 ~CompCol_ILUPreconditioner_double(void){}; 00058 00059 VECTOR_double solve(const VECTOR_double &x) const; 00060 VECTOR_double trans_solve(const VECTOR_double &x) const; 00061 }; 00062 00063 00064 class CompRow_ILUPreconditioner_double { 00065 00066 private: 00067 VECTOR_double l_val_; 00068 VECTOR_int l_rowptr_; 00069 VECTOR_int l_colind_; 00070 int l_nz_; 00071 00072 VECTOR_double u_val_; 00073 VECTOR_int u_rowptr_; 00074 VECTOR_int u_colind_; 00075 int u_nz_; 00076 00077 int dim_[2]; 00078 00079 public: 00080 CompRow_ILUPreconditioner_double(const CompRow_Mat_double &A); 00081 ~CompRow_ILUPreconditioner_double(void){}; 00082 00083 VECTOR_double solve(const VECTOR_double &x) const; 00084 VECTOR_double trans_solve(const VECTOR_double &x) const; 00085 }; 00086 00087 00088 #endif