| 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

- File List
- File Members

All Classes Files Functions Variables Typedefs Enumerations Friends Pages
Parameters.cpp
Go to the documentation of this file.
1 /**
2 * @file Parameters.cpp
3 * @author Jiri Jaros
4 * Faculty of Information Technology\n
5 * Brno University of Technology \n
6 * jarosjir@fit.vutbr.cz
7 *
8 * @brief The implementation file containing parameters of the simulation.
9 *
10 * @version kspaceFirstOrder3D 2.15
11 *
12 * @date 09 August 2012, 13:39 (created) \n
13 * 29 September 2014, 12:43 (revised)
14 *
15 * @section License
16 * This file is part of the C++ extension of the k-Wave Toolbox (http://www.k-wave.org).\n
17 * Copyright (C) 2014 Jiri Jaros and Bradley Treeby
18 *
19 * This file is part of k-Wave. k-Wave is free software: you can redistribute it
20 * and/or modify it under the terms of the GNU Lesser General Public License as
21 * published by the Free Software Foundation, either version 3 of the License,
22 * or (at your option) any later version.
23 *
24 * k-Wave is distributed in the hope that it will be useful, but
25 * WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27 * See the GNU Lesser General Public License for more details.
28 *
29 * You should have received a copy of the GNU Lesser General Public License
30 * along with k-Wave. If not, see <http://www.gnu.org/licenses/>.
31 */
32
33 #ifdef _OPENMP
34 #include <omp.h>
35 #endif
36
37 #include <iostream>
38 #include <string.h>
39 #include <sstream>
40 #include <exception>
41 #include <stdexcept>
42
43 #include <Parameters/Parameters.h>
44
45 #include <Utils/MatrixNames.h>
46 #include <Utils/ErrorMessages.h>
47
48 using namespace std;
49
50 //----------------------------------------------------------------------------//
51 // Constants //
52 //----------------------------------------------------------------------------//
53
54
55
56
57 //----------------------------------------------------------------------------//
58 // Definitions //
59 //----------------------------------------------------------------------------//
60
61 bool TParameters::ParametersInstanceFlag = false;
62
63 TParameters* TParameters::ParametersSingleInstance = NULL;
64
65
66 //----------------------------------------------------------------------------//
67 // Implementation //
68 // public methods //
69 //----------------------------------------------------------------------------//
70
71 /**
72 * Get instance of singleton class.
73 */
74 TParameters* TParameters::GetInstance()
75 {
76 if(!ParametersInstanceFlag)
77 {
78 ParametersSingleInstance = new TParameters();
79 ParametersInstanceFlag = true;
80 return ParametersSingleInstance;
81 }
82 else
83 {
84 return ParametersSingleInstance;
85 }
86 }// end of GetInstance
87 //------------------------------------------------------------------------------
88
89 /**
90 * Parse command line.
91 * @param [in] argc
92 * @param [in] argv
93 */
94 void TParameters::ParseCommandLine(int argc, char** argv)
95 {
96 CommandLinesParameters.ParseCommandLine(argc, argv);
97
98 if (CommandLinesParameters.IsVersion())
99 {
100 return;
101 }
102
103 ReadScalarsFromHDF5InputFile(HDF5_InputFile);
104
105 if (CommandLinesParameters.IsBenchmarkFlag())
106 {
107 Nt = CommandLinesParameters.GetBenchmarkTimeStepsCount();
108 }
109
110 if ((Nt <= (size_t) CommandLinesParameters.GetStartTimeIndex()) ||
111 ( 0 > CommandLinesParameters.GetStartTimeIndex()) )
112 {
113 fprintf(stderr,Parameters_ERR_FMT_Illegal_StartTime_value, (size_t) 1, Nt);
114 CommandLinesParameters.PrintUsageAndExit();
115 }
116 }// end of ParseCommandLine
117 //------------------------------------------------------------------------------
118
119
120 /**
121 * Read scalar values from the input HDF5 file.
122 *
123 * @param [in] HDF5_InputFile - Handle to an opened input file.
124 * @throw ios:failure if the file cannot be open or is of a wrong type or version.
125 */
126 void TParameters::ReadScalarsFromHDF5InputFile(THDF5_File & HDF5_InputFile)
127 {
128 TDimensionSizes ScalarSizes(1, 1, 1);
129
130 if (!HDF5_InputFile.IsOpened())
131 {
132 // Open file
133 try
134 {
135 HDF5_InputFile.Open(CommandLinesParameters.GetInputFileName().c_str());
136 }
137 catch (ios::failure e)
138 {
139 fprintf(stderr, "%s", e.what());
140 PrintUsageAndExit();
141 }
142 }
143
144 HDF5_FileHeader.ReadHeaderFromInputFile(HDF5_InputFile);
145
146 // check file type
147 if (HDF5_FileHeader.GetFileType() != THDF5_FileHeader::hdf5_ft_input)
148 {
149 char ErrorMessage[256] = "";
150 sprintf(ErrorMessage, Parameters_ERR_FMT_IncorrectInputFileFormat, GetInputFileName().c_str());
151 throw ios::failure(ErrorMessage);
152 }
153
154 // check version
155 if (!HDF5_FileHeader.CheckMajorFileVersion())
156 {
157 char ErrorMessage[256] = "";
158 sprintf(ErrorMessage, Parameters_ERR_FMT_IncorrectMajorHDF5FileVersion, GetInputFileName().c_str(),
159 HDF5_FileHeader.GetCurrentHDF5_MajorVersion().c_str());
160 throw ios::failure(ErrorMessage);
161 }
162
163 if (!HDF5_FileHeader.CheckMinorFileVersion())
164 {
165 char ErrorMessage[256] = "";
166 sprintf(ErrorMessage, Parameters_ERR_FMT_IncorrectMinorHDF5FileVersion, GetInputFileName().c_str(),
167 HDF5_FileHeader.GetCurrentHDF5_MinorVersion().c_str());
168 throw ios::failure(ErrorMessage);
169 }
170
171 const hid_t HDF5RootGroup = HDF5_InputFile.GetRootGroup();
172
173 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, Nt_Name, Nt);
174
175 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, dt_Name, dt);
176 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, dx_Name, dx);
177 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, dy_Name, dy);
178 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, dz_Name, dz);
179
180 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, c_ref_Name, c_ref);
181
182 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, pml_x_size_Name, pml_x_size);
183 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, pml_y_size_Name, pml_y_size);
184 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, pml_z_size_Name, pml_z_size);
185
186 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, pml_x_alpha_Name, pml_x_alpha);
187 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, pml_y_alpha_Name, pml_y_alpha);
188 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, pml_z_alpha_Name, pml_z_alpha);
189
190 size_t X, Y, Z;
191 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, Nx_Name, X);
192 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, Ny_Name, Y);
193 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, Nz_Name, Z);
194
195 FullDimensionSizes.X = X;
196 FullDimensionSizes.Y = Y;
197 FullDimensionSizes.Z = Z;
198
199 ReducedDimensionSizes.X = ((X / 2) + 1);
200 ReducedDimensionSizes.Y = Y;
201 ReducedDimensionSizes.Z = Z;
202
203 // if the file is of version 1.0, there must be a sensor mask index (backward compatibility)
204 if (HDF5_FileHeader.GetFileVersion() == THDF5_FileHeader::hdf5_fv_10)
205 {
206 sensor_mask_ind_size = HDF5_InputFile.GetDatasetElementCount(HDF5RootGroup, sensor_mask_index_Name);
207
208 //if -u_non_staggered_raw enabled, throw an error - not supported
209 if (IsStore_u_non_staggered_raw())
210 {
211 throw ios::failure(Parameters_ERR_FMT_UNonStaggeredNotSupportedForFile10);
212 }
213 }
214
215 // This is the current version 1.1
216 if (HDF5_FileHeader.GetFileVersion() == THDF5_FileHeader::hdf5_fv_11)
217 {
218
219 // read sensor mask type as a size_t value to enum
220 size_t SensorMaskTypeNumericalue = 0;
221 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, sensor_mask_type_Name, SensorMaskTypeNumericalue);
222
223 // convert the size_t value to enum
224 switch (SensorMaskTypeNumericalue)
225 {
226 case 0: sensor_mask_type = smt_index;
227 break;
228 case 1: sensor_mask_type = smt_corners;
229 break;
230 default:
231 {
232 throw ios::failure(Parameters_ERR_FMT_WrongSensorMaskType);
233 break;
234 }
235 }//case
236
237 // read the input mask size
238 switch (sensor_mask_type)
239 {
240 case smt_index:
241 {
242 sensor_mask_ind_size = HDF5_InputFile.GetDatasetElementCount(HDF5RootGroup, sensor_mask_index_Name);
243 break;
244 }
245 case smt_corners:
246 {
247 // mask dimensions are [6, N, 1] - I want to know N
248 sensor_mask_corners_size = HDF5_InputFile.GetDatasetDimensionSizes(HDF5RootGroup, sensor_mask_corners_Name).Y;
249 break;
250 }
251 }// switch
252 }// version 1.1
253
254
255 // flags.
256 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, ux_source_flag_Name, ux_source_flag);
257 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, uy_source_flag_Name, uy_source_flag);
258 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, uz_source_flag_Name, uz_source_flag);
259 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, transducer_source_flag_Name, transducer_source_flag);
260
261 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, p_source_flag_Name, p_source_flag);
262 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, p0_source_flag_Name,p0_source_flag);
263
264 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, nonuniform_grid_flag_Name, nonuniform_grid_flag);
265 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, absorbing_flag_Name, absorbing_flag);
266 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, nonlinear_flag_Name, nonlinear_flag);
267
268
269
270 // Vector sizes.
271 if (transducer_source_flag == 0)
272 {
273 transducer_source_input_size = 0;
274 }
275 else
276 {
277 transducer_source_input_size = HDF5_InputFile.GetDatasetElementCount(HDF5RootGroup, transducer_source_input_Name);
278 }
279
280 if ((transducer_source_flag > 0) || (ux_source_flag > 0) || (uy_source_flag > 0) || (uz_source_flag > 0))
281 {
282 u_source_index_size = HDF5_InputFile.GetDatasetElementCount(HDF5RootGroup, u_source_index_Name);
283 }
284
285
286 // uxyz_source_flags
287 if ((ux_source_flag > 0) || (uy_source_flag > 0) || (uz_source_flag > 0))
288 {
289 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, u_source_many_Name, u_source_many);
290 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, u_source_mode_Name, u_source_mode);
291 }
292 else
293 {
294 u_source_many = 0;
295 u_source_mode = 0;
296 }
297
298 // p_source_flag
299 if (p_source_flag != 0)
300 {
301 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, p_source_many_Name, p_source_many);
302 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, p_source_mode_Name, p_source_mode);
303
304 p_source_index_size = HDF5_InputFile.GetDatasetElementCount(HDF5RootGroup, p_source_index_Name);
305 }
306 else
307 {
308 p_source_mode = 0;
309 p_source_many = 0;
310 p_source_index_size = 0;
311 }
312
313
314 // absorb flag
315 if (absorbing_flag != 0)
316 {
317 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, alpha_power_Name, alpha_power);
318 if (alpha_power == 1.0f)
319 {
320 fprintf(stderr, "%s", Parameters_ERR_FMT_Illegal_alpha_power_value);
321 PrintUsageAndExit();
322 }
323
324 alpha_coeff_scalar_flag = HDF5_InputFile.GetDatasetDimensionSizes(HDF5RootGroup, alpha_coeff_Name) == ScalarSizes;
325 if (alpha_coeff_scalar_flag)
326 {
327 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, alpha_coeff_Name, alpha_coeff_scalar);
328 }
329 }
330
331
332 c0_scalar_flag = HDF5_InputFile.GetDatasetDimensionSizes(HDF5RootGroup, c0_Name) == ScalarSizes;
333 if (c0_scalar_flag)
334 {
335 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, c0_Name, c0_scalar);
336 }
337
338 if (nonlinear_flag)
339 {
340 BonA_scalar_flag = HDF5_InputFile.GetDatasetDimensionSizes(HDF5RootGroup, BonA_Name) == ScalarSizes;
341 if (BonA_scalar_flag)
342 {
343 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, BonA_Name, BonA_scalar);
344 }
345 }
346
347 rho0_scalar_flag = HDF5_InputFile.GetDatasetDimensionSizes(HDF5RootGroup, rho0_Name) == ScalarSizes;
348 if (rho0_scalar_flag)
349 {
350 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, rho0_Name, rho0_scalar);
351 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, rho0_sgx_Name, rho0_sgx_scalar);
352 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, rho0_sgy_Name, rho0_sgy_scalar);
353 HDF5_InputFile.ReadScalarValue(HDF5RootGroup, rho0_sgz_Name, rho0_sgz_scalar);
354 }
355 }// end of ReadScalarsFromMatlabInputFile
356 //------------------------------------------------------------------------------
357
358 /**
359 * Save scalars into the output HDF5 file.
360 * @param [in] HDF5_OutputFile - Handle to an opened output file where to store
361 */
362 void TParameters::SaveScalarsToHDF5File(THDF5_File & HDF5_OutputFile)
363 {
364 const hid_t HDF5RootGroup = HDF5_OutputFile.GetRootGroup();
365
366 // Write dimension sizes
367 HDF5_OutputFile.WriteScalarValue(HDF5RootGroup, Nx_Name, FullDimensionSizes.X);
368 HDF5_OutputFile.WriteScalarValue(HDF5RootGroup, Ny_Name, FullDimensionSizes.Y);
369 HDF5_OutputFile.WriteScalarValue(HDF5RootGroup, Nz_Name, FullDimensionSizes.Z);
370
371 HDF5_OutputFile.WriteScalarValue(HDF5RootGroup, Nt_Name, Nt);
372
373 HDF5_OutputFile.WriteScalarValue(HDF5RootGroup, dt_Name, dt);
374 HDF5_OutputFile.WriteScalarValue(HDF5RootGroup, dx_Name, dx);
375 HDF5_OutputFile.WriteScalarValue(HDF5RootGroup, dy_Name, dy);
376 HDF5_OutputFile.WriteScalarValue(HDF5RootGroup, dz_Name, dz);
377
378 HDF5_OutputFile.WriteScalarValue(HDF5RootGroup, c_ref_Name, c_ref);
379
380 HDF5_OutputFile.WriteScalarValue(HDF5RootGroup, pml_x_size_Name, pml_x_size);
381 HDF5_OutputFile.WriteScalarValue(HDF5RootGroup, pml_y_size_Name, pml_y_size);
382 HDF5_OutputFile.WriteScalarValue(HDF5RootGroup, pml_z_size_Name, pml_z_size);
383
384 HDF5_OutputFile.WriteScalarValue(HDF5RootGroup, pml_x_alpha_Name, pml_x_alpha);
385 HDF5_OutputFile.WriteScalarValue(HDF5RootGroup, pml_y_alpha_Name, pml_y_alpha);
386 HDF5_OutputFile.WriteScalarValue(HDF5RootGroup, pml_z_alpha_Name, pml_z_alpha);
387
388 HDF5_OutputFile.WriteScalarValue(HDF5RootGroup, ux_source_flag_Name, ux_source_flag);
389 HDF5_OutputFile.WriteScalarValue(HDF5RootGroup, uy_source_flag_Name, uy_source_flag);
390 HDF5_OutputFile.WriteScalarValue(HDF5RootGroup, uz_source_flag_Name, uz_source_flag);
391 HDF5_OutputFile.WriteScalarValue(HDF5RootGroup, transducer_source_flag_Name, transducer_source_flag);
392
393 HDF5_OutputFile.WriteScalarValue(HDF5RootGroup, p_source_flag_Name, p_source_flag);
394 HDF5_OutputFile.WriteScalarValue(HDF5RootGroup, p0_source_flag_Name, p0_source_flag);
395
396 HDF5_OutputFile.WriteScalarValue(HDF5RootGroup, nonuniform_grid_flag_Name, nonuniform_grid_flag);
397 HDF5_OutputFile.WriteScalarValue(HDF5RootGroup, absorbing_flag_Name, absorbing_flag);
398 HDF5_OutputFile.WriteScalarValue(HDF5RootGroup, nonlinear_flag_Name, nonlinear_flag);
399
400
401 // uxyz_source_flags
402 if ((ux_source_flag > 0) || (uy_source_flag > 0) || (uz_source_flag > 0))
403 {
404 HDF5_OutputFile.WriteScalarValue(HDF5RootGroup, u_source_many_Name, u_source_many);
405 HDF5_OutputFile.WriteScalarValue(HDF5RootGroup, u_source_mode_Name, u_source_mode);
406 }
407
408 // p_source_flag
409 if (p_source_flag != 0)
410 {
411 HDF5_OutputFile.WriteScalarValue(HDF5RootGroup, p_source_many_Name, p_source_many);
412 HDF5_OutputFile.WriteScalarValue(HDF5RootGroup, p_source_mode_Name, p_source_mode);
413 }
414
415 // absorb flag
416 if (absorbing_flag != 0)
417 {
418 HDF5_OutputFile.WriteScalarValue(HDF5RootGroup, alpha_power_Name, alpha_power);
419 }
420
421 // if copy sensor mask, then copy the mask type
422 if (IsCopySensorMask())
423 {
424 size_t SensorMaskTypeNumericValue = 0;
425
426 switch (sensor_mask_type)
427 {
428 case smt_index: SensorMaskTypeNumericValue = 0;
429 break;
430 case smt_corners: SensorMaskTypeNumericValue = 1;
431 break;
432 }// switch
433
434 HDF5_OutputFile.WriteScalarValue(HDF5RootGroup, sensor_mask_type_Name, SensorMaskTypeNumericValue);
435 }
436 }// end of SaveScalarsToHDF5File
437 //------------------------------------------------------------------------------
438
439
440
441 //----------------------------------------------------------------------------//
442 // Implementation //
443 // protected methods //
444 //----------------------------------------------------------------------------//
445
446
447 /**
448 * Constructor.
449 */
450 TParameters::TParameters() :
451 HDF5_InputFile(), HDF5_OutputFile(), HDF5_CheckpointFile(), HDF5_FileHeader(),
452 CommandLinesParameters(),
453 Nt(0), t_index(0), dt(0.0f),
454 dx(0.0f), dy(0.0f), dz(0.0f),
455 c_ref(0.0f), alpha_power(0.0f),
456 FullDimensionSizes(0,0,0), ReducedDimensionSizes(0,0,0),
457 sensor_mask_ind_size (0), u_source_index_size(0), p_source_index_size(0), transducer_source_input_size(0),
458 ux_source_flag(0), uy_source_flag(0), uz_source_flag(0),
459 p_source_flag(0), p0_source_flag(0), transducer_source_flag(0),
460 u_source_many(0), u_source_mode(0), p_source_mode(0), p_source_many(0),
461 nonuniform_grid_flag(0), absorbing_flag(0), nonlinear_flag(0),
462 pml_x_size(0), pml_y_size(0), pml_z_size(0),
463 alpha_coeff_scalar_flag(false), alpha_coeff_scalar(0.0f),
464 c0_scalar_flag(false), c0_scalar(0.0f),
465 absorb_eta_scalar(0.0f), absorb_tau_scalar (0.0f),
466 BonA_scalar_flag(false), BonA_scalar (0.0f),
467 rho0_scalar_flag(false), rho0_scalar(0.0f), rho0_sgx_scalar(0.0f), rho0_sgy_scalar(0.0f), rho0_sgz_scalar(0.0f)
468
469 {
470
471 }// end of TFFT1DParameters
472 //------------------------------------------------------------------------------
473
474
475
476 //----------------------------------------------------------------------------//
477 // Implementation //
478 // private methods //
479 //----------------------------------------------------------------------------//
480
481 /**
482 * Print usage end exit.
483 */
484 void TParameters::PrintUsageAndExit()
485 {
486 CommandLinesParameters.PrintUsageAndExit();
487 }// end of PrintUsage
488 //------------------------------------------------------------------------------
489
TParameters::ParseCommandLine
void ParseCommandLine(int argc, char **argv)
Parse command line.
Definition: Parameters.cpp:94
transducer_source_input_Name
const char *const transducer_source_input_Name
transducer_source_input variable name
Definition: MatrixNames.h:159
TCommandLineParameters::PrintUsageAndExit
void PrintUsageAndExit()
Print usage and exit.
Definition: CommandLineParameters.cpp:92
u_source_many_Name
const char *const u_source_many_Name
u_source_many variable name
Definition: MatrixNames.h:114
uz_source_flag_Name
const char *const uz_source_flag_Name
uz_source_flag variable name
Definition: MatrixNames.h:111
Parameters_ERR_FMT_IncorrectMajorHDF5FileVersion
const char *const Parameters_ERR_FMT_IncorrectMajorHDF5FileVersion
Command line parameters error message.
Definition: ErrorMessages.h:132
TParameters::SaveScalarsToHDF5File
void SaveScalarsToHDF5File(THDF5_File &HDF5_OutputFile)
Save scalars into the output HDF5 file.
Definition: Parameters.cpp:362
Parameters_ERR_FMT_WrongSensorMaskType
const char *const Parameters_ERR_FMT_WrongSensorMaskType
Command line parameters error message.
Definition: ErrorMessages.h:136
uy_source_flag_Name
const char *const uy_source_flag_Name
uy_source_flag variable name
Definition: MatrixNames.h:109
THDF5_File::WriteScalarValue
void WriteScalarValue(const hid_t ParentGroup, const char *DatasetName, const float Value)
Write the scalar value under a specified group - float value.
Definition: HDF5_File.cpp:794
p_source_flag_Name
const char *const p_source_flag_Name
p_source_flag variable name
Definition: MatrixNames.h:119
Parameters_ERR_FMT_UNonStaggeredNotSupportedForFile10
const char *const Parameters_ERR_FMT_UNonStaggeredNotSupportedForFile10
Command line parameters error message.
Definition: ErrorMessages.h:138
pml_x_size_Name
const char *const pml_x_size_Name
pml_x_size variable name
Definition: MatrixNames.h:78
Ny_Name
const char *const Ny_Name
Ny variable name.
Definition: MatrixNames.h:66
rho0_Name
const char *const rho0_Name
rho0 variable name
Definition: MatrixNames.h:237
Parameters_ERR_FMT_IncorrectInputFileFormat
const char *const Parameters_ERR_FMT_IncorrectInputFileFormat
Command line parameters error message.
Definition: ErrorMessages.h:130
THDF5_File::IsOpened
bool IsOpened() const
Is the file opened?
Definition: HDF5_File.h:539
BonA_Name
const char *const BonA_Name
BonA variable name.
Definition: MatrixNames.h:170
THDF5_File::ReadScalarValue
void ReadScalarValue(const hid_t ParentGroup, const char *DatasetName, float &Value)
Read the scalar value under a specified group - float value.
Definition: HDF5_File.cpp:922
TParameters::CommandLinesParameters
TCommandLineParameters CommandLinesParameters
Class with commandline parameters.
Definition: Parameters.h:283
TParameters::ParametersSingleInstance
static TParameters * ParametersSingleInstance
singleton instance.
Definition: Parameters.h:404
absorbing_flag_Name
const char *const absorbing_flag_Name
absorbing_flag variable name
Definition: MatrixNames.h:145
Parameters.h
The header file containing the parameters of the simulation.
pml_y_size_Name
const char *const pml_y_size_Name
pml_y_size variable name
Definition: MatrixNames.h:80
THDF5_File::GetDatasetDimensionSizes
TDimensionSizes GetDatasetDimensionSizes(const hid_t ParentGroup, const char *DatasetName)
Get dimension sizes of the dataset under a specified group.
Definition: HDF5_File.cpp:1024
alpha_coeff_Name
const char *const alpha_coeff_Name
alpha_coeff variable name
Definition: MatrixNames.h:61
THDF5_File::GetDatasetElementCount
size_t GetDatasetElementCount(const hid_t ParentGroup, const char *DatasetName)
Get dataset element count under a specified group.
Definition: HDF5_File.cpp:1087
c0_Name
const char *const c0_Name
c0 variable name
Definition: MatrixNames.h:56
Nx_Name
const char *const Nx_Name
Nx variable name.
Definition: MatrixNames.h:64
rho0_sgy_Name
const char *const rho0_sgy_Name
rho0_sgy variable name
Definition: MatrixNames.h:241
TParameters::TParameters
TParameters()
Constructor not allowed for public.
Definition: Parameters.cpp:450
dz_Name
const char *const dz_Name
dz variable name
Definition: MatrixNames.h:51
p_source_mode_Name
const char *const p_source_mode_Name
p_source_mode variable name
Definition: MatrixNames.h:126
pml_z_alpha_Name
const char *const pml_z_alpha_Name
pml_z_alpha variable name
Definition: MatrixNames.h:104
TParameters
Class storing all parameters of the simulation.
Definition: Parameters.h:51
u_source_mode_Name
const char *const u_source_mode_Name
u_source_mode variable name
Definition: MatrixNames.h:124
THDF5_File::GetRootGroup
hid_t GetRootGroup() const
Get handle to the root group.
Definition: HDF5_File.h:581
MatrixNames.h
The header file storing names of all variables.
dt_Name
const char *const dt_Name
dt variable name
Definition: MatrixNames.h:45
ErrorMessages.h
The header file containing all error messages of the project.
THDF5_File::Open
void Open(const char *FileName, unsigned int Flags=H5F_ACC_RDONLY)
Open the file.
Definition: HDF5_File.cpp:136
pml_y_alpha_Name
const char *const pml_y_alpha_Name
pml_y_alpha variable name
Definition: MatrixNames.h:102
nonlinear_flag_Name
const char *const nonlinear_flag_Name
nonlinear_flag variable name
Definition: MatrixNames.h:147
transducer_source_flag_Name
const char *const transducer_source_flag_Name
transducer_source_flag variable name
Definition: MatrixNames.h:150
Parameters_ERR_FMT_Illegal_alpha_power_value
const char *const Parameters_ERR_FMT_Illegal_alpha_power_value
Command line parameters error message.
Definition: ErrorMessages.h:126
pml_z_size_Name
const char *const pml_z_size_Name
pml_z_size variable name
Definition: MatrixNames.h:82
TParameters::ParametersInstanceFlag
static bool ParametersInstanceFlag
singleton flag.
Definition: Parameters.h:402
TDimensionSizes::Y
size_t Y
Y dimension size.
Definition: DimensionSizes.h:68
c_ref_Name
const char *const c_ref_Name
c_ref variable name
Definition: MatrixNames.h:54
nonuniform_grid_flag_Name
const char *const nonuniform_grid_flag_Name
nonuniform_grid_flag variable name
Definition: MatrixNames.h:143
dx_Name
const char *const dx_Name
dx variable name
Definition: MatrixNames.h:47
sensor_mask_corners_Name
const char *const sensor_mask_corners_Name
sensor_mask_corners variable name
Definition: MatrixNames.h:156
p_source_many_Name
const char *const p_source_many_Name
p_source_many variable name
Definition: MatrixNames.h:116
dy_Name
const char *const dy_Name
dy variable name
Definition: MatrixNames.h:49
TParameters::ReadScalarsFromHDF5InputFile
void ReadScalarsFromHDF5InputFile(THDF5_File &HDF5_InputFile)
Read scalar values from the input HDF5 file.
Definition: Parameters.cpp:126
TParameters::PrintUsageAndExit
void PrintUsageAndExit()
Print usage and exit.
Definition: Parameters.cpp:484
u_source_index_Name
const char *const u_source_index_Name
u_source_index variable name
Definition: MatrixNames.h:134
Parameters_ERR_FMT_IncorrectMinorHDF5FileVersion
const char *const Parameters_ERR_FMT_IncorrectMinorHDF5FileVersion
Command line parameters error message.
Definition: ErrorMessages.h:134
rho0_sgz_Name
const char *const rho0_sgz_Name
rho0_sgz variable name
Definition: MatrixNames.h:243
rho0_sgx_Name
const char *const rho0_sgx_Name
rho0_sgx variable name
Definition: MatrixNames.h:239
p_source_index_Name
const char *const p_source_index_Name
p_source_index variable name
Definition: MatrixNames.h:131
Nz_Name
const char *const Nz_Name
Nz variable name.
Definition: MatrixNames.h:68
sensor_mask_index_Name
const char *const sensor_mask_index_Name
sensor_mask_index variable name
Definition: MatrixNames.h:152
Nt_Name
const char *const Nt_Name
Nt variable name.
Definition: MatrixNames.h:41
p0_source_flag_Name
const char *const p0_source_flag_Name
p0_source_flag variable name
Definition: MatrixNames.h:121
ux_source_flag_Name
const char *const ux_source_flag_Name
ux_source_flag variable name
Definition: MatrixNames.h:107
pml_x_alpha_Name
const char *const pml_x_alpha_Name
pml_x_alpha variable name
Definition: MatrixNames.h:100
sensor_mask_type_Name
const char *const sensor_mask_type_Name
sensor_mask_type variable name
Definition: MatrixNames.h:154
THDF5_File
Class wrapping the HDF5 routines.
Definition: HDF5_File.h:506
TDimensionSizes
Structure with 4D dimension sizes (3 in space and 1 in time).
Definition: DimensionSizes.h:63
Parameters_ERR_FMT_Illegal_StartTime_value
const char *const Parameters_ERR_FMT_Illegal_StartTime_value
Command line parameters error message.
Definition: ErrorMessages.h:128
alpha_power_Name
const char *const alpha_power_Name
alpha_power variable name
Definition: MatrixNames.h:59
TParameters::GetInstance
static TParameters * GetInstance()
Get instance of the singleton class.
Definition: Parameters.cpp:74