| kspaceFirstOrder3D-OMP 1.1 The C++ implementation of the k-wave toolbox for the time-domain simulation of acoustic wave fields in 3D

- Main Page
- Related Pages
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Files Functions Variables Typedefs Enumerations Friends Pages
Public Member Functions | Protected Member Functions | List of all members
TComplexMatrix Class Reference

The class for complex matrices. More...

`#include <ComplexMatrix.h>`

Inheritance diagram for TComplexMatrix:
[legend]
Collaboration diagram for TComplexMatrix:
[legend]

## 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.

## Detailed Description

The class for complex matrices.

Definition at line 64 of file ComplexMatrix.h.

## Constructor & Destructor Documentation

TComplexMatrix::TComplexMatrix | ( | const TDimensionSizes & | DimensionSizes | ) |

Constructor.

Parameters

  [in] | DimensionSizes | - Dimension sizes

Definition at line 58 of file ComplexMatrix.cpp.

Here is the call graph for this function:

## Member Function Documentation

TFloatComplex& TComplexMatrix::GetElementFrom3D | ( | const size_t | X,
|  | const size_t | Y,
|  | const size_t | Z
| ) |  |
| inline

Get element from 3D matrix.

Parameters

  [in] | X | - X dimension
  [in] | Y | - Y dimension
  [in] | Z | - Z dimension

Returns
  a complex element of the class

Definition at line 107 of file ComplexMatrix.h.

const TFloatComplex& TComplexMatrix::GetElementFrom3D | ( | const size_t | X,
|  | const size_t | Y,
|  | const size_t | Z
| ) |  | const
| inline

Get element from 3D matrix, constant version.

Parameters

  [in] | X | - X dimension
  [in] | Y | - Y dimension
  [in] | Z | - Z dimension

Returns
  a complex element of the class

Definition at line 122 of file ComplexMatrix.h.

void TComplexMatrix::InitDimensions | ( | const TDimensionSizes & | DimensionSizes | ) |
| protected virtual

Initialize matrix dimension sizes.

Parameters

  [in] | DimensionSizes |

Definition at line 160 of file ComplexMatrix.cpp.

Here is the caller graph for this function:

TFloatComplex& TComplexMatrix::operator[] | ( | const size_t & | index | ) |
| inline

operator [].

Parameters

  [in] | index | - 1D index into the array

Returns
  - element of the matrix

Definition at line 83 of file ComplexMatrix.h.

const TFloatComplex& TComplexMatrix::operator[] | ( | const size_t & | index | ) | const
| inline

operator [], constant version.

Parameters

  [in] | index | - 1D index into the array

Returns
  element of the matrix

Definition at line 94 of file ComplexMatrix.h.

void TComplexMatrix::ReadDataFromHDF5File | ( | THDF5_File & | HDF5_File,
|  | const char * | MatrixName
| ) |  |
| virtual

Read data from HDF5 file (do some basic checks). Only from the root group.

Exceptions

  ios::failure | when there is a problem

Parameters

  [in] | HDF5_File | - HDF5 file
  [in] | MatrixName | - HDF5 dataset name

Implements TBaseMatrix.

Definition at line 75 of file ComplexMatrix.cpp.

Here is the call graph for this function:

void TComplexMatrix::WriteDataToHDF5File | ( | THDF5_File & | HDF5_File,
|  | const char * | MatrixName,
|  | const size_t | CompressionLevel
| ) |  |
| virtual

Write data to HDF5 file (only from the root group).

Exceptions

  ios::failure | an exception what the operation fails

Parameters

  [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.

Here is the call graph for this function:

The documentation for this class was generated from the following files:

- MatrixClasses/ComplexMatrix.h
- MatrixClasses/ComplexMatrix.cpp