![]() |
kspaceFirstOrder3D-CUDA
1.1
The CUDA/C++ implementation of the k-wave toolbox for the time-domain simulation of acoustic wave fields in 3D
|
Class storing all parameters of the simulation. More...
#include <Parameters.h>

Public Types | |
| enum | TSensorMaskType { INDEX = 0, CORNERS = 1 } |
| Sensor mask type (linear indices or cuboid corners). More... | |
Public Member Functions | |
| virtual | ~TParameters () |
| Destructor. More... | |
| void | Init (int argc, char **argv) |
| Parse command line and read scalar values to init the class. More... | |
| void | SelectDevice () |
| Select cuda device for execution. More... | |
| void | PrintSimulatoinSetup () |
| Print the simulation setup (all parameters) More... | |
| const TCUDAParameters & | GetCudaParameters () const |
| Get class with CUDA Parameters (runtime setup), cosnt version. | |
| TCUDAParameters & | GetCudaParameters () |
| Get class with CUDA Parameters (runtime setup) | |
| THDF5_File & | GetInputFile () |
| Get input file handle. | |
| THDF5_File & | GetOutputFile () |
| Get output file handle. | |
| THDF5_File & | GetCheckpointFile () |
| Gest checkpoint file handle. | |
| THDF5_FileHeader & | GetFileHeader () |
| Get File header handle. | |
| void | ReadScalarsFromInputFile (THDF5_File &inputFile) |
| Read scalar values from the input HDF5 file. More... | |
| void | SaveScalarsToFile (THDF5_File &outputFile) |
| Save scalar values into the output HDF5 file. More... | |
| TDimensionSizes | GetFullDimensionSizes () const |
| Full dimension sizes of the simulation (real classes). | |
| TDimensionSizes | GetReducedDimensionSizes () const |
| Reduced dimension sizes of the simulation (complex classes). | |
| size_t | Get_nt () const |
| Get Nt value. | |
| size_t | Get_t_index () const |
| Get simulation time step. | |
| void | Set_t_index (const size_t new_t_index) |
| Set simulation time step - should be used only when recovering from checkpoint. | |
| void | Increment_t_index () |
| Increment simulation time step. | |
| float | Get_dt () const |
| Get dt value. | |
| float | Get_dx () const |
| Get dx value. | |
| float | Get_dy () const |
| Get dy value. | |
| float | Get_dz () const |
| Get dz value. | |
| float | Get_c_ref () const |
| Get c_ref value. | |
| float | Get_alpha_power () const |
| Get alpha_power value. | |
| size_t | Get_pml_x_size () const |
| Get pml_x_size value. | |
| size_t | Get_pml_y_size () const |
| Get pml_y_size value. | |
| size_t | Get_pml_z_size () const |
| Get pml_z_size value. | |
| float | Get_pml_x_alpha_size () const |
| Get pml_x_alpha_size value. | |
| float | Get_pml_y_alpha_size () const |
| Get pml_y_alpha_size value. | |
| float | Get_pml_z_alpha_size () const |
| Get pml_z_alpha_size value. | |
| size_t | Get_ux_source_flag () const |
| Get ux_source_flag value. | |
| size_t | Get_uy_source_flag () const |
| Get uy_source_flag value. | |
| size_t | Get_uz_source_flag () const |
| Get uz_source_flag value. | |
| size_t | Get_u_source_many () const |
| Get u_source_many value. | |
| size_t | Get_u_source_mode () const |
| Get ux_source_mode value. | |
| size_t | Get_p_source_flag () const |
| Get p_source_flag value. | |
| size_t | Get_p0_source_flag () const |
| Get p0_source_flag value. | |
| size_t | Get_p_source_many () const |
| Get p_source_many value. | |
| size_t | Get_p_source_mode () const |
| Get p_source_mode value. | |
| size_t | Get_nonuniform_grid_flag () const |
| Get nonuniform_grid_flag value. | |
| size_t | Get_absorbing_flag () const |
| Get absorbing_flag value. | |
| size_t | Get_nonlinear_flag () const |
| Get nonlinear_flag value. | |
| size_t | Get_transducer_source_flag () const |
| Get transducer_source_flag value. | |
| TSensorMaskType | Get_sensor_mask_type () const |
| Get sensor mask type (linear or corners). | |
| size_t | Get_sensor_mask_index_size () const |
| Get sensor_mask_index_size value. | |
| size_t | Get_sensor_mask_corners_size () const |
| Get number of cubes in the mask. | |
| size_t | Get_u_source_index_size () const |
| Get u_source_index_size value. | |
| size_t | Get_p_source_index_size () const |
| Get p_source_index_size value. | |
| size_t | Get_transducer_source_input_size () const |
| Get transducer_source_input_size value. | |
| bool | Get_alpha_coeff_scalar_flag () const |
| Get alpha_coeff_scalar_flag value. | |
| float & | Get_alpha_coeff_scalar () |
| Get alpha_coeff_scalar value. Note: cannot be const because of other optimizations. | |
| bool | Get_c0_scalar_flag () const |
| Get c0_scalar_flag value. | |
| float & | Get_c0_scalar () |
| Get c0_scalar value. | |
| float & | Get_absorb_eta_scalar () |
| Get absorb_eta_scalar value. | |
| float & | Get_absorb_tau_scalar () |
| Get absorb_tau_scalar value. | |
| bool | Get_BonA_scalar_flag () const |
| Get BonA_scalar_flag value. | |
| float & | Get_BonA_scalar () |
| Get BonA_scalar value. | |
| bool | Get_rho0_scalar_flag () const |
| Get rho0_scalar_flag value. | |
| float & | Get_rho0_scalar () |
| Get rho0_scalar value. | |
| float & | Get_rho0_sgx_scalar () |
| Get rho0_sgx_scalar value. | |
| float & | Get_rho0_sgy_scalar () |
| Get rho0_sgy_scalar value. | |
| float & | Get_rho0_sgz_scalar () |
| Get rho0_sgz_scalar value. | |
| std::string | GetInputFileName () const |
| Get input file name. | |
| std::string | GetOutputFileName () const |
| Get output file name. | |
| std::string | GetCheckpointFileName () const |
| Get checkpoint filename. | |
| size_t | GetCompressionLevel () const |
| Get compression level. | |
| size_t | GetNumberOfThreads () const |
| Get number of threads. | |
| size_t | GetProgressPrintInterval () const |
| Get progress print interval. | |
| size_t | GetStartTimeIndex () const |
| Get start time index for sensor recording. | |
| bool | IsCheckpointEnabled () const |
| Is checkpoint enabled? | |
| size_t | GetCheckpointInterval () const |
| Get checkpoint interval. | |
| bool | IsVersion () const |
| Is –version specified at the command line? | |
| bool | IsStore_p_raw () const |
| Is -p or –p_raw specified at the command line? | |
| bool | IsStore_p_rms () const |
| Is –p_rms specified at the command line? | |
| bool | IsStore_p_max () const |
| Is –p_max specified at the command line? | |
| bool | IsStore_p_min () const |
| Is –p_min specified at the command line? | |
| bool | IsStore_p_max_all () const |
| Is –p_max_all specified at the command line? | |
| bool | IsStore_p_min_all () const |
| Is –p_min_all specified at the command line? | |
| bool | IsStore_p_final () const |
| Is –p_final specified at the command line? | |
| bool | IsStore_u_raw () const |
| Is -u or –u_raw specified at the command line? | |
| bool | IsStore_u_non_staggered_raw () const |
| Is –u_non_staggered_raw set? | |
| bool | IsStore_u_rms () const |
| Is –u_raw specified at the command line? | |
| bool | IsStore_u_max () const |
| Is –u_max specified at the command line? | |
| bool | IsStore_u_min () const |
| Is –u_min specified at the command line? | |
| bool | IsStore_u_max_all () const |
| Is –u_max_all specified at the command line? | |
| bool | IsStore_u_min_all () const |
| Is –u_min_all specified at the command line? | |
| bool | IsStore_u_final () const |
| Is –u_final specified at the command line. | |
| bool | IsCopySensorMask () const |
| is –copy_mask set | |
| std::string | GetGitHash () const |
| Get Git hash of the code. More... | |
Static Public Member Functions | |
| static TParameters & | GetInstance () |
| Get instance of the singleton class. More... | |
Protected Member Functions | |
| TParameters () | |
| Constructor. More... | |
| TParameters (const TParameters &orig) | |
| Copy constructor,. | |
Private Attributes | |
| TCUDAParameters | cudaParameters |
| Class with CUDA Parameters (runtime setup) | |
| TCommandLineParameters | commandLineParameters |
| Class with command line parameters. | |
| THDF5_File | inputFile |
| Handle to the input HDF5 file. | |
| THDF5_File | outputFile |
| Handle to the output HDF5 file. | |
| THDF5_File | checkpointFile |
| Handle to the checkpoint HDF5 file. | |
| THDF5_FileHeader | fileHeader |
| Handle to file header. | |
| size_t | nt |
| Nt value. | |
| size_t | t_index |
| actual time index (time step of the simulation). | |
| float | dt |
| dt value. | |
| float | dx |
| dx value. | |
| float | dy |
| dy value. | |
| float | dz |
| dz value. | |
| float | c_ref |
| c_ref value. | |
| float | alpha_power |
| alpha_power value. | |
| TDimensionSizes | fullDimensionSizes |
| Full 3D dimension sizes. | |
| TDimensionSizes | reducedDimensionSizes |
| Reduced 3D dimension sizes. | |
| TSensorMaskType | sensor_mask_type |
| sensor mask type (0 = index, 1 = corners). | |
| size_t | sensor_mask_ind_size |
| sensor_mask_ind_size value. | |
| size_t | sensor_mask_corners_size |
| sensor_mask_corners_size - how many cuboids are in the mask. | |
| size_t | u_source_index_size |
| u_source_index_size value. | |
| size_t | p_source_index_size |
| p_source_index_size value. | |
| size_t | transducer_source_input_size |
| transducer_source_input_size value. | |
| size_t | ux_source_flag |
| ux_source_flag value. | |
| size_t | uy_source_flag |
| uy_source_flag value. | |
| size_t | uz_source_flag |
| uz_source_flag value. | |
| size_t | p_source_flag |
| p_source_flag value. | |
| size_t | p0_source_flag |
| p0_source_flag value. | |
| size_t | transducer_source_flag |
| transducer_source_flag value. | |
| size_t | u_source_many |
| u_source_many value. | |
| size_t | u_source_mode |
| u_source_mode value. | |
| size_t | p_source_mode |
| p_source_mode value. | |
| size_t | p_source_many |
| p_source_many value. | |
| size_t | nonuniform_grid_flag |
| nonuniform_grid_flag value. | |
| size_t | absorbing_flag |
| absorbing_flag value. | |
| size_t | nonlinear_flag |
| nonlinear_flag value. | |
| size_t | pml_x_size |
| pml_x_size value. | |
| size_t | pml_y_size |
| pml_y_size value. | |
| size_t | pml_z_size |
| pml_z_size value. | |
| float | pml_x_alpha |
| pml_x_alpha value. | |
| float | pml_y_alpha |
| pml_y_alpha value. | |
| float | pml_z_alpha |
| pml_z_alpha value. | |
| bool | alpha_coeff_scalar_flag |
| alpha_coeff_scalar_flag value. | |
| float | alpha_coeff_scalar |
| alpha_coeff_scalar value. | |
| bool | c0_scalar_flag |
| c0_scalar_flag value. | |
| float | c0_scalar |
| c0_scalar value. | |
| float | absorb_eta_scalar |
| absorb_eta_scalar value. | |
| float | absorb_tau_scalar |
| absorb_tau_scalar value. | |
| bool | BonA_scalar_flag |
| BonA_scalar_flag value. | |
| float | BonA_scalar |
| BonA_scalar value. | |
| bool | rho0_scalar_flag |
| rho0_scalar_flag value. | |
| float | rho0_scalar |
| rho0_scalar value. | |
| float | rho0_sgx_scalar |
| rho0_sgx_scalar value. | |
| float | rho0_sgy_scalar |
| rho0_sgy_scalar value. | |
| float | rho0_sgz_scalar |
| rho0_sgz_scalar value. | |
Static Private Attributes | |
| static bool | parametersInstanceFlag = false |
| singleton flag | |
| static TParameters * | parametersSingleInstance = NULL |
| singleton instance | |
Class storing all parameters of the simulation.
Definition at line 49 of file Parameters.h.
Sensor mask type (linear indices or cuboid corners).
Definition at line 58 of file Parameters.h.
|
virtual |
Destructor.
Definition at line 88 of file Parameters.cpp.
|
protected |
Constructor.
Definition at line 533 of file Parameters.cpp.

