00001 #ifndef __F_ILU0_BiCgStab_LS_H__ 00002 #define __F_ILU0_BiCgStab_LS_H__ 00003 00004 00038 #include <stdio.h> 00039 #include "F_IterativeLS.hpp" 00040 00041 class AFProductSeqSMatrix; 00042 00043 class F_ILU0_BiCgStab_LS : public F_IterativeLS 00044 { 00045 private: 00046 00047 AFProductSeqSMatrix* C; // ILU0 factorisation 00048 00049 double alpha; 00050 double beta; 00051 double gamma; 00052 double rho; 00053 00054 FloatVector* r; 00055 FloatVector* p; 00056 FloatVector* ap; 00057 00058 FloatVector* rbar0; 00059 FloatVector* s; 00060 FloatVector* t; 00061 00062 FloatVector* ph; 00063 FloatVector* z; 00064 00065 00066 protected: 00067 00068 virtual AFProductSeqSMatrix* factorize(AFSymMatrix* A); 00069 00070 virtual FloatVector* singleSolve(AFloatMatrix* A, FloatVector* b, FloatVector* x=0); 00071 00072 public: 00073 F_ILU0_BiCgStab_LS(int maxIterations, double epsilon):F_IterativeLS(maxIterations, epsilon) 00074 { r=p=ap= rbar0=s=ph=z=0; C=0;} 00075 virtual ~F_ILU0_BiCgStab_LS(){} 00076 00077 virtual FloatVector* solve(AFloatMatrix* m, FloatVector* b, FloatVector* dest); 00078 }; 00079 00080 #endif 00081 00082