Department of Scientific Computing   
Institute for Numerical Simulation   
University of Bonn   
Documentation
Download
Programming References
Bug Reports / Suggestions
FAQ
Authors
Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

OperatorAndTransformMatrix.hpp

00001 #ifndef OPERATORMATRIX_HPP
00002 # define OPERATORMATRIX_HPP
00003 
00004 //#include "Adaptive1D.hpp"
00005 #include "Matrix2D.hpp"
00006 
00007 struct IndexSet;
00008 struct Wavelets;
00009 struct doubleBuffer;
00010 
00011 struct MatrixShape {
00012   int M,N,BL0,BL1,BR0,BR1,U,O ;
00013   void Transpose() ;
00014   void Print()     ;
00015 } ;
00016 
00020 struct OperatorMatrix {
00022        OperatorMatrix() ;
00023 
00033   void MatVec (double *T,IndexSet *IT,int *BCT  ,  double *F,IndexSet *IF,int *BCF,int level,int clearflag, double DX, doubleBuffer *buf) ;
00034   //  non-adptive multiply
00035   void MatVec (double *T,int *BCT  ,  double *F,int *BCF,  int level, double DX) ;
00036 
00040   void MatVec2(double *T,IndexSet *IT,int *BCT  ,  double *F,IndexSet *IF,int *BCF,int level,int clearflag, double DX, doubleBuffer *buf) ;
00041 
00043   void MatTVec(double *T,IndexSet *IT,int *BCT  ,  double *F,IndexSet *IF,int *BCF,int level, double DX, doubleBuffer *buf) ;
00044 
00045   void GetShape(int Level,MatrixShape *S) ;
00046  
00048   void Print() ;
00049 
00051   Matrix2D AL [3][3] ;
00053   Matrix2D ALT[3][3] ;
00055   Matrix2D AR [3][3] ;
00057   Matrix2D ART[3][3] ;
00058 
00060   double a[100]  ;
00062   int    U,O     ;
00063  
00065   int    IsWT,IsWF ;
00067   double power ;
00068 } ; 
00069 #ifdef _TYPEDEF_STRUCTS_
00070 typedef struct OperatorMatrix OperatorMatrix;
00071 #endif
00072 
00073 
00074 // Fast Inner Loops
00075 void OperatorMatrixInnerLoop44Odd (int *ii  , int *rr   , double *F, double *T , IndexSet *IF ,
00076                                    int BR11 , double *a , double q) ;
00077 void OperatorMatrixInnerLoop12Odd (int *ii  , int *rr   , double *F, double *T , IndexSet *IF ,
00078                                    int BR11 , double *a , double q) ;
00079 void OperatorMatrixInnerLoop76Odd (int *ii  , int *rr   , double *F, double *T , IndexSet *IF ,
00080                                    int BR11 , double *a , double q) ;
00081 void OperatorMatrixInnerLoop44Even(int *ii  , int *rr   , double *F, double *T , IndexSet *IF ,
00082                                    int BR11 , double *a , double q) ;
00083 void OperatorMatrixInnerLoop12Even(int *ii  , int *rr   , double *F, double *T , IndexSet *IF ,
00084                                    int BR11 , double *a , double q) ;
00085 void OperatorMatrixInnerLoop76Even(int *ii  , int *rr   , double *F, double *T , IndexSet *IF ,
00086                                    int BR11 , double *a , double q) ;
00087 
00088 void TransformMatrixInnerLoop00(int *ii  , int *rr   , double *F, double *T , IndexSet *IF , 
00089                                 int BR11 , double *a) ;
00090 
00091 void TransformMatrixTransposeInnerLoop55(int *ii  , int *rr   , double *F, double *T , IndexSet *IF , 
00092                                          int BR11 , double *a) ;
00093 void TransformMatrixTransposeInnerLoopM11(int *ii  , int *rr   , double *F, double *T , IndexSet *IF , 
00094                                           int BR11 , double *a) ;
00095 
00096 struct LiftingMatrix {
00097   Matrix2D QL[3] ; // [BC+1] ; links
00098   Matrix2D PL[3] ; // [BC+1] ; 
00099   Matrix2D QR[3] ; // [BC+1] ; rechts
00100   Matrix2D PR[3] ; // [BC+1] ; 
00101 
00102   double a[100]  ; // a[-U,O] (zeilenweise)
00103   int    U,O     ;
00104  
00105   void MatVec (double *T, IndexSet *IT , double *F , IndexSet *IF,int *BC,int level,int clearflag, doubleBuffer *buf) ;
00106   void MatVec (double *T, double   *F  , int *BC , int level , int clearflag) ;
00107 
00108   // Multiplication (*F) =        (*this) * (*T) if add= 0 
00109   //                (*F) = (*F) + (*this) * (*T) if add= 1 
00110   //                (*F) = (*F) - (*this) * (*T) if add=-1  
00111   void MatTVec(double *T,IndexSet *IT  , double *F,IndexSet *IF, int *BC, int level , int add, doubleBuffer *buf) ;
00112   void MatTVec(double *T, double   *F  , int *BC , int level , int add) ;
00113 
00114   void GetShape(int Level,MatrixShape *S) ;
00115 } ; 
00116 #ifdef _TYPEDEF_STRUCTS_
00117 typedef struct LiftingMatrix LiftingMatrix;
00118 #endif
00119 
00120 
00123 struct TransformMatrix {
00125   void Print  () ;
00126 
00135   void MatVec (double *T,IndexSet *IT  ,  double *F,IndexSet *IF,int *BC,int level,int clearflag, doubleBuffer *buf) ;
00136   
00138   void MatTVec(double *T,IndexSet *IT  ,  double *F,IndexSet *IF,int *BC,int level,int clearflag, doubleBuffer *buf) ;
00139 
00140   void GetShape(int Level,MatrixShape *S) ;
00141   void Copy(TransformMatrix *M) ;
00142 
00143 
00144   Matrix2D AL[3],AR[3] ; // Rand-Matrizen [BCT+1] 
00145   double   a[100]      ; // h[-U,O]
00146   int      U,O         ;
00147   int IsWT             ; // IsWT==1 falls GJ gespeichert wird ... ansonsten 0
00148 
00149 
00150 //
00151   friend void  bwt(double *d,int *dec,double *c,struct Wavelets *From,struct Wavelets *,int J,int lev) ;
00152   friend void ibwt(double *d,int *dec,double *c,struct Wavelets *From,struct Wavelets *,int J,int lev) ;
00153   //friend void  Quadrature(double *d,int* ,double *c,struct Wavelets *From,struct Wavelets *,int J,int op)  ;
00154   friend void  MatVecTest(double *d,double *c,Wavelets *W,int l) ;
00155 } ;
00156 #ifdef _TYPEDEF_STRUCTS_
00157 typedef struct TransformMatrix TransformMatrix;
00158 #endif
00159 
00160 //
00161 //  Funktionen, die leider nicht als Member functions def. werden koenn, da 
00162 //  keine Zeiger auf solche Funktionen erlaubt sind
00163 //  
00164 
00165 int LiftingMatrixTransposeFirstNZE   (int j,MatrixShape *S) ;
00166 int LiftingMatrixTransposeLastNZE    (int j,MatrixShape *S) ;
00167 
00168 int LiftingMatrixTransposeFirstNZEP  (int j,MatrixShape *S) ;
00169 int LiftingMatrixTransposeLastNZEP   (int j,MatrixShape *S) ;
00170 
00171 int OperatorMatrixFirstNZE           (int j,MatrixShape *S) ;
00172 int OperatorMatrixLastNZE            (int j,MatrixShape *S) ;
00173 
00174 int OperatorMatrixFirstNZEP          (int j,MatrixShape *S) ;
00175 int OperatorMatrixLastNZEP           (int j,MatrixShape *S) ;
00176 
00177 //EAM
00178 int OperatorMatrixFirst2NZE           (int j,MatrixShape *S) ;
00179 int OperatorMatrixLast2NZE            (int j,MatrixShape *S) ;
00180 
00181 int OperatorMatrixFirst2NZEP          (int j,MatrixShape *S) ;
00182 int OperatorMatrixLast2NZEP           (int j,MatrixShape *S) ;
00183 
00184 /*
00185 int OperatorMatrixTransposeFirstNZE  (int j,MatrixShape *S) ;
00186 int OperatorMatrixTransposeLastNZE   (int j,MatrixShape *S) ;
00187 
00188 int OperatorMatrixTransposeFirstNZEP (int j,MatrixShape *S) ;
00189 int OperatorMatrixTransposeLastNZEP  (int j,MatrixShape *S) ;
00190 */
00191 
00192 // for CAM
00193 int TransformMatrixFirstNZE          (int j,MatrixShape *S) ;
00194 int TransformMatrixLastNZE           (int j,MatrixShape *S) ;
00195 
00196 int TransformMatrixFirstNZEP         (int j,MatrixShape *S) ;
00197 int TransformMatrixLastNZEP          (int j,MatrixShape *S) ;
00198 
00199 int TransformMatrixTransposeFirstNZE (int j,MatrixShape *S) ;
00200 int TransformMatrixTransposeLastNZE  (int j,MatrixShape *S) ;
00201 
00202 int TransformMatrixTransposeFirstNZEP(int j,MatrixShape *S) ;
00203 int TransformMatrixTransposeLastNZEP (int j,MatrixShape *S) ;
00204 
00205 // for EAM
00206 int TransformMatrixFirst2NZE          (int j,MatrixShape *S) ;
00207 int TransformMatrixLast2NZE           (int j,MatrixShape *S) ;
00208 
00209 int TransformMatrixFirst2NZEP         (int j,MatrixShape *S) ;
00210 int TransformMatrixLast2NZEP          (int j,MatrixShape *S) ;
00211 
00212 #endif

Generated at Mon Aug 19 10:02:32 2002 for AWFD by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001