00001 #ifndef __F_SSOR_BiCgStab_2LS_H__
00002 #define __F_SSOR_BiCgStab_2LS_H__
00003
00004
00032 #include <stdio.h>
00033 #include "F_IterativeLS.hpp"
00034
00035 class AFProductSeqSMatrix;
00036
00037 class F_SSOR_BiCgStab_2LS : public F_IterativeLS
00038 {
00039 private:
00040
00041 double alpha;
00042 double beta;
00043 double gamma;
00044
00045 double rho0, rho1;
00046 double omega1, omega2, omega3;
00047
00048 FloatVector* r;
00049 FloatVector* u;
00050 FloatVector* v;
00051 FloatVector* w;
00052
00053 FloatVector* r0bar;
00054 FloatVector* s;
00055 FloatVector* t;
00056
00057 FloatVector* uh;
00058 FloatVector* rh;
00059 FloatVector* vh;
00060 FloatVector* sh;
00061
00062 bool fixedOmega;
00063 double omega;
00064 AFProductSeqSMatrix* C;
00065
00066
00067 protected:
00068
00069 virtual AFProductSeqSMatrix* factorize(AFSymMatrix* A);
00070
00071 virtual FloatVector* singleSolve(AFloatMatrix* A, FloatVector* b, FloatVector* x=0);
00072
00073 public:
00074 F_SSOR_BiCgStab_2LS(int maxIterations, double epsilon):F_IterativeLS(maxIterations, epsilon)
00075 { r=u=v=w= r0bar=s=t= uh=rh=vh=sh= 0; fixedOmega= false; omega=1.0;}
00076 F_SSOR_BiCgStab_2LS(int maxIterations, double anOmega, double epsilon):F_IterativeLS(maxIterations, epsilon)
00077 { r=u=v=w= r0bar=s=t= uh=rh=vh=sh= 0; fixedOmega= true; omega= anOmega;}
00078 virtual ~F_SSOR_BiCgStab_2LS(){}
00079
00080 virtual FloatVector* solve(AFloatMatrix* m, FloatVector* b, FloatVector* dest);
00081 };
00082
00083 #endif
00084
00085
00086