kspaceFirstOrder3D-OMP  1.2
The C++ implementation of the k-wave toolbox for the time-domain simulation of acoustic wave fields in 3D
MatrixRecord.h
Go to the documentation of this file.
1 /**
2  * @file MatrixRecord.h
3  *
4  * @author Jiri Jaros \n
5  * Faculty of Information Technology \n
6  * Brno University of Technology \n
7  * jarosjir@fit.vutbr.cz
8  *
9  * @brief The header file containing metadata about matrices stored in the matrix container.
10  *
11  * @version kspaceFirstOrder3D 2.16
12  *
13  * @date 27 August 2017, 08:54 (created) \n
14  * 04 September 2017, 10:54 (revised)
15  *
16  * @copyright Copyright (C) 2017 Jiri Jaros and Bradley Treeby.
17  *
18  * This file is part of the C++ extension of the [k-Wave Toolbox](http://www.k-wave.org).
19  *
20  * This file is part of the k-Wave. k-Wave is free software: you can redistribute it and/or modify it under the terms
21  * of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the
22  * License, or (at your option) any later version.
23  *
24  * k-Wave is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
25  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
26  * more details.
27  *
28  * You should have received a copy of the GNU Lesser General Public License along with k-Wave.
29  * If not, see [http://www.gnu.org/licenses/](http://www.gnu.org/licenses/).
30  */
31 
32 
33 #ifndef MATRIX_RECORD_H
34 #define MATRIX_RECORD_H
35 
36 #include <string>
37 
39 #include <Utils/MatrixNames.h>
40 
41 /**
42  * @struct MatrixRecord
43  * @brief A structure storing details about the matrix.
44  * @details A structure storing details about the matrix. The matrix container stores the list of
45  * these records - metadata and pointer to the matrix.
46  */
48 {
49  /**
50  * @enum MatrixType
51  * @brief All possible types of the matrix.
52  */
53  enum class MatrixType
54  {
55  /// Matrix for real values.
56  kReal,
57  /// Matrix for complex values.
58  kComplex,
59  /// Matrix for index values.
60  kIndex,
61  /// Matrix for FFTW.
62  kFftw
63  };
64 
65  /// Default constructor.
66  MatrixRecord();
67  /// Copy constructor.
68  MatrixRecord(const MatrixRecord& src);
69  /// operator =
70  MatrixRecord& operator=(const MatrixRecord& src);
71 
72 
73  /**
74  * @brief Set all values for the record.
75  * @param [in] matrixType - Matrix data type.
76  * @param [in] dimensionSizes - Dimension sizes.
77  * @param [in] loadData - Load data from file?
78  * @param [in] checkpoint - Checkpoint this matrix?
79  * @param [in] matrixName - HDF5 matrix name.
80  */
81  void set(const MatrixType matrixType,
83  const bool loadData,
84  const bool checkpoint,
86 
87 
88  // Destructor.
89  virtual ~MatrixRecord() {};
90 
91 
92  /// Pointer to the matrix object.
94  /// Matrix data type.
96  /// Matrix dimension sizes.
98  /// Is the matrix content loaded from the HDF5 file?
99  bool loadData;
100  /// Is the matrix necessary to be preserver when checkpoint is enabled?
102  /// Matrix name in the HDF5 file.
103  std::string matrixName;
104 };// end of MatrixRecord
105 //----------------------------------------------------------------------------------------------------------------------
106 
107 #endif /* MATRIX_RECORD_H */
MatrixRecord()
Default constructor.
BaseMatrix * matrixPtr
Pointer to the matrix object.
Definition: MatrixRecord.h:89
bool checkpoint
Is the matrix necessary to be preserver when checkpoint is enabled?
Definition: MatrixRecord.h:101
MatrixType matrixType
Matrix data type.
Definition: MatrixRecord.h:95
DimensionSizes dimensionSizes
Matrix dimension sizes.
Definition: MatrixRecord.h:97
MatrixRecord & operator=(const MatrixRecord &src)
operator =
Abstract base class. The common ancestor defining the common interface and allowing derived classes t...
Definition: BaseMatrix.h:48
Matrix for complex values.
MatrixType
All possible types of the matrix.
Definition: MatrixRecord.h:53
const std::string MatrixName
Datatype for matrix names.
Definition: MatrixNames.h:39
Matrix for index values.
Structure with 4D dimension sizes (3 in space and 1 in time).
The header file storing names of all variables.
bool loadData
Is the matrix content loaded from the HDF5 file?
Definition: MatrixRecord.h:99
std::string matrixName
Matrix name in the HDF5 file.
Definition: MatrixRecord.h:103
A structure storing details about the matrix.
Definition: MatrixRecord.h:47
Matrix for real values.
The header file of the common ancestor of all matrix classes. A pure abstract class.