kspaceFirstOrder3D-OMP
1.1
The C++ implementation of the k-wave toolbox for the time-domain simulation of acoustic wave fields in 3D
|
The class for complex matrices. More...
#include <ComplexMatrix.h>
Public Member Functions | |
TComplexMatrix (const TDimensionSizes &DimensionSizes) | |
Constructor. More... | |
virtual | ~TComplexMatrix () |
Destructor. | |
TFloatComplex & | operator[] (const size_t &index) |
operator []. More... | |
const TFloatComplex & | operator[] (const size_t &index) const |
operator [], constant version. More... | |
TFloatComplex & | GetElementFrom3D (const size_t X, const size_t Y, const size_t Z) |
Get element from 3D matrix. More... | |
const TFloatComplex & | GetElementFrom3D (const size_t X, const size_t Y, const size_t Z) const |
Get element from 3D matrix, constant version. More... | |
virtual void | ReadDataFromHDF5File (THDF5_File &HDF5_File, const char *MatrixName) |
Load data from the HDF5_File. More... | |
virtual void | WriteDataToHDF5File (THDF5_File &HDF5_File, const char *MatrixName, const size_t CompressionLevel) |
Write data into the HDF5_File. More... | |
Public Member Functions inherited from TBaseFloatMatrix | |
TBaseFloatMatrix () | |
Default constructor. | |
virtual TDimensionSizes | GetDimensionSizes () const |
Get dimension sizes of the matrix. | |
virtual size_t | GetTotalElementCount () const |
Get element count of the matrix. | |
virtual size_t | GetTotalAllocatedElementCount () const |
Get total allocated element count (might differ from total element count used for the simulation because of padding). | |
virtual | ~TBaseFloatMatrix () |
Destructor. | |
virtual void | CopyData (const TBaseFloatMatrix &src) |
Copy data from other matrix with the same size. More... | |
virtual void | ZeroMatrix () |
Zero all elements of the matrix (NUMA first touch). More... | |
virtual void | ScalarDividedBy (const float scalar) |
Divide scalar/ matrix_element[i]. More... | |
virtual float * | GetRawData () |
Get raw data out of the class (for direct kernel access). | |
virtual const float * | GetRawData () const |
Get raw data out of the class (for direct kernel access). | |
Public Member Functions inherited from TBaseMatrix | |
TBaseMatrix () | |
Default constructor. | |
virtual | ~TBaseMatrix () |
Destructor. | |
Protected Member Functions | |
TComplexMatrix () | |
Default constructor not allowed for public. | |
TComplexMatrix (const TComplexMatrix &src) | |
Copy constructor not allowed for public. | |
TComplexMatrix & | operator= (const TComplexMatrix &src) |
Operator not allowed for public. | |
virtual void | InitDimensions (const TDimensionSizes &DimensionSizes) |
Initialize dimension sizes and related structures. More... | |
Protected Member Functions inherited from TBaseFloatMatrix | |
virtual void | AllocateMemory () |
Memory allocation. More... | |
virtual void | FreeMemory () |
Memory deallocation. More... | |
TBaseFloatMatrix (const TBaseFloatMatrix &src) | |
Copy constructor is not directly allowed. | |
TBaseFloatMatrix & | operator= (const TBaseFloatMatrix &src) |
operator = is not directly allowed. | |
Additional Inherited Members | |
Protected Attributes inherited from TBaseFloatMatrix | |
size_t | pTotalElementCount |
Total number of elements. | |
size_t | pTotalAllocatedElementCount |
Total number of allocated elements (in terms of floats). | |
struct TDimensionSizes | pDimensionSizes |
Dimension sizes. | |
size_t | pDataRowSize |
Size of a 1D row in X dimension. | |
size_t | p2DDataSliceSize |
Size of a 2D slab (X,Y). | |
float * | pMatrixData |
Raw matrix data. | |
The class for complex matrices.
Definition at line 64 of file ComplexMatrix.h.
TComplexMatrix::TComplexMatrix | ( | const TDimensionSizes & | DimensionSizes | ) |
Constructor.
[in] | DimensionSizes | - Dimension sizes |
Definition at line 58 of file ComplexMatrix.cpp.
|
inline |
Get element from 3D matrix.
[in] | X | - X dimension |
[in] | Y | - Y dimension |
[in] | Z | - Z dimension |
Definition at line 107 of file ComplexMatrix.h.
|
inline |
Get element from 3D matrix, constant version.
[in] | X | - X dimension |
[in] | Y | - Y dimension |
[in] | Z | - Z dimension |
Definition at line 122 of file ComplexMatrix.h.
|
protectedvirtual |
Initialize matrix dimension sizes.
[in] | DimensionSizes |
Definition at line 160 of file ComplexMatrix.cpp.
|
inline |
operator [].
[in] | index | - 1D index into the array |
Definition at line 83 of file ComplexMatrix.h.
|
inline |
operator [], constant version.
[in] | index | - 1D index into the array |
Definition at line 94 of file ComplexMatrix.h.
|
virtual |
Read data from HDF5 file (do some basic checks). Only from the root group.
ios::failure | when there is a problem |
[in] | HDF5_File | - HDF5 file |
[in] | MatrixName | - HDF5 dataset name |
Implements TBaseMatrix.
Definition at line 75 of file ComplexMatrix.cpp.
|
virtual |
Write data to HDF5 file (only from the root group).
ios::failure | an exception what the operation fails |
[in] | HDF5_File | - HDF5 file handle |
[in] | MatrixName | - HDF5 dataset name |
[in] | CompressionLevel | - Compression level for the dataset |
Implements TBaseMatrix.
Definition at line 114 of file ComplexMatrix.cpp.