kspaceFirstOrder3D-OMP 1.0
The C++ implementation of the k-wave toolbox for the time-domain simulation of acoustic wave fields in 3D
MatrixClasses/FFTWComplexMatrix.h
Go to the documentation of this file.
00001 
00032 #ifndef FFTWCOMPLEXMATRIX_H
00033 #define  FFTWCOMPLEXMATRIX_H
00034 
00035 
00036 #include <fftw3.h>
00037 
00038 #include <MatrixClasses/ComplexMatrix.h>
00039 
00046 class TFFTWComplexMatrix : public TComplexMatrix {
00047 public:
00049     TFFTWComplexMatrix(struct TDimensionSizes DimensionSizes);
00051     virtual ~TFFTWComplexMatrix();
00052     
00054     void CreateFFTPlan3D_R2C(TRealMatrix& InMatrix);
00056     void CreateFFTPlan3D_C2R(TRealMatrix& OutMatrix);
00057     
00058     
00060     void Compute_FFT_3D_R2C(TRealMatrix & InMatrix);
00061     
00063     void Compute_iFFT_3D_C2R(TRealMatrix & OutMatrix);
00064     
00065     
00066 protected:
00068     TFFTWComplexMatrix() : TComplexMatrix(), fftw_plan_R2C_Created (false),
00069                                              fftw_plan_C2R_Created (false)
00070                                                  {};
00071 
00073     TFFTWComplexMatrix(const TFFTWComplexMatrix& src);
00074     
00076     TFFTWComplexMatrix & operator = (const TFFTWComplexMatrix& src);
00077 
00079     static const unsigned TFFTWComplexMatrix_FFT_FLAG               = FFTW_MEASURE;
00080     
00082     fftwf_plan fftw_plan_R2C;
00084     fftwf_plan fftw_plan_C2R;
00085     
00087     bool fftw_plan_R2C_Created;
00089     bool fftw_plan_C2R_Created;        
00090     
00091     
00093     virtual void AllocateMemory();
00095     virtual void FreeMemory();
00096     
00097     
00098 private:
00099   
00100     
00101 };// TFFTWComplexMatrix
00102 
00103 #endif   /* FFTWCOMPLEXMATRIX_H */
00104 
 All Classes Files Functions Variables Typedefs Enumerations