kspaceFirstOrder3D-OMP  1.2
The C++ implementation of the k-wave toolbox for the time-domain simulation of acoustic wave fields in 3D
MatrixRecord.cpp
Go to the documentation of this file.
1 /**
2  * @file MatrixRecord.cpp
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 implementation 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 
34 
35 
36 //----------------------------------------------------------------------------------------------------------------------
37 //---------------------------------------------------- Constants -----------------------------------------------------//
38 //----------------------------------------------------------------------------------------------------------------------
39 
40 
41 //----------------------------------------------------------------------------------------------------------------------
42 //------------------------------------------------- Public methods ---------------------------------------------------//
43 //----------------------------------------------------------------------------------------------------------------------
44 
45 /**
46  * Default constructor.
47  */
49  : matrixPtr(nullptr),
50  matrixType(MatrixType::kReal),
51  dimensionSizes(),
52  loadData(false),
53  checkpoint(false),
54  matrixName()
55 {
56 
57 }// end of constructor
58 //----------------------------------------------------------------------------------------------------------------------
59 
60 /**
61  * Copy constructor of TMatrixRecord.
62  */
64  : matrixPtr(src.matrixPtr),
67  loadData(src.loadData),
70 {
71 
72 }// end of copy constructor
73 //----------------------------------------------------------------------------------------------------------------------
74 
75 /**
76  * operator =
77  */
79 {
80  if (this != &src)
81  {
82  matrixPtr = src.matrixPtr;
83  matrixType = src.matrixType;
85  loadData = src.loadData;
86  checkpoint = src.checkpoint;
87  matrixName = src.matrixName;
88  }
89 
90  return *this;
91 }// end of operator=
92 //----------------------------------------------------------------------------------------------------------------------
93 
94 /**
95  * Set all values for the record.
96  */
99  const bool loadData,
100  const bool checkpoint,
102 {
103  this->matrixPtr = nullptr;
104  this->matrixType = matrixType;
105  this->dimensionSizes = dimensionSizes;
106  this->loadData = loadData;
107  this->checkpoint = checkpoint;
108  this->matrixName = matrixName;
109 }// end of set
110 //----------------------------------------------------------------------------------------------------------------------
111 
112 //--------------------------------------------------------------------------------------------------------------------//
113 //------------------------------------------------ Protected methods -------------------------------------------------//
114 //--------------------------------------------------------------------------------------------------------------------//
115 
116 //--------------------------------------------------------------------------------------------------------------------//
117 //------------------------------------------------- Private methods --------------------------------------------------//
118 //--------------------------------------------------------------------------------------------------------------------//
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 =
The header file containing metadata about matrices stored in the matrix container.
MatrixType
All possible types of the matrix.
Definition: MatrixRecord.h:53
const std::string MatrixName
Datatype for matrix names.
Definition: MatrixNames.h:39
Structure with 4D dimension sizes (3 in space and 1 in time).
void set(const MatrixType matrixType, const DimensionSizes dimensionSizes, const bool loadData, const bool checkpoint, MatrixName &matrixName)
Set all values for the record.
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