00001 #ifndef __F2DHeatFlow33Space_H__ 00002 #define __F2DHeatFlow33Space_H__ 00003 00004 00005 00038 #include "AFSpatialDiscretisation.hpp" 00039 00040 00041 class F2DHeatFlow33Space : public AFSpatialDiscretisation 00042 { 00043 private: 00044 00045 float c; // 0<=c<=1/2, recommanded c<1/4, iso: c=1/6 00046 00047 float center; // -4+4c 00048 float lateral; // 1-2c 00049 float diagonal; // c 00050 00051 public: 00052 F2DHeatFlow33Space(float cIso=1.0/6.0):AFSpatialDiscretisation(true) 00053 {c= cIso; diagonal=c; lateral=1.0-2.0*c; center= 4.0*c-4.0; } 00054 virtual ~F2DHeatFlow33Space(){} 00055 00056 // A * u(k+1) = u(k) used on unsplitted schemes 00057 // -------------------------------------------- 00058 virtual AFSymMatrix* getA(float tau, FImage* uk, AFSymMatrix* Afull=0); 00059 00060 // A * u(k+1) = u(k) used on splitted schemes 00061 // ------------------------------------------ 00062 virtual AFSymMatrix* getRowA(float tau, FImage* uk, int row, AFSymMatrix* A1=0) 00063 { 00064 printf("%s() %d %d: ERROR: splitted methods use ONLY separable kernels\n", __FUNCTION__,__FILE__,__LINE__); 00065 return 0; 00066 } 00067 00068 virtual AFSymMatrix* getColA(float tau, FImage* uk, int col, AFSymMatrix* A2=0) 00069 { 00070 printf("%s() %d %d: ERROR: splitted methods use ONLY separable kernels\n", __FUNCTION__,__FILE__,__LINE__); 00071 return 0; 00072 } 00073 00074 }; 00075 00076 #endif 00077 00078