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