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

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Parameters.h
Go to the documentation of this file.
1 /**
2 * @file Parameters.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 the parameters of the simulation.
10 *
11 * @version kspaceFirstOrder3D 3.4
12 *
13 * @date 08 December 2011, 16:34 (created) \n
14 * 25 July 2016, 15:08 (revised)
15 *
16 * @section License
17 * This file is part of the C++ extension of the k-Wave Toolbox
18 * (http://www.k-wave.org).\n Copyright (C) 2016 Jiri Jaros and Bradley Treeby.
19 *
20 * This file is part of the k-Wave. k-Wave is free software: you can redistribute it and/or modify
21 * it under the terms of the GNU Lesser General Public License as published by the Free Software
22 * Foundation, either version 3 of the 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
25 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
26 * General Public License for 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/.
30 */
31
32 #ifndef PARAMETERS_H
33 #define PARAMETERS_H
34
35 #include <string>
36
37 #include <Parameters/CUDAParameters.h>
38 #include <Parameters/CommandLineParameters.h>
39 #include <Utils/DimensionSizes.h>
40 #include <HDF5/HDF5_File.h>
41
42 /**
43 * @class TParameters
44 * @brief Class storing all parameters of the simulation.
45 * @brief Class storing all parameters of the simulation.
46 * @warning This is a singleton class.
47 *
48 */
49 class TParameters
50 {
51 public:
52
53 /**
54 * @enum TSensorMaskType
55 * @brief Sensor mask type (linear indices or cuboid corners).
56 * @details Sensor mask type (linear indices or cuboid corners).
57 */
58 enum TSensorMaskType {INDEX = 0, CORNERS = 1};
59
60 /// Get instance of the singleton class
61 static TParameters& GetInstance();
62
63 /// Destructor.
64 virtual ~TParameters();
65
66 /// Parse command line and read scalar values to init the class.
67 void Init(int argc, char** argv);
68
69 /// Select cuda device for execution.
70 void SelectDevice();
71
72 /// Print the simulation setup (all parameters)
73 void PrintSimulatoinSetup();
74
75 /// Get class with CUDA Parameters (runtime setup), cosnt version
76 const TCUDAParameters& GetCudaParameters() const {return cudaParameters;};
77 /// Get class with CUDA Parameters (runtime setup)
78 TCUDAParameters& GetCudaParameters() {return cudaParameters;};
79
80 /// Get input file handle
81 THDF5_File& GetInputFile() {return inputFile;};
82 /// Get output file handle
83 THDF5_File& GetOutputFile() {return outputFile;};
84 /// Gest checkpoint file handle
85 THDF5_File& GetCheckpointFile() {return checkpointFile;};
86 /// Get File header handle
87 THDF5_FileHeader& GetFileHeader() {return fileHeader;};
88
89 /// Read scalar values from the input HDF5 file.
90 void ReadScalarsFromInputFile(THDF5_File& inputFile);
91 /// Save scalar values into the output HDF5 file
92 void SaveScalarsToFile(THDF5_File& outputFile);
93
94 /// Full dimension sizes of the simulation (real classes).
95 TDimensionSizes GetFullDimensionSizes() const {return fullDimensionSizes; };
96 /// Reduced dimension sizes of the simulation (complex classes).
97 TDimensionSizes GetReducedDimensionSizes() const {return reducedDimensionSizes;};
98
99 /// Get Nt value.
100 size_t Get_nt() const {return nt;};
101 /// Get simulation time step.
102 size_t Get_t_index() const {return t_index;};
103 /// Set simulation time step - should be used only when recovering from checkpoint
104 void Set_t_index(const size_t new_t_index) {t_index = new_t_index;};
105 /// Increment simulation time step.
106 void Increment_t_index() {t_index++;};
107
108 /// Get dt value.
109 float Get_dt() const {return dt;};
110 /// Get dx value.
111 float Get_dx() const {return dx;};
112 /// Get dy value.
113 float Get_dy() const {return dy;};
114 /// Get dz value.
115 float Get_dz() const {return dz;};
116
117 /// Get c_ref value.
118 float Get_c_ref() const {return c_ref;};
119 /// Get alpha_power value.
120 float Get_alpha_power() const {return alpha_power; };
121
122 /// Get pml_x_size value.
123 size_t Get_pml_x_size() const {return pml_x_size;};
124 /// Get pml_y_size value.
125 size_t Get_pml_y_size() const {return pml_y_size;};
126 /// Get pml_z_size value.
127 size_t Get_pml_z_size() const {return pml_z_size;};
128
129 /// Get pml_x_alpha_size value.
130 float Get_pml_x_alpha_size() const {return pml_x_alpha;};
131 /// Get pml_y_alpha_size value.
132 float Get_pml_y_alpha_size() const {return pml_y_alpha;};
133 /// Get pml_z_alpha_size value.
134 float Get_pml_z_alpha_size() const {return pml_z_alpha;};
135
136 /// Get ux_source_flag value.
137 size_t Get_ux_source_flag() const {return ux_source_flag;};
138 /// Get uy_source_flag value.
139 size_t Get_uy_source_flag() const {return uy_source_flag;};
140 /// Get uz_source_flag value.
141 size_t Get_uz_source_flag() const {return uz_source_flag;};
142 /// Get u_source_many value.
143 size_t Get_u_source_many() const {return u_source_many;};
144 /// Get ux_source_mode value.
145 size_t Get_u_source_mode() const {return u_source_mode;};
146
147 /// Get p_source_flag value.
148 size_t Get_p_source_flag() const {return p_source_flag; };
149 /// Get p0_source_flag value.
150 size_t Get_p0_source_flag() const {return p0_source_flag;};
151 /// Get p_source_many value.
152 size_t Get_p_source_many() const {return p_source_many;};
153 /// Get p_source_mode value.
154 size_t Get_p_source_mode() const {return p_source_mode;};
155
156 /// Get nonuniform_grid_flag value.
157 size_t Get_nonuniform_grid_flag() const { return nonuniform_grid_flag;};
158 /// Get absorbing_flag value.
159 size_t Get_absorbing_flag() const { return absorbing_flag; };
160 /// Get nonlinear_flag value.
161 size_t Get_nonlinear_flag() const { return nonlinear_flag; };
162 /// Get transducer_source_flag value.
163 size_t Get_transducer_source_flag() const {return transducer_source_flag;};
164
165 /// Get sensor mask type (linear or corners).
166 TSensorMaskType Get_sensor_mask_type() const {return sensor_mask_type;};
167 /// Get sensor_mask_index_size value.
168 size_t Get_sensor_mask_index_size() const {return sensor_mask_ind_size;}
169 /// Get number of cubes in the mask.
170 size_t Get_sensor_mask_corners_size() const {return sensor_mask_corners_size;};
171
172 /// Get u_source_index_size value.
173 size_t Get_u_source_index_size() const { return u_source_index_size;}
174 /// Get p_source_index_size value.
175 size_t Get_p_source_index_size() const { return p_source_index_size;}
176 /// Get transducer_source_input_size value.
177 size_t Get_transducer_source_input_size() const { return transducer_source_input_size;}
178
179 /// Get alpha_coeff_scalar_flag value.
180 bool Get_alpha_coeff_scalar_flag() const { return alpha_coeff_scalar_flag;};
181 /// Get alpha_coeff_scalar value. Note: cannot be const because of other optimizations.
182 float& Get_alpha_coeff_scalar() { return alpha_coeff_scalar; }
183
184 /// Get c0_scalar_flag value.
185 bool Get_c0_scalar_flag() const {return c0_scalar_flag; };
186 /// Get c0_scalar value.
187 float& Get_c0_scalar() {return c0_scalar; };
188
189 /// Get absorb_eta_scalar value.
190 float & Get_absorb_eta_scalar() {return absorb_eta_scalar; };
191 /// Get absorb_tau_scalar value.
192 float & Get_absorb_tau_scalar() {return absorb_tau_scalar; };
193
194 /// Get BonA_scalar_flag value.
195 bool Get_BonA_scalar_flag() const { return BonA_scalar_flag; };
196 /// Get BonA_scalar value.
197 float& Get_BonA_scalar() { return BonA_scalar; };
198
199 /// Get rho0_scalar_flag value.
200 bool Get_rho0_scalar_flag() const {return rho0_scalar_flag; };
201 /// Get rho0_scalar value.
202 float& Get_rho0_scalar() {return rho0_scalar; };
203 /// Get rho0_sgx_scalar value.
204 float& Get_rho0_sgx_scalar() {return rho0_sgx_scalar; };
205 /// Get rho0_sgy_scalar value.
206 float& Get_rho0_sgy_scalar() {return rho0_sgy_scalar; };
207 /// Get rho0_sgz_scalar value.
208 float& Get_rho0_sgz_scalar() {return rho0_sgz_scalar; };
209
210 /// Get input file name.
211 std::string GetInputFileName() const {return commandLineParameters.GetInputFileName();};
212 /// Get output file name.
213 std::string GetOutputFileName() const {return commandLineParameters.GetOutputFileName();};
214 /// Get checkpoint filename.
215 std::string GetCheckpointFileName() const {return commandLineParameters.GetCheckpointFileName();};
216
217 /// Get compression level.
218 size_t GetCompressionLevel() const {return commandLineParameters.GetCompressionLevel();};
219 /// Get number of threads.
220 size_t GetNumberOfThreads() const {return commandLineParameters.GetNumberOfThreads();};
221 /// Get progress print interval.
222 size_t GetProgressPrintInterval() const {return commandLineParameters.GetProgressPrintInterval();};
223
224 /// Get start time index for sensor recording.
225 size_t GetStartTimeIndex() const {return commandLineParameters.GetStartTimeIndex();};
226
227 /// Is checkpoint enabled?
228 bool IsCheckpointEnabled() const {return commandLineParameters.IsCheckpointEnabled();};
229 /// Get checkpoint interval.
230 size_t GetCheckpointInterval() const {return commandLineParameters.GetCheckpointInterval();};
231
232 /// Is --version specified at the command line?
233 bool IsVersion() const {return commandLineParameters.IsVersion();};
234 /// Is -p or --p_raw specified at the command line?
235 bool IsStore_p_raw() const {return commandLineParameters.IsStore_p_raw();};
236 /// Is --p_rms specified at the command line?
237 bool IsStore_p_rms() const {return commandLineParameters.IsStore_p_rms();};
238 /// Is --p_max specified at the command line?
239 bool IsStore_p_max() const {return commandLineParameters.IsStore_p_max();};
240 /// Is --p_min specified at the command line?
241 bool IsStore_p_min() const {return commandLineParameters.IsStore_p_min();};
242 /// Is --p_max_all specified at the command line?
243 bool IsStore_p_max_all() const {return commandLineParameters.IsStore_p_max_all();};
244 /// Is --p_min_all specified at the command line?
245 bool IsStore_p_min_all() const {return commandLineParameters.IsStore_p_min_all();};
246 /// Is --p_final specified at the command line?
247 bool IsStore_p_final() const {return commandLineParameters.IsStore_p_final();};
248
249 /// Is -u or --u_raw specified at the command line?
250 bool IsStore_u_raw() const {return commandLineParameters.IsStore_u_raw();};
251 /// Is --u_non_staggered_raw set?
252 bool IsStore_u_non_staggered_raw() const {return commandLineParameters.IsStore_u_non_staggered_raw();};
253 /// Is --u_raw specified at the command line?
254 bool IsStore_u_rms() const {return commandLineParameters.IsStore_u_rms();};
255 /// Is --u_max specified at the command line?
256 bool IsStore_u_max() const {return commandLineParameters.IsStore_u_max();};
257 /// Is --u_min specified at the command line?
258 bool IsStore_u_min() const {return commandLineParameters.IsStore_u_min();};
259 /// Is --u_max_all specified at the command line?
260 bool IsStore_u_max_all() const {return commandLineParameters.IsStore_u_max_all();};
261 /// Is --u_min_all specified at the command line?
262 bool IsStore_u_min_all() const {return commandLineParameters.IsStore_u_min_all();};
263 /// Is --u_final specified at the command line
264 bool IsStore_u_final() const {return commandLineParameters.IsStore_u_final();};
265
266 /// is --copy_mask set
267 bool IsCopySensorMask() const {return commandLineParameters.IsCopySensorMask();};
268
269 /// Get Git hash of the code
270 std::string GetGitHash() const;
271
272 protected:
273 /// Constructor.
274 TParameters();
275 /// Copy constructor,
276 TParameters(const TParameters& orig);
277
278 private:
279 /// Class with CUDA Parameters (runtime setup)
280 TCUDAParameters cudaParameters;
281 /// Class with command line parameters
282 TCommandLineParameters commandLineParameters;
283
284 /// Handle to the input HDF5 file.
285 THDF5_File inputFile;
286 /// Handle to the output HDF5 file.
287 THDF5_File outputFile;
288 /// Handle to the checkpoint HDF5 file.
289 THDF5_File checkpointFile;
290
291 /// Handle to file header.
292 THDF5_FileHeader fileHeader;
293
294 /// Nt value.
295 size_t nt;
296 /// actual time index (time step of the simulation).
297 size_t t_index;
298
299 /// dt value.
300 float dt;
301 /// dx value.
302 float dx;
303 /// dy value.
304 float dy;
305 /// dz value.
306 float dz;
307
308 /// c_ref value.
309 float c_ref;
310 /// alpha_power value.
311 float alpha_power;
312
313 /// Full 3D dimension sizes.
314 TDimensionSizes fullDimensionSizes;
315 /// Reduced 3D dimension sizes.
316 TDimensionSizes reducedDimensionSizes;
317
318 /// sensor mask type (0 = index, 1 = corners).
319 TSensorMaskType sensor_mask_type;
320 /// sensor_mask_ind_size value.
321 size_t sensor_mask_ind_size;
322 /// sensor_mask_corners_size - how many cuboids are in the mask.
323 size_t sensor_mask_corners_size;
324
325 /// u_source_index_size value.
326 size_t u_source_index_size;
327 /// p_source_index_size value.
328 size_t p_source_index_size;
329 /// transducer_source_input_size value.
330 size_t transducer_source_input_size;
331
332 /// ux_source_flag value.
333 size_t ux_source_flag;
334 /// uy_source_flag value.
335 size_t uy_source_flag;
336 /// uz_source_flag value.
337 size_t uz_source_flag;
338
339 /// p_source_flag value.
340 size_t p_source_flag;
341 /// p0_source_flag value.
342 size_t p0_source_flag;
343 /// transducer_source_flag value.
344 size_t transducer_source_flag;
345
346 /// u_source_many value.
347 size_t u_source_many;
348 /// u_source_mode value.
349 size_t u_source_mode;
350
351 /// p_source_mode value.
352 size_t p_source_mode;
353 /// p_source_many value.
354 size_t p_source_many;
355
356 /// nonuniform_grid_flag value.
357 size_t nonuniform_grid_flag;
358 /// absorbing_flag value.
359 size_t absorbing_flag;
360 /// nonlinear_flag value.
361 size_t nonlinear_flag;
362
363 /// pml_x_size value.
364 size_t pml_x_size;
365 /// pml_y_size value.
366 size_t pml_y_size;
367 /// pml_z_size value.
368 size_t pml_z_size;
369
370 /// pml_x_alpha value.
371 float pml_x_alpha;
372 /// pml_y_alpha value.
373 float pml_y_alpha;
374 /// pml_z_alpha value.
375 float pml_z_alpha;
376
377 /// alpha_coeff_scalar_flag value.
378 bool alpha_coeff_scalar_flag;
379 /// alpha_coeff_scalar value.
380 float alpha_coeff_scalar;
381
382 /// c0_scalar_flag value.
383 bool c0_scalar_flag;
384 /// c0_scalar value.
385 float c0_scalar;
386
387 /// absorb_eta_scalar value.
388 float absorb_eta_scalar;
389 /// absorb_tau_scalar value.
390 float absorb_tau_scalar;
391
392 /// BonA_scalar_flag value.
393 bool BonA_scalar_flag;
394 /// BonA_scalar value.
395 float BonA_scalar;
396
397 /// rho0_scalar_flag value.
398 bool rho0_scalar_flag;
399 /// rho0_scalar value.
400 float rho0_scalar;
401 /// rho0_sgx_scalar value.
402 float rho0_sgx_scalar;
403 /// rho0_sgy_scalar value.
404 float rho0_sgy_scalar;
405 /// rho0_sgz_scalar value.
406 float rho0_sgz_scalar;
407
408 /// singleton flag
409 static bool parametersInstanceFlag;
410 /// singleton instance
411 static TParameters* parametersSingleInstance;
412
413 private:
414
415 };// end of TParameters
416 //--------------------------------------------------------------------------------------------------
417
418 #endif /* PARAMETERS_H */
THDF5_FileHeader
Class for HDF5 header.
Definition: HDF5_File.h:730
TParameters::GetReducedDimensionSizes
TDimensionSizes GetReducedDimensionSizes() const
Reduced dimension sizes of the simulation (complex classes).
Definition: Parameters.h:97
TParameters::GetCheckpointFileName
std::string GetCheckpointFileName() const
Get checkpoint filename.
Definition: Parameters.h:215
TParameters::Get_c0_scalar
float & Get_c0_scalar()
Get c0_scalar value.
Definition: Parameters.h:187
TCommandLineParameters::GetNumberOfThreads
size_t GetNumberOfThreads() const
Get number of threads.
Definition: CommandLineParameters.h:242
TParameters::Get_dz
float Get_dz() const
Get dz value.
Definition: Parameters.h:115
TParameters::transducer_source_flag
size_t transducer_source_flag
transducer_source_flag value.
Definition: Parameters.h:344
TParameters::Get_sensor_mask_index_size
size_t Get_sensor_mask_index_size() const
Get sensor_mask_index_size value.
Definition: Parameters.h:168
TParameters::cudaParameters
TCUDAParameters cudaParameters
Class with CUDA Parameters (runtime setup)
Definition: Parameters.h:280
TCommandLineParameters::IsStore_u_rms
bool IsStore_u_rms() const
Is –u_rms set?
Definition: CommandLineParameters.h:273
TParameters::parametersInstanceFlag
static bool parametersInstanceFlag
singleton flag
Definition: Parameters.h:409
TParameters::Get_u_source_index_size
size_t Get_u_source_index_size() const
Get u_source_index_size value.
Definition: Parameters.h:173
TParameters::GetProgressPrintInterval
size_t GetProgressPrintInterval() const
Get progress print interval.
Definition: Parameters.h:222
TParameters::transducer_source_input_size
size_t transducer_source_input_size
transducer_source_input_size value.
Definition: Parameters.h:330
TParameters::TSensorMaskType
TSensorMaskType
Sensor mask type (linear indices or cuboid corners).
Definition: Parameters.h:58
TParameters::GetStartTimeIndex
size_t GetStartTimeIndex() const
Get start time index for sensor recording.
Definition: Parameters.h:225
TCommandLineParameters::GetCheckpointFileName
const std::string & GetCheckpointFileName() const
Get Checkpoint file name.
Definition: CommandLineParameters.h:227
TCommandLineParameters::IsStore_p_max
bool IsStore_p_max() const
Is –p_max set?
Definition: CommandLineParameters.h:258
TParameters::Get_pml_z_size
size_t Get_pml_z_size() const
Get pml_z_size value.
Definition: Parameters.h:127
TParameters::c_ref
float c_ref
c_ref value.
Definition: Parameters.h:309
TParameters::BonA_scalar_flag
bool BonA_scalar_flag
BonA_scalar_flag value.
Definition: Parameters.h:393
TParameters::Get_c_ref
float Get_c_ref() const
Get c_ref value.
Definition: Parameters.h:118
TParameters::p_source_flag
size_t p_source_flag
p_source_flag value.
Definition: Parameters.h:340
TParameters::GetNumberOfThreads
size_t GetNumberOfThreads() const
Get number of threads.
Definition: Parameters.h:220
TCommandLineParameters::IsStore_p_min_all
bool IsStore_p_min_all() const
Is –p_min_all set?
Definition: CommandLineParameters.h:264
TCommandLineParameters::IsStore_p_rms
bool IsStore_p_rms() const
Is –p_rms set?
Definition: CommandLineParameters.h:256
TParameters::Get_BonA_scalar
float & Get_BonA_scalar()
Get BonA_scalar value.
Definition: Parameters.h:197
TParameters::ReadScalarsFromInputFile
void ReadScalarsFromInputFile(THDF5_File &inputFile)
Read scalar values from the input HDF5 file.
Definition: Parameters.cpp:207
TCommandLineParameters::GetOutputFileName
const std::string & GetOutputFileName() const
Get output file name.
Definition: CommandLineParameters.h:225
TParameters::u_source_mode
size_t u_source_mode
u_source_mode value.
Definition: Parameters.h:349
TCommandLineParameters::IsStore_p_final
bool IsStore_p_final() const
Is –p_final set?
Definition: CommandLineParameters.h:266
TParameters::ux_source_flag
size_t ux_source_flag
ux_source_flag value.
Definition: Parameters.h:333
TCommandLineParameters::GetInputFileName
const std::string & GetInputFileName() const
Get input file name.
Definition: CommandLineParameters.h:223
TParameters::alpha_coeff_scalar_flag
bool alpha_coeff_scalar_flag
alpha_coeff_scalar_flag value.
Definition: Parameters.h:378
CUDAParameters.h
The header file for the class for setting CUDA kernel parameters.
TCommandLineParameters::GetCheckpointInterval
size_t GetCheckpointInterval() const
Get checkpoint interval.
Definition: CommandLineParameters.h:251
TParameters::pml_x_alpha
float pml_x_alpha
pml_x_alpha value.
Definition: Parameters.h:371
TParameters::Get_ux_source_flag
size_t Get_ux_source_flag() const
Get ux_source_flag value.
Definition: Parameters.h:137
TParameters::IsStore_u_min
bool IsStore_u_min() const
Is –u_min specified at the command line?
Definition: Parameters.h:258
TParameters::reducedDimensionSizes
TDimensionSizes reducedDimensionSizes
Reduced 3D dimension sizes.
Definition: Parameters.h:316
TParameters::GetInstance
static TParameters & GetInstance()
Get instance of the singleton class.
Definition: Parameters.cpp:70
TParameters::IsVersion
bool IsVersion() const
Is –version specified at the command line?
Definition: Parameters.h:233
TParameters::IsStore_u_raw
bool IsStore_u_raw() const
Is -u or –u_raw specified at the command line?
Definition: Parameters.h:250
TParameters::absorb_eta_scalar
float absorb_eta_scalar
absorb_eta_scalar value.
Definition: Parameters.h:388
TParameters::Set_t_index
void Set_t_index(const size_t new_t_index)
Set simulation time step - should be used only when recovering from checkpoint.
Definition: Parameters.h:104
TParameters::c0_scalar_flag
bool c0_scalar_flag
c0_scalar_flag value.
Definition: Parameters.h:383
TParameters::Get_sensor_mask_corners_size
size_t Get_sensor_mask_corners_size() const
Get number of cubes in the mask.
Definition: Parameters.h:170
TParameters::nonlinear_flag
size_t nonlinear_flag
nonlinear_flag value.
Definition: Parameters.h:361
TParameters::p_source_mode
size_t p_source_mode
p_source_mode value.
Definition: Parameters.h:352
TParameters::GetCudaParameters
TCUDAParameters & GetCudaParameters()
Get class with CUDA Parameters (runtime setup)
Definition: Parameters.h:78
TParameters::GetInputFileName
std::string GetInputFileName() const
Get input file name.
Definition: Parameters.h:211
TParameters::u_source_index_size
size_t u_source_index_size
u_source_index_size value.
Definition: Parameters.h:326
TParameters::dz
float dz
dz value.
Definition: Parameters.h:306
TParameters::pml_z_alpha
float pml_z_alpha
pml_z_alpha value.
Definition: Parameters.h:375
TParameters::Get_c0_scalar_flag
bool Get_c0_scalar_flag() const
Get c0_scalar_flag value.
Definition: Parameters.h:185
TCommandLineParameters::IsStore_u_non_staggered_raw
bool IsStore_u_non_staggered_raw() const
Is –u_non_staggered_raw set?
Definition: CommandLineParameters.h:271
TParameters::BonA_scalar
float BonA_scalar
BonA_scalar value.
Definition: Parameters.h:395
HDF5_File.h
The header file containing the HDF5 related classes.
TCommandLineParameters::IsStore_p_min
bool IsStore_p_min() const
Is –p_min set?
Definition: CommandLineParameters.h:260
TParameters::alpha_power
float alpha_power
alpha_power value.
Definition: Parameters.h:311
TParameters::parametersSingleInstance
static TParameters * parametersSingleInstance
singleton instance
Definition: Parameters.h:411
TParameters::Get_u_source_many
size_t Get_u_source_many() const
Get u_source_many value.
Definition: Parameters.h:143
TParameters::Get_BonA_scalar_flag
bool Get_BonA_scalar_flag() const
Get BonA_scalar_flag value.
Definition: Parameters.h:195
TParameters::nonuniform_grid_flag
size_t nonuniform_grid_flag
nonuniform_grid_flag value.
Definition: Parameters.h:357
TParameters::dt
float dt
dt value.
Definition: Parameters.h:300
TParameters::uz_source_flag
size_t uz_source_flag
uz_source_flag value.
Definition: Parameters.h:337
TCommandLineParameters::IsStore_u_max
bool IsStore_u_max() const
Is –u_max set?
Definition: CommandLineParameters.h:275
TParameters::inputFile
THDF5_File inputFile
Handle to the input HDF5 file.
Definition: Parameters.h:285
TCommandLineParameters::IsCheckpointEnabled
bool IsCheckpointEnabled() const
Is checkpoint enabled?
Definition: CommandLineParameters.h:249
TParameters::Get_alpha_coeff_scalar_flag
bool Get_alpha_coeff_scalar_flag() const
Get alpha_coeff_scalar_flag value.
Definition: Parameters.h:180
TCUDAParameters
Class responsible for CUDA runtime setup.
Definition: CUDAParameters.h:48
TParameters::pml_y_alpha
float pml_y_alpha
pml_y_alpha value.
Definition: Parameters.h:373
TParameters::absorbing_flag
size_t absorbing_flag
absorbing_flag value.
Definition: Parameters.h:359
TParameters::IsStore_u_rms
bool IsStore_u_rms() const
Is –u_raw specified at the command line?
Definition: Parameters.h:254
TParameters::Get_t_index
size_t Get_t_index() const
Get simulation time step.
Definition: Parameters.h:102
TCommandLineParameters::GetProgressPrintInterval
size_t GetProgressPrintInterval() const
Get progress print interval.
Definition: CommandLineParameters.h:244
TParameters::~TParameters
virtual ~TParameters()
Destructor.
Definition: Parameters.cpp:88
TParameters::GetFullDimensionSizes
TDimensionSizes GetFullDimensionSizes() const
Full dimension sizes of the simulation (real classes).
Definition: Parameters.h:95
TParameters::IsStore_p_raw
bool IsStore_p_raw() const
Is -p or –p_raw specified at the command line?
Definition: Parameters.h:235
TParameters::outputFile
THDF5_File outputFile
Handle to the output HDF5 file.
Definition: Parameters.h:287
TParameters::IsStore_p_rms
bool IsStore_p_rms() const
Is –p_rms specified at the command line?
Definition: Parameters.h:237
TParameters::TParameters
TParameters()
Constructor.
Definition: Parameters.cpp:533
TParameters::IsStore_p_min_all
bool IsStore_p_min_all() const
Is –p_min_all specified at the command line?
Definition: Parameters.h:245
TParameters::IsStore_p_min
bool IsStore_p_min() const
Is –p_min specified at the command line?
Definition: Parameters.h:241
TParameters::sensor_mask_ind_size
size_t sensor_mask_ind_size
sensor_mask_ind_size value.
Definition: Parameters.h:321
TParameters::c0_scalar
float c0_scalar
c0_scalar value.
Definition: Parameters.h:385
TParameters::sensor_mask_corners_size
size_t sensor_mask_corners_size
sensor_mask_corners_size - how many cuboids are in the mask.
Definition: Parameters.h:323
TParameters::SelectDevice
void SelectDevice()
Select cuda device for execution.
Definition: Parameters.cpp:144
TParameters::IsStore_u_non_staggered_raw
bool IsStore_u_non_staggered_raw() const
Is –u_non_staggered_raw set?
Definition: Parameters.h:252
TParameters::IsStore_u_min_all
bool IsStore_u_min_all() const
Is –u_min_all specified at the command line?
Definition: Parameters.h:262
TParameters::Get_pml_x_size
size_t Get_pml_x_size() const
Get pml_x_size value.
Definition: Parameters.h:123
TParameters::Get_pml_z_alpha_size
float Get_pml_z_alpha_size() const
Get pml_z_alpha_size value.
Definition: Parameters.h:134
TParameters::dx
float dx
dx value.
Definition: Parameters.h:302
TParameters
Class storing all parameters of the simulation.
Definition: Parameters.h:49
TParameters::nt
size_t nt
Nt value.
Definition: Parameters.h:295
TParameters::Get_uy_source_flag
size_t Get_uy_source_flag() const
Get uy_source_flag value.
Definition: Parameters.h:139
TParameters::GetCudaParameters
const TCUDAParameters & GetCudaParameters() const
Get class with CUDA Parameters (runtime setup), cosnt version.
Definition: Parameters.h:76
TParameters::Get_p_source_mode
size_t Get_p_source_mode() const
Get p_source_mode value.
Definition: Parameters.h:154
TParameters::PrintSimulatoinSetup
void PrintSimulatoinSetup()
Print the simulation setup (all parameters)
Definition: Parameters.cpp:167
TParameters::GetFileHeader
THDF5_FileHeader & GetFileHeader()
Get File header handle.
Definition: Parameters.h:87
TParameters::rho0_sgz_scalar
float rho0_sgz_scalar
rho0_sgz_scalar value.
Definition: Parameters.h:406
TParameters::uy_source_flag
size_t uy_source_flag
uy_source_flag value.
Definition: Parameters.h:335
TParameters::GetCheckpointFile
THDF5_File & GetCheckpointFile()
Gest checkpoint file handle.
Definition: Parameters.h:85
TParameters::IsStore_p_final
bool IsStore_p_final() const
Is –p_final specified at the command line?
Definition: Parameters.h:247
TParameters::Get_p_source_many
size_t Get_p_source_many() const
Get p_source_many value.
Definition: Parameters.h:152
TParameters::Get_p0_source_flag
size_t Get_p0_source_flag() const
Get p0_source_flag value.
Definition: Parameters.h:150
TParameters::Get_dt
float Get_dt() const
Get dt value.
Definition: Parameters.h:109
TParameters::Get_dx
float Get_dx() const
Get dx value.
Definition: Parameters.h:111
DimensionSizes.h
The header file containing the structure with 3D dimension sizes.
TCommandLineParameters::IsStore_u_final
bool IsStore_u_final() const
Is –u_final set?
Definition: CommandLineParameters.h:283
TParameters::Get_dy
float Get_dy() const
Get dy value.
Definition: Parameters.h:113
TParameters::t_index
size_t t_index
actual time index (time step of the simulation).
Definition: Parameters.h:297
TParameters::Get_nonlinear_flag
size_t Get_nonlinear_flag() const
Get nonlinear_flag value.
Definition: Parameters.h:161
TParameters::Get_absorb_eta_scalar
float & Get_absorb_eta_scalar()
Get absorb_eta_scalar value.
Definition: Parameters.h:190
TParameters::pml_x_size
size_t pml_x_size
pml_x_size value.
Definition: Parameters.h:364
TParameters::Get_rho0_sgy_scalar
float & Get_rho0_sgy_scalar()
Get rho0_sgy_scalar value.
Definition: Parameters.h:206
TParameters::Get_rho0_scalar
float & Get_rho0_scalar()
Get rho0_scalar value.
Definition: Parameters.h:202
TCommandLineParameters::IsStore_u_min_all
bool IsStore_u_min_all() const
Is –u_min set?
Definition: CommandLineParameters.h:281
TParameters::dy
float dy
dy value.
Definition: Parameters.h:304
TParameters::Get_uz_source_flag
size_t Get_uz_source_flag() const
Get uz_source_flag value.
Definition: Parameters.h:141
TParameters::IsStore_p_max_all
bool IsStore_p_max_all() const
Is –p_max_all specified at the command line?
Definition: Parameters.h:243
TParameters::SaveScalarsToFile
void SaveScalarsToFile(THDF5_File &outputFile)
Save scalar values into the output HDF5 file.
Definition: Parameters.cpp:432
TParameters::fileHeader
THDF5_FileHeader fileHeader
Handle to file header.
Definition: Parameters.h:292
TParameters::Get_pml_y_size
size_t Get_pml_y_size() const
Get pml_y_size value.
Definition: Parameters.h:125
TParameters::Get_pml_x_alpha_size
float Get_pml_x_alpha_size() const
Get pml_x_alpha_size value.
Definition: Parameters.h:130
TParameters::Get_transducer_source_input_size
size_t Get_transducer_source_input_size() const
Get transducer_source_input_size value.
Definition: Parameters.h:177
TParameters::p0_source_flag
size_t p0_source_flag
p0_source_flag value.
Definition: Parameters.h:342
TParameters::Get_pml_y_alpha_size
float Get_pml_y_alpha_size() const
Get pml_y_alpha_size value.
Definition: Parameters.h:132
TCommandLineParameters::GetCompressionLevel
size_t GetCompressionLevel() const
Get compression level.
Definition: CommandLineParameters.h:240
TParameters::Init
void Init(int argc, char **argv)
Parse command line and read scalar values to init the class.
Definition: Parameters.cpp:106
TParameters::pml_z_size
size_t pml_z_size
pml_z_size value.
Definition: Parameters.h:368
TCommandLineParameters
The class to parse and store command line parameters.
Definition: CommandLineParameters.h:213
TParameters::rho0_scalar
float rho0_scalar
rho0_scalar value.
Definition: Parameters.h:400
TParameters::Get_p_source_flag
size_t Get_p_source_flag() const
Get p_source_flag value.
Definition: Parameters.h:148
TParameters::rho0_sgx_scalar
float rho0_sgx_scalar
rho0_sgx_scalar value.
Definition: Parameters.h:402
TParameters::sensor_mask_type
TSensorMaskType sensor_mask_type
sensor mask type (0 = index, 1 = corners).
Definition: Parameters.h:319
TParameters::Get_transducer_source_flag
size_t Get_transducer_source_flag() const
Get transducer_source_flag value.
Definition: Parameters.h:163
TCommandLineParameters::IsStore_u_min
bool IsStore_u_min() const
Is –u_min set?
Definition: CommandLineParameters.h:277
TCommandLineParameters::IsCopySensorMask
bool IsCopySensorMask() const
Is –copy_mask set set?
Definition: CommandLineParameters.h:286
TParameters::GetCompressionLevel
size_t GetCompressionLevel() const
Get compression level.
Definition: Parameters.h:218
TParameters::p_source_index_size
size_t p_source_index_size
p_source_index_size value.
Definition: Parameters.h:328
TParameters::rho0_scalar_flag
bool rho0_scalar_flag
rho0_scalar_flag value.
Definition: Parameters.h:398
TParameters::checkpointFile
THDF5_File checkpointFile
Handle to the checkpoint HDF5 file.
Definition: Parameters.h:289
TParameters::IsStore_u_max
bool IsStore_u_max() const
Is –u_max specified at the command line?
Definition: Parameters.h:256
TParameters::IsStore_u_final
bool IsStore_u_final() const
Is –u_final specified at the command line.
Definition: Parameters.h:264
TParameters::IsStore_u_max_all
bool IsStore_u_max_all() const
Is –u_max_all specified at the command line?
Definition: Parameters.h:260
TParameters::absorb_tau_scalar
float absorb_tau_scalar
absorb_tau_scalar value.
Definition: Parameters.h:390
TParameters::Get_u_source_mode
size_t Get_u_source_mode() const
Get ux_source_mode value.
Definition: Parameters.h:145
TParameters::IsStore_p_max
bool IsStore_p_max() const
Is –p_max specified at the command line?
Definition: Parameters.h:239
TCommandLineParameters::IsStore_u_raw
bool IsStore_u_raw() const
Is –u_raw set?
Definition: CommandLineParameters.h:269
TParameters::Get_p_source_index_size
size_t Get_p_source_index_size() const
Get p_source_index_size value.
Definition: Parameters.h:175
TParameters::Get_absorb_tau_scalar
float & Get_absorb_tau_scalar()
Get absorb_tau_scalar value.
Definition: Parameters.h:192
CommandLineParameters.h
The header file containing the command line parameters.
TParameters::Get_rho0_scalar_flag
bool Get_rho0_scalar_flag() const
Get rho0_scalar_flag value.
Definition: Parameters.h:200
TCommandLineParameters::IsStore_p_max_all
bool IsStore_p_max_all() const
Is –p_max_all set?
Definition: CommandLineParameters.h:262
TParameters::GetInputFile
THDF5_File & GetInputFile()
Get input file handle.
Definition: Parameters.h:81
TParameters::Get_alpha_coeff_scalar
float & Get_alpha_coeff_scalar()
Get alpha_coeff_scalar value. Note: cannot be const because of other optimizations.
Definition: Parameters.h:182
TParameters::Get_alpha_power
float Get_alpha_power() const
Get alpha_power value.
Definition: Parameters.h:120
TParameters::Get_absorbing_flag
size_t Get_absorbing_flag() const
Get absorbing_flag value.
Definition: Parameters.h:159
TParameters::commandLineParameters
TCommandLineParameters commandLineParameters
Class with command line parameters.
Definition: Parameters.h:282
TParameters::fullDimensionSizes
TDimensionSizes fullDimensionSizes
Full 3D dimension sizes.
Definition: Parameters.h:314
TParameters::p_source_many
size_t p_source_many
p_source_many value.
Definition: Parameters.h:354
TParameters::Get_nonuniform_grid_flag
size_t Get_nonuniform_grid_flag() const
Get nonuniform_grid_flag value.
Definition: Parameters.h:157
TParameters::u_source_many
size_t u_source_many
u_source_many value.
Definition: Parameters.h:347
TParameters::Increment_t_index
void Increment_t_index()
Increment simulation time step.
Definition: Parameters.h:106
TCommandLineParameters::IsVersion
bool IsVersion() const
Is –version flag set?
Definition: CommandLineParameters.h:235
TParameters::rho0_sgy_scalar
float rho0_sgy_scalar
rho0_sgy_scalar value.
Definition: Parameters.h:404
TParameters::pml_y_size
size_t pml_y_size
pml_y_size value.
Definition: Parameters.h:366
TCommandLineParameters::GetStartTimeIndex
size_t GetStartTimeIndex() const
Get start time index when sensor data collection begins.
Definition: CommandLineParameters.h:246
TParameters::Get_nt
size_t Get_nt() const
Get Nt value.
Definition: Parameters.h:100
TParameters::GetOutputFileName
std::string GetOutputFileName() const
Get output file name.
Definition: Parameters.h:213
TParameters::GetGitHash
std::string GetGitHash() const
Get Git hash of the code.
Definition: Parameters.cpp:513
TParameters::alpha_coeff_scalar
float alpha_coeff_scalar
alpha_coeff_scalar value.
Definition: Parameters.h:380
TParameters::Get_rho0_sgx_scalar
float & Get_rho0_sgx_scalar()
Get rho0_sgx_scalar value.
Definition: Parameters.h:204
TParameters::Get_sensor_mask_type
TSensorMaskType Get_sensor_mask_type() const
Get sensor mask type (linear or corners).
Definition: Parameters.h:166
TParameters::IsCopySensorMask
bool IsCopySensorMask() const
is –copy_mask set
Definition: Parameters.h:267
TParameters::IsCheckpointEnabled
bool IsCheckpointEnabled() const
Is checkpoint enabled?
Definition: Parameters.h:228
THDF5_File
Class wrapping the HDF5 routines.
Definition: HDF5_File.h:500
TCommandLineParameters::IsStore_u_max_all
bool IsStore_u_max_all() const
Is –u_max_all set?
Definition: CommandLineParameters.h:279
TDimensionSizes
Structure with 4D dimension sizes (3 in space and 1 in time).
Definition: DimensionSizes.h:66
TParameters::GetCheckpointInterval
size_t GetCheckpointInterval() const
Get checkpoint interval.
Definition: Parameters.h:230
TCommandLineParameters::IsStore_p_raw
bool IsStore_p_raw() const
Is –p_raw set?
Definition: CommandLineParameters.h:254
TParameters::GetOutputFile
THDF5_File & GetOutputFile()
Get output file handle.
Definition: Parameters.h:83
TParameters::Get_rho0_sgz_scalar
float & Get_rho0_sgz_scalar()
Get rho0_sgz_scalar value.
Definition: Parameters.h:208