00001 #ifndef __F_ILU0_H__ 00002 #define __F_ILU0_H__ 00003 00034 #include <stdio.h> 00035 #include "FloatVector.hpp" 00036 00037 #include "AFProductSeqSMatrix.hpp" 00038 00039 // A= L1*U + R 00040 class F_ILU0 : public AFProductSeqSMatrix 00041 { 00042 protected: 00043 00044 AFSymMatrix* origin; // used to decide to build a compact type 00045 AFSymMatrix* L1U; // A= L1*U + R 00046 00047 public: 00048 F_ILU0(AFSymMatrix* A); 00049 F_ILU0(F_ILU0& m); 00050 virtual ~F_ILU0(){delete L1U;} 00051 00052 virtual AFloatMatrix* copy(){ return new F_ILU0(*this); } 00053 00054 virtual int numberOfSubMatrices() const {return 2;} 00055 virtual AFSymMatrix* getSubMatrix(int i){return 0;} // Bi 00056 virtual void setSubMatrix(int i, AFSymMatrix* Bi){} // Bi 00057 00058 virtual FloatVector* solve(FloatVector* b, FloatVector* x=0); // P*x=b 00059 virtual AFSymMatrix* invert(){return 0;} // P^-1 00060 virtual AFSymMatrix* compact(); // L1*U --> A !!! should be reviewed 00061 00062 virtual void output(); 00063 virtual void output(FILE* file){} 00064 }; 00065 00066 #endif 00067 00068 00069 00070 00071