kspaceFirstOrder3D-OMP 1.0
The C++ implementation of the k-wave toolbox for the time-domain simulation of acoustic wave fields in 3D
MatrixClasses/RealMatrix.h
Go to the documentation of this file.
00001 
00031 #ifndef REALMATRIXDATA_H
00032 #define  REALMATRIXDATA_H
00033 
00034 
00035 #include <MatrixClasses/BaseFloatMatrix.h>
00036 #include <MatrixClasses/LongMatrix.h>
00037 
00038 #include <Utils/DimensionSizes.h>
00039 
00040 class TComplexMatrix;
00041 
00046 class TRealMatrix : public TBaseFloatMatrix{
00047 public:    
00048     
00050     TRealMatrix(struct TDimensionSizes DimensionSizes);
00051             
00053     virtual ~TRealMatrix() { FreeMemory(); };
00054      
00056     virtual void ReadDataFromHDF5File(THDF5_File & HDF5_File, const char * MatrixName);
00057     
00059     virtual void WriteDataToHDF5File(THDF5_File & HDF5_File, const char * MatrixName, const int CompressionLevel);
00060     
00066     float& operator [](const size_t& index) {
00067         return pMatrixData[index]; 
00068     };
00069                 
00077     float&  GetElementFrom3D(const size_t X, const size_t Y, const size_t Z) {
00078         return pMatrixData[Z * p2DDataSliceSize + Y * pDataRowSize +  X];
00079     };
00080          
00081             
00082     
00083 protected:    
00084     
00086     virtual void InitDimensions(struct TDimensionSizes DimensionSizes);
00087     
00089     TRealMatrix() : TBaseFloatMatrix() {};
00090     
00092     TRealMatrix(const TRealMatrix& src);
00093         
00095     TRealMatrix& operator = (const TRealMatrix& src);
00096     
00097 
00098 private:
00099         
00101    static const size_t ChunkSize_1D_4MB   = 1048576; //(4MB)
00103    static const size_t ChunkSize_1D_1MB   =  262144; //(1MB)
00105    static const size_t ChunkSize_1D_256KB =   65536; //(256KB)
00106 };// end of class TRealMatrix
00107 //------------------------------------------------------------------------------
00108 
00109 #endif   /* REALMATRIXDATA_H */
00110 
00111 
00112 
 All Classes Files Functions Variables Typedefs Enumerations