| string TParameters::GetGitHash | ( | ) | const |
Get GitHash of the code
Definition at line 513 of file Parameters.cpp.

|
static |
Get instance of singleton class.
Definition at line 70 of file Parameters.cpp.


| void TParameters::Init | ( | int | argc, |
| char ** | argv | ||
| ) |
Parse command line and read scalar values from the input file to initialise the class and the simulation.
| [in] | argc | - Number of commandline parameters |
| [in] | argv | - Commandline parameters |
Definition at line 106 of file Parameters.cpp.


| void TParameters::PrintSimulatoinSetup | ( | ) |
Print parameters of the simulation, based in the actual level of verbosity.
Definition at line 167 of file Parameters.cpp.


| void TParameters::ReadScalarsFromInputFile | ( | THDF5_File & | inputFile | ) |
Read scalar values from the input HDF5 file.
| [in] | inputFile | - Handle to an opened input file. |
| ios:failure | if the file cannot be open or is of a wrong type or version. |
Definition at line 207 of file Parameters.cpp.


| void TParameters::SaveScalarsToFile | ( | THDF5_File & | outputFile | ) |
Save scalars into the output HDF5 file.
| [in] | outputFile | - Handle to an opened output file where to store |
Definition at line 432 of file Parameters.cpp.


| void TParameters::SelectDevice | ( | ) |
Select a GPU device for execution.
Definition at line 144 of file Parameters.cpp.